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
+7 -3
View File
@@ -55,11 +55,15 @@ export class PendingEditRegistry {
/**
* Remove a registration that failed to apply. Identity-based (`===`), so
* callers must keep the exact registered object; it is a no-op when `match`
* already consumed the registration.
* callers must keep the exact registered object. Returns `true` if the
* registration was still pending and was removed, `false` if it was already
* consumed by `match` (or was never registered). This lets callers detect
* seam misses for diagnosability (INV-9).
*/
unregister(edit: PendingEdit): void {
unregister(edit: PendingEdit): boolean {
const before = this.pending.length;
this.pending = this.pending.filter((p) => p !== edit);
return this.pending.length < before;
}
/**