F3 hardening: observable seam misses, cheaper disk-compare, E2E ordering notes (#6)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-10 11:00:28 -07:00
parent fc5fde1cc9
commit 41b1cb4f3b
4 changed files with 49 additions and 6 deletions
+3
View File
@@ -35,6 +35,9 @@ async function externalWriteAndReload(uri: vscode.Uri, content: string): Promise
}
const settle = () => new Promise((r) => setTimeout(r, 300));
// Tests are ORDER-DEPENDENT: later tests consume earlier tests' document/sidecar
// state by design, mirroring the F2 suite. This suite owns docs/attrib.md;
// the threads suite owns docs/sample.md — keep fixtures disjoint.
suite("F3 live attribution (host E2E — seam-driven, no LLM)", () => {
const TYPED = "A human-typed sentence. ";
+9
View File
@@ -29,6 +29,15 @@ describe("PendingEditRegistry (INV-9)", () => {
reg.unregister(p);
expect(reg.match("d.md", { start: 0, end: 0, text: "x" })).toBeNull();
});
it("unregister reports whether the registration was still pending", () => {
const reg = new PendingEditRegistry();
const p = { docPath: "d.md", start: 0, end: 0, newText: "x", provenance: AGENT };
reg.register(p);
expect(reg.unregister(p)).toBe(true);
reg.register(p);
reg.match("d.md", { start: 0, end: 0, text: "x" });
expect(reg.unregister(p)).toBe(false);
});
});
describe("minimizeReplace (host diff-minimization mirror)", () => {