Versions 7 to 318
new file, 327 lines
14+
23+ const previous = new ExperimentalMarkerProjection(db, new Graph({ storage: db }), "a.txt", "restart").empty();
27+ const adapter = new ExperimentalMarkerProjection(db, new Graph({ storage: db }), "a.txt", "restart");
57+
58+test("atom adoption resumes small pages and matches atomic additions and reverse removals", () => {
107+ db.db.prepare("SELECT COUNT(*) AS n FROM state WHERE collection LIKE ?").get("%move-adoption:%")!.n,
121+
122+test("source drift rolls back an atom page and a changed atom cannot resume its cursor", () => {
164+ assert.throws(() => job.page({ ...input, validateSource: () => Promise.resolve() }), /must be synchronous/);
168+ () => job.page({ ...input, validateSource: () => (++asyncChecks === 2 ? Promise.resolve() : undefined) }),
189+ assert.throws(() => job.page({ ...input, source: "c".repeat(64) }), /changed atom adoption cursor/);
196+
197+test("move adoption rolls back complete pages and resumes every phase after SQLite reopen", () => {
216+ const adapter = new ExperimentalMarkerProjection(db, new Graph({ storage: db }), "a.txt", "restart-moves");
218+ const input = { previous, atom: move, remove, source: "f".repeat(64), maxSteps: 1, validateSource: () => {} };
245+ const adapter = new ExperimentalMarkerProjection(db, new Graph({ storage: db }), "a.txt", "restart-moves");
254+ for (const path of ["a.txt", "b.txt"]) assert.deepEqual(adapter.lines(state, path), oracle.lines(expected, path));
256+ db.db.prepare("SELECT COUNT(*) AS n FROM state WHERE collection LIKE ?").get("%move-adoption:%")!.n,
260+ for (const phase of ["files", "resolve", "plans", "park", "place", "cleanup"]) assert.ok(phases.has(phase), phase);
267+
268+test("move application rejects damaged cursor envelopes and invalid positions without mutation", () => {
316+ if (index > 0) bad.checksum = createHash("sha256").update(JSON.stringify(bad.cursor)).digest("hex");
- MCP
- compare on this site's /mcp
- CLI
- abso diff 7 318 src/engine/test/projection-atom-adoption.test.ts --json
- JSON
- /christopher/abso-core/compare/7..318?file=src%2Fengine%2Ftest%2Fprojection-atom-adoption.test.ts&format=json