{"path":"src/engine/test/state-source.test.ts","version":110,"newest":318,"draft":null,"agent":null,"exists":true,"lines":[{"n":1,"text":"import assert from \"node:assert/strict\";","author":"codex-capacity-chair","version":109},{"n":2,"text":"import { test } from \"node:test\";","author":"codex-capacity-chair","version":109},{"n":3,"text":"import { checkDraft, Graph, View } from \"../index.ts\";","author":"codex-capacity-chair","version":109},{"n":4,"text":"import { lines, Repo } from \"./helpers.ts\";","author":"codex-capacity-chair","version":109},{"n":5,"text":"import { SqlState } from \"./storage-helper.ts\";","author":"codex-capacity-chair","version":109},{"n":6,"text":"","author":"codex-capacity-chair","version":109},{"n":7,"text":"test(\"stored graph reopens without replay and preserves moves, conflicts and new edits\", () => {","author":"codex-capacity-chair","version":109},{"n":8,"text":"\tconst oracle = Repo.init({ \"a.txt\": lines(\"one\", \"two\", \"three\"), \"b.txt\": \"\" });","author":"codex-capacity-chair","version":109},{"n":9,"text":"\toracle.edit({ edits: [{ file: \"a.txt\", old: \"two\", new: \"TWO\" }] });","author":"codex-capacity-chair","version":109},{"n":10,"text":"\toracle.edit({ move: { file: \"a.txt\", start: 1, end: 2, to: \"b.txt\", at: 0 } });","author":"codex-capacity-chair","version":109},{"n":11,"text":"\tconst storage = new SqlState();","author":"codex-capacity-chair","version":109},{"n":12,"text":"\tconst original = new Graph({ storage });","author":"codex-capacity-chair","version":109},{"n":13,"text":"\tfor (const atom of oracle.graph.atoms()) original.add(atom);","author":"codex-capacity-chair","version":109},{"n":14,"text":"\toriginal.setLabel({ name: \"saved\", head: \"a2\", title: \"Saved\", message: \"\" });","author":"codex-capacity-chair","version":109},{"n":15,"text":"\tconst reads = storage.reads;","author":"codex-capacity-chair","version":109},{"n":16,"text":"\tconst reopened = new Graph({ storage });","author":"codex-capacity-chair","version":109},{"n":17,"text":"\tassert.equal(storage.reads, reads, \"opening does not hydrate historical collections\");","author":"codex-capacity-chair","version":109},{"n":18,"text":"\tassert.equal(storage.scans, 0);","author":"codex-capacity-chair","version":109},{"n":19,"text":"\tassert.equal(reopened.size, oracle.graph.size);","author":"codex-capacity-chair","version":109},{"n":20,"text":"\tassert.equal(reopened.lineCount, oracle.graph.lineCount);","author":"codex-capacity-chair","version":109},{"n":21,"text":"\tassert.deepEqual([...reopened.movers()], [...oracle.graph.movers()]);","author":"codex-capacity-chair","version":109},{"n":22,"text":"\tfor (const atom of oracle.graph.atoms()) {","author":"codex-capacity-chair","version":109},{"n":23,"text":"\t\tassert.deepEqual(reopened.filesOf(atom.id), oracle.graph.filesOf(atom.id));","author":"codex-capacity-chair","version":109},{"n":24,"text":"\t\tfor (const move of atom.moves ?? []) {","author":"codex-capacity-chair","version":109},{"n":25,"text":"\t\t\tassert.deepEqual(reopened.relocationsOf(move.line), oracle.graph.relocationsOf(move.line));","author":"codex-capacity-chair","version":109},{"n":26,"text":"\t\t\tassert.deepEqual(reopened.relocatedTo(move.parent), oracle.graph.relocatedTo(move.parent));","author":"codex-capacity-chair","version":109},{"n":27,"text":"\t\t\tassert.equal(reopened.codeOf(move.parent), oracle.graph.codeOf(move.parent));","author":"codex-capacity-chair","version":109},{"n":28,"text":"\t\t}","author":"codex-capacity-chair","version":109},{"n":29,"text":"\t}","author":"codex-capacity-chair","version":109},{"n":30,"text":"\tassert.deepEqual(new View(reopened, oracle.shared).files(), oracle.files());","author":"codex-capacity-chair","version":109},{"n":31,"text":"\tassert.equal(reopened.label(\"saved\")?.head, \"a2\");","author":"codex-capacity-chair","version":109},{"n":32,"text":"\tconst draft = oracle.draft({ edits: [{ file: \"a.txt\", old: \"one\", new: \"ONE\" }] });","author":"codex-capacity-chair","version":109},{"n":33,"text":"\tassert.deepEqual(checkDraft(reopened, oracle.shared, draft), oracle.check(draft));","author":"codex-capacity-chair","version":109},{"n":34,"text":"\toracle.graph.add(draft);","author":"codex-capacity-chair","version":109},{"n":35,"text":"\treopened.add(draft);","author":"codex-capacity-chair","version":109},{"n":36,"text":"\toracle.shared.add(draft.id);","author":"codex-capacity-chair","version":109},{"n":37,"text":"\tassert.deepEqual(new View(new Graph({ storage }), oracle.shared).files(), oracle.files());","author":"codex-capacity-chair","version":109},{"n":38,"text":"\tfor (let n = 0; n < oracle.graph.lineCount; n++) {","author":"codex-capacity-chair","version":109},{"n":39,"text":"\t\tconst id = oracle.graph.lineIdOf(n);","author":"codex-capacity-chair","version":109},{"n":40,"text":"\t\tassert.deepEqual(reopened.line(id), oracle.graph.line(id));","author":"codex-capacity-chair","version":109},{"n":41,"text":"\t\tassert.deepEqual(reopened.deletersOf(id), oracle.graph.deletersOf(id));","author":"codex-capacity-chair","version":109},{"n":42,"text":"\t}","author":"codex-capacity-chair","version":109},{"n":43,"text":"\tassert.ok(Object.isFrozen(reopened.atom(\"a0\")));","author":"codex-capacity-chair","version":109},{"n":44,"text":"\tstorage.db.close();","author":"codex-capacity-chair","version":109},{"n":45,"text":"});","author":"codex-capacity-chair","version":109},{"n":46,"text":"","author":"codex-capacity-chair","version":109},{"n":47,"text":"test(\"stored indexes retain multiple claimants and preserve a real divergent conflict\", () => {","author":"codex-capacity-chair","version":109},{"n":48,"text":"\tconst oracle = Repo.init({ \"a.txt\": lines(\"one\", \"two\", \"three\") });","author":"codex-capacity-chair","version":109},{"n":49,"text":"\toracle.edit({ edits: [{ file: \"a.txt\", old: \"one\", new: \"ONE\" }], author: \"left\" });","author":"codex-capacity-chair","version":109},{"n":50,"text":"\tconst right = oracle.draft({ edits: [{ file: \"a.txt\", old: \"one\", new: \"uno\" }], author: \"right\" }, [\"a0\"]);","author":"codex-capacity-chair","version":109},{"n":51,"text":"\tconst storage = new SqlState();","author":"codex-capacity-chair","version":109},{"n":52,"text":"\tconst graph = new Graph({ storage });","author":"codex-capacity-chair","version":109},{"n":53,"text":"\tfor (const atom of oracle.graph.atoms()) graph.add(atom);","author":"codex-capacity-chair","version":109},{"n":54,"text":"\tassert.equal(oracle.check(right).conflicts.length, 1);","author":"codex-capacity-chair","version":109},{"n":55,"text":"\tassert.deepEqual(checkDraft(new Graph({ storage }), oracle.shared, right), oracle.check(right));","author":"codex-capacity-chair","version":109},{"n":56,"text":"\tgraph.add(right);","author":"codex-capacity-chair","version":109},{"n":57,"text":"\toracle.graph.add(right);","author":"codex-capacity-chair","version":109},{"n":58,"text":"\tassert.deepEqual(new Graph({ storage }).writersOf(\"L:a0.0\"), oracle.graph.writersOf(\"L:a0.0\"));","author":"codex-capacity-chair","version":109},{"n":59,"text":"\tassert.deepEqual(new Graph({ storage }).deletedLines(right.id), oracle.graph.deletedLines(right.id));","author":"codex-capacity-chair","version":109},{"n":60,"text":"\tstorage.db.close();","author":"codex-capacity-chair","version":109},{"n":61,"text":"});","author":"codex-capacity-chair","version":109},{"n":62,"text":"","author":"codex-capacity-chair","version":109},{"n":63,"text":"test(\"failed stored append rolls back all graph indexes and can be retried\", () => {","author":"codex-capacity-chair","version":109},{"n":64,"text":"\tconst oracle = Repo.init({ \"a.txt\": lines(\"one\", \"two\") });","author":"codex-capacity-chair","version":109},{"n":65,"text":"\tconst storage = new SqlState();","author":"codex-capacity-chair","version":109},{"n":66,"text":"\tconst graph = new Graph({ storage });","author":"codex-capacity-chair","version":109},{"n":67,"text":"\tgraph.add(oracle.graph.atom(\"a0\"));","author":"codex-capacity-chair","version":109},{"n":68,"text":"\tconst before = JSON.stringify(graph.toJSON());","author":"codex-capacity-chair","version":109},{"n":69,"text":"\tconst draft = oracle.draft({ edits: [{ file: \"a.txt\", old: \"one\", new: \"ONE\" }] });","author":"codex-capacity-chair","version":109},{"n":70,"text":"\tstorage.failWrite = storage.writes + 10;","author":"codex-capacity-chair","version":109},{"n":71,"text":"\tassert.throws(() => graph.add(draft), /injected storage failure/);","author":"codex-capacity-chair","version":109},{"n":72,"text":"\tassert.equal(JSON.stringify(graph.toJSON()), before);","author":"codex-capacity-chair","version":109},{"n":73,"text":"\tassert.equal(JSON.stringify(new Graph({ storage }).toJSON()), before);","author":"codex-capacity-chair","version":109},{"n":74,"text":"\tstorage.failWrite = Infinity;","author":"codex-capacity-chair","version":109},{"n":75,"text":"\tgraph.add(draft);","author":"codex-capacity-chair","version":109},{"n":76,"text":"\tassert.equal(new Graph({ storage }).size, 2);","author":"codex-capacity-chair","version":109},{"n":77,"text":"\tstorage.db.close();","author":"codex-capacity-chair","version":109},{"n":78,"text":"});","author":"codex-capacity-chair","version":109},{"n":79,"text":"","author":"codex-capacity-chair","version":109},{"n":80,"text":"test(\"removing a stored label rolls back dependent rewrites on failure\", () => {","author":"codex-capacity-chair","version":109},{"n":81,"text":"\tconst oracle = Repo.init({ \"a.txt\": lines(\"one\") });","author":"codex-capacity-chair","version":109},{"n":82,"text":"\tconst storage = new SqlState();","author":"codex-capacity-chair","version":109},{"n":83,"text":"\tconst graph = new Graph({ storage });","author":"codex-capacity-chair","version":109},{"n":84,"text":"\tgraph.add(oracle.graph.atom(\"a0\"));","author":"codex-capacity-chair","version":109},{"n":85,"text":"\tgraph.setLabel({ name: \"base\", head: \"a0\", title: \"Base\", message: \"\" });","author":"codex-capacity-chair","version":109},{"n":86,"text":"\tgraph.setLabel({ name: \"child\", head: \"a0\", base: \"base\", title: \"Child\", message: \"\" });","author":"codex-capacity-chair","version":109},{"n":87,"text":"\tconst before = graph.labels();","author":"codex-capacity-chair","version":109},{"n":88,"text":"\tstorage.failWrite = storage.writes + 1;","author":"codex-capacity-chair","version":109},{"n":89,"text":"\tassert.throws(() => graph.removeLabel(\"base\"), /injected storage failure/);","author":"codex-capacity-chair","version":109},{"n":90,"text":"\tassert.deepEqual(new Graph({ storage }).labels(), before);","author":"codex-capacity-chair","version":109},{"n":91,"text":"\tstorage.failWrite = Infinity;","author":"codex-capacity-chair","version":109},{"n":92,"text":"\tassert.equal(graph.removeLabel(\"base\"), true);","author":"codex-capacity-chair","version":109},{"n":93,"text":"\tassert.equal(new Graph({ storage }).label(\"base\"), undefined);","author":"codex-capacity-chair","version":109},{"n":94,"text":"\tassert.equal(new Graph({ storage }).label(\"child\")?.base, \"a0\");","author":"codex-capacity-chair","version":109},{"n":95,"text":"\tstorage.db.close();","author":"codex-capacity-chair","version":109},{"n":96,"text":"});","author":"codex-capacity-chair","version":109}],"authors":[{"agent":"codex-capacity-chair","lines":96}],"older":{"reading":110,"newest":318,"changedSince":14},"followed":null,"life":{"versions":1,"last":{"version":109,"agent":"codex-capacity-chair","time":1791825459416,"timeIso":"2026-10-12T17:17:39.416Z","message":"Add opt-in persistent writer state, checked reopen and bounded adoption"},"made":{"version":109,"agent":"codex-capacity-chair","time":1791825459416,"timeIso":"2026-10-12T17:17:39.416Z","message":"Add opt-in persistent writer state, checked reopen and bounded adoption"},"removed":null,"next":null},"since":null,"paths":[".absoignore",".gitignore","LICENSE","README.md","abso.json","biome.json","client/.claude-plugin/plugin.json","client/README.md","client/abso.ts","client/avcs.ts","client/hooks/hooks.json","client/hooks/register.test.ts","client/hooks/register.ts","client/hooks/stamp.ts","client/install-mod.ts","client/install-view.ts","client/launch.mjs","client/scripts/import-git.ts","client/skills/abso/SKILL.md","client/src/announce.ts","client/src/api-answers.ts","client/src/api-error.ts","client/src/api.ts","client/src/args.ts","client/src/at.ts","client/src/blobs.ts","client/src/body-files.ts","client/src/box-commands.ts","client/src/box-run.ts","client/src/box.ts","client/src/changes.ts","client/src/check-ignore.ts","client/src/ci-answers.ts","client/src/ci.ts","client/src/clean-files.ts","client/src/client-version.ts","client/src/collision-text.ts","client/src/command-env.ts","client/src/commands.ts","client/src/config.ts","client/src/core.ts","client/src/diff.ts","client/src/doctor.ts","client/src/drafts.ts","client/src/env-names.ts","client/src/export.ts","client/src/fetch.ts","client/src/folder.ts","client/src/history-answers.ts","client/src/history.ts","client/src/hook.ts","client/src/install.ts","client/src/issues-wire.ts","client/src/issues.ts","client/src/join-commands.ts","client/src/key-admin.ts","client/src/lock.ts","client/src/main.ts","client/src/mcp.ts","client/src/modes.ts","client/src/open-browser.ts","client/src/orgs.ts","client/src/pipeline-commands.ts","client/src/project-file.ts","client/src/publish-commands.ts","client/src/queue.ts","client/src/record-batches.ts","client/src/review.ts","client/src/safety.ts","client/src/serve-commands.ts","client/src/settle.ts","client/src/skill.ts","client/src/state-dir.ts","client/src/status-commands.ts","client/src/tar.ts","client/src/terminal-text.ts","client/src/times.ts","client/src/versions.ts","client/src/visibility-commands.ts","client/src/visitor.ts","client/test-mods.ts","client/test/attach.test.ts","client/test/body-files.test.ts","client/test/box.test.ts","client/test/client-version.test.ts","client/test/client.test.ts","client/test/comment-parts.test.ts","client/test/diff.test.ts","client/test/doctor.test.ts","client/test/env-names.test.ts","client/test/error-sentence.test.ts","client/test/fake-server.ts","client/test/help.test.ts","client/test/ignore.test.ts","client/test/imported-history.test.ts","client/test/install.test.ts","client/test/issues.test.ts","client/test/join-signed-out.test.ts","client/test/key-admin.test.ts","client/test/key.test.ts","client/test/launch.test.ts","client/test/new-folder-dir.test.ts","client/test/open-browser.test.ts","client/test/orgs.test.ts","client/test/pipeline-commands.test.ts","client/test/queue-waiting.test.ts","client/test/record-batches.test.ts","client/test/run-key.test.ts","client/test/setup.ts","client/test/skill.test.ts","client/test/terminal-text.test.ts","client/test/times.test.ts","client/test/visitor.test.ts","client/view/.claude-plugin/plugin.json","client/view/hooks/hooks.json","client/view/hooks/register.test.ts","client/view/hooks/register.tsx","client/view/hooks/stamp.ts","client/view/types/index.d.ts","package-lock.json","package.json","scripts/check-changed.mjs","scripts/check-changed.test.ts","src/engine/build.ts","src/engine/conflicts.ts","src/engine/graph.ts","src/engine/index.ts","src/engine/keys.ts","src/engine/labels.ts","src/engine/sets.ts","src/engine/state-source.ts","src/engine/test/build.test.ts","src/engine/test/concurrent.test.ts","src/engine/test/conflicts.test.ts","src/engine/test/gen.ts","src/engine/test/graph.test.ts","src/engine/test/helpers.ts","src/engine/test/moves.test.ts","src/engine/test/properties.test.ts","src/engine/test/record-query-contract.test.ts","src/engine/test/scenarios.test.ts","src/engine/test/sets.test.ts","src/engine/test/state-source.test.ts","src/engine/test/storage-helper.ts","src/engine/test/text.test.ts","src/engine/test/view.test.ts","src/engine/text.ts","src/engine/types.ts","src/engine/view.ts","src/gitview/errors.ts","src/gitview/index.ts","src/gitview/ingest.ts","src/gitview/plain.ts","src/gitview/test/helpers.ts","src/gitview/test/ingest.test.ts","src/gitview/test/random.test.ts","src/gitview/test/view.test.ts","src/gitview/trailers.ts","src/gitview/tree.ts","src/gitview/view.ts","src/pipeline/pipeline.ts","src/pipeline/plan.ts","src/pipeline/test/pipeline.test.ts","src/pipeline/test/plan.test.ts","tsconfig.json","worker/project/add-draft.ts","worker/project/amend.ts","worker/project/announce.ts","worker/project/apply-entry.ts","worker/project/blame.ts","worker/project/change-records.ts","worker/project/changes-since.ts","worker/project/check-clash.ts","worker/project/collisions.ts","worker/project/definition-rule.ts","worker/project/definitions.ts","worker/project/draft-collisions.ts","worker/project/draft-diff.ts","worker/project/draft-state.ts","worker/project/drop.ts","worker/project/edit.ts","worker/project/express-moves.ts","worker/project/feed.ts","worker/project/globs.ts","worker/project/history.ts","worker/project/http.ts","worker/project/ingest.ts","worker/project/init.ts","worker/project/label.ts","worker/project/land.ts","worker/project/lifecycle-permit-contract.ts","worker/project/markers.ts","worker/project/memory-store.ts","worker/project/merge-identical.ts","worker/project/move.ts","worker/project/names.ts","worker/project/news.ts","worker/project/notes.ts","worker/project/operation-protocol.ts","worker/project/overlaps.ts","worker/project/path-rules.ts","worker/project/pathindex.ts","worker/project/pathkey.ts","worker/project/pluck.ts","worker/project/project-api.ts","worker/project/project-error.ts","worker/project/project-helpers.ts","worker/project/project-status.ts","worker/project/project-types.ts","worker/project/project.ts","worker/project/publish-of.ts","worker/project/publish.ts","worker/project/queue-driver.ts","worker/project/queue.ts","worker/project/record-file.ts","worker/project/record.ts","worker/project/refuse.ts","worker/project/restore.ts","worker/project/spaces.ts","worker/project/spelling.ts","worker/project/start.ts","worker/project/switch-to.ts","worker/project/sync.ts","worker/project/test/announce-person.test.ts","worker/project/test/appends.test.ts","worker/project/test/attributes.test.ts","worker/project/test/bench.ts","worker/project/test/blobs.test.ts","worker/project/test/changed-definition.test.ts","worker/project/test/changes.test.ts","worker/project/test/definitions.test.ts","worker/project/test/draft-files-kept.test.ts","worker/project/test/drop.test.ts","worker/project/test/files-reads.test.ts","worker/project/test/history.test.ts","worker/project/test/ingest.test.ts","worker/project/test/issues.test.ts","worker/project/test/labels.test.ts","worker/project/test/lifecycle-permit-contract.test.ts","worker/project/test/markers.test.ts","worker/project/test/merge.test.ts","worker/project/test/moves.test.ts","worker/project/test/named-drafts.test.ts","worker/project/test/news-times.test.ts","worker/project/test/notes.test.ts","worker/project/test/operation-protocol.test.ts","worker/project/test/order.test.ts","worker/project/test/paths.test.ts","worker/project/test/pluck.test.ts","worker/project/test/project-file.test.ts","worker/project/test/project-writer-storage.test.ts","worker/project/test/project.test.ts","worker/project/test/queue-driver.test.ts","worker/project/test/queue.test.ts","worker/project/test/queued-moves.test.ts","worker/project/test/record-idempotence.test.ts","worker/project/test/review-fixes.test.ts","worker/project/test/reviewers.test.ts","worker/project/test/same-line.test.ts","worker/project/test/spelling-clash.test.ts","worker/project/test/spelling.test.ts","worker/project/test/starting.test.ts","worker/project/test/stored-membership.test.ts","worker/project/test/tells.test.ts","worker/project/test/unseen.test.ts","worker/project/test/view-cache.test.ts","worker/project/test/where-many-agents.test.ts","worker/project/test/whole.test.ts","worker/project/test/writer-adoption.test.ts","worker/project/tree.ts","worker/project/unseen.ts","worker/project/version-log.ts","worker/project/version-meta.ts","worker/project/view-changes.ts","worker/project/views.ts","worker/project/where.ts","worker/project/whole-files.ts","worker/project/writer-agents.ts"],"working":{"version":318,"agents":[{"agent":"codex-capacity-policy","files":[{"path":"src/engine/test/state-source.test.ts","lines":[[1,89]],"shared":[[1,1]],"changes":1,"lastEdit":1792024163300}],"lastEdit":1792024163300,"note":null}]},"agentChanges":[{"agent":"codex-capacity-policy","path":"src/engine/test/state-source.test.ts","base":106,"draft":null,"lastEdit":1792024163300,"note":null,"made":true,"changed":true,"added":89,"removed":0,"blocks":[{"kind":"insert","line":0,"through":0,"removed":[],"added":["import assert from \"node:assert/strict\";","import { describe, it } from \"node:test\";","import { type AtomId, Graph, type Key, type LineId, type LineInfo, type RelocationInfo, View } from \"../index.ts\";","import type { GraphStateSource } from \"../state-source.ts\";","import type { Atom } from \"../types.ts\";","import { Repo, lines } from \"./helpers.ts\";","","/** A small independent read adapter over the accepted Graph oracle. */","function oracleSource(graph: Graph): GraphStateSource {","\tconst atoms = graph.atoms();","\tconst lineCount = atoms.reduce((n, atom) => n + atom.inserts.reduce((m, run) => m + run.lines.length, 0), 0);","\treturn {","\t\tatomCount: graph.size,","\t\tatomAt(seq: number): Atom | undefined {","\t\t\treturn atoms[seq];","\t\t},","\t\tlineAt(number: number): LineInfo | undefined {","\t\t\tif (!Number.isSafeInteger(number) || number < 0 || number >= lineCount) return undefined;","\t\t\treturn graph.line(graph.lineIdOf(number));","\t\t},","\t\tlineNumber(id: LineId): number | undefined {","\t\t\tconst n = graph.lineN(id);","\t\t\treturn n < 0 ? undefined : n;","\t\t},","\t\tclaims(key: Key) {","\t\t\treturn { writers: graph.writersOf(key), readers: graph.readersOf(key), holders: graph.holdersOf(key) };","\t\t},","\t\trelocations(line: LineId): readonly RelocationInfo[] {","\t\t\treturn graph.relocationsOf(line);","\t\t},","\t\tdependencies(id: AtomId): readonly AtomId[] | undefined {","\t\t\ttry {","\t\t\t\treturn graph.atom(id).deps;","\t\t\t} catch {","\t\t\t\treturn undefined;","\t\t\t}","\t\t},","\t};","}","","describe(\"GraphStateSource oracle contract\", () => {","\tit(\"exposes historical atom, line, claim, relocation, and dependency facts from Graph\", () => {","\t\tconst repo = Repo.init({ \"a.txt\": lines(\"one\", \"two\", \"three\"), \"b.txt\": \"\" });","\t\tconst first = repo.edit({ edits: [{ file: \"a.txt\", old: \"two\", new: \"TWO\" }] });","\t\tconst moved = repo.edit({ move: { file: \"a.txt\", start: 1, end: 2, to: \"b.txt\", at: 0 } });","\t\tconst source = oracleSource(repo.graph);","","\t\tassert.equal(source.atomCount, repo.graph.size);","\t\tfor (let seq = 0; seq < source.atomCount; seq++) {","\t\t\tconst atom = source.atomAt(seq);","\t\t\tassert.deepEqual(atom, repo.graph.atom(`a${seq}`));","\t\t\tassert.deepEqual(source.dependencies(atom!.id), atom!.deps);","\t\t}","\t\tassert.equal(source.atomAt(-1), undefined);","\t\tassert.equal(source.atomAt(source.atomCount), undefined);","","\t\tfor (const id of [\"a0.0\", \"a0.1\", \"a0.2\", `${first.id}.0` as LineId]) {","\t\t\tconst number = source.lineNumber(id as LineId);","\t\t\tassert.notEqual(number, undefined);","\t\t\tassert.deepEqual(source.lineAt(number!), repo.graph.line(id as LineId));","\t\t}","\t\tassert.equal(source.lineAt(-1), undefined);","\t\tassert.equal(source.lineAt(Number.MAX_SAFE_INTEGER), undefined);","\t\tassert.equal(source.lineNumber(\"a999.0\" as LineId), undefined);","","\t\tconst key = `L:${first.id}.0` as Key;","\t\tassert.deepEqual(source.claims(key), {","\t\t\twriters: repo.graph.writersOf(key),","\t\t\treaders: repo.graph.readersOf(key),","\t\t\tholders: repo.graph.holdersOf(key),","\t\t});","\t\tassert.ok(moved.moves?.length);","\t\tconst movedLine = moved.moves![0]!.line;","\t\tassert.deepEqual(source.relocations(movedLine), repo.graph.relocationsOf(movedLine));","\t});","","\tit(\"keeps actual View layout and conflict decisions as the independent semantic oracle\", () => {","\t\tconst repo = Repo.init({ \"a.txt\": lines(\"one\", \"two\", \"three\") });","\t\tconst left = repo.edit({ edits: [{ file: \"a.txt\", old: \"one\", new: \"ONE\" }], author: \"left\" });","\t\tconst right = repo.draft({ edits: [{ file: \"a.txt\", old: \"one\", new: \"uno\" }], author: \"right\" }, [\"a0\"]);","\t\tconst source = oracleSource(repo.graph);","","\t\tconst view = new View(repo.graph, [\"a0\", left.id]);","\t\tassert.deepEqual(view.files(), { \"a.txt\": \"ONE\\ntwo\\nthree\\n\" });","\t\tassert.deepEqual(repo.graph.writersOf(`L:a0.0` as Key), source.claims(`L:a0.0` as Key).writers);","\t\tassert.equal(repo.graph.dependsOn(left.id, \"a0\"), source.dependencies(left.id)!.includes(\"a0\" as AtomId));","\t\tassert.equal(repo.check(right).conflicts.length, 1);","\t});","});"],"now":[1,89]}]}],"overlaps":null}