Versions 7 to 318
new file, 113 lines
1+// A draft's view takes its base view's layout of every file the draft doesn't touch (abso Capacity, View.shareFiles).
2+// On a writer-backed project every agent's view must still read every file as the in-memory project does: a draft
3+// that edits lines moved into another file by a published move, one that deletes such a line, one that only sets an
5+
12+
23+
32+
41+ // bob edits a moved line, cy deletes one, dee touches only plain.ts, eve sets an attribute, fay moves lines.
49+
53+ for (const path of view.paths()) out[path] = [view.text(path), view.attrs(path), view.lines(path).map((l) => l.atom)];
56+
57+test("every agent's view reads every file as the in-memory project's, with files shared from the base", () => {
69+ assert.deepEqual(project.tree("", { agent: "cy", authors: true }), oracle.tree("", { agent: "cy", authors: true }));
71+
72+// A push landed through the merge queue whose delete and write of the same text became a move, by an agent whose base
73+// stays older than the landing, then more drafting in the moved-to file: the diff and every file read as in memory.
74+// (Here the move is among the agent's own atoms, so nothing is shared; touched-beyond.test.ts covers work held only
105+
106+test("a draft's diff takes nothing from its base that its landed work holds by dependency", () => {
- MCP
- compare on this site's /mcp
- CLI
- abso diff 7 318 worker/project/test/agent-views-shared.test.ts --json
- JSON
- /christopher/abso-core/compare/7..318?file=worker%2Fproject%2Ftest%2Fagent-views-shared.test.ts&format=json