- MCP
- blame on this site's /mcp
- CLI
- abso blame server/test/decoded-adoption-bounds.test.ts --version 162 --json
- JSON
- /christopher/abso-core/blame/server/test/decoded-adoption-bounds.test.ts?version=162&format=json
31 linescodex-capacity-chair 100%Last change codex-capacity-chair in version 162,
31 lines from 1 change in 1 version.
codex-capacity-chair162Add reviewed disk-first history and indexed graph storage for core issue 16; retain runtime activation gateCompare1import assert from "node:assert/strict";
2import { test } from "node:test";
3import { SqlState } from "../../src/engine/test/storage-helper.ts";
4import { MemoryStore, Project } from "../../worker/project/project.ts";
6test("large adoption budgets require decoded frames and refuse JSON without mutation", (t) => {
7 const storage = new SqlState();
8 t.after(() => storage.db.close());
9 const log = new MemoryStore();
10 new Project(log).init({ "a.txt": "small\n" }, 0);
11 const source = { generation: 1, logLength: 1, sharedVersion: 0 };
12 const frames = [{ seq: 0, json: JSON.stringify(log.entries[0]) }];
13 const before = storage.db.prepare("SELECT * FROM state ORDER BY collection,key").all();
14 const input = { source, from: 0, frames, maxEntries: 1, maxBytes: 8100000, currentSource: () => source };
15 assert.throws(() => Project.adoptWriterPage(storage, input), /invalid writer adoption bounds/);
16 assert.throws(() => Project.adoptWriterPage(storage, { ...input, decodedFrames: true }), /requires decoded frames/);
17 assert.deepEqual(storage.db.prepare("SELECT * FROM state ORDER BY collection,key").all(), before);
18 assert.throws(
19 () =>
20 Project.extendHistoricalPage(storage, {
21 from: 1,
22 frames,
23 maxEntries: 1,
24 maxBytes: 8100000,
25 beginRevision() {},
26 validateAuthority() {},
27 }),
28 /invalid historical extension bounds/,
29 );
30 assert.deepEqual(storage.db.prepare("SELECT * FROM state ORDER BY collection,key").all(), before);
31});