From 542a974c26d2930d7a9495f6ace6595f6eef545e Mon Sep 17 00:00:00 2001 From: Mitsuki Fukunaga Date: Fri, 2 Oct 2026 10:14:28 +1000 Subject: [PATCH] chore(edit-sync): drop the stale mutation counts from the supersedesIdentity comment The comment cited 5 + 2 red tests for the shouldDropBufferedForEpoch from/to swap; re-measured, the swap reds 22 tests across cm-edit-sync.test.ts, editor.test.ts and shell.test.ts. Counts drift with every added test, so name the files that hold the direction instead. --- src/webview/cm/edit-sync.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/webview/cm/edit-sync.ts b/src/webview/cm/edit-sync.ts index 8780f446..f64fc041 100644 --- a/src/webview/cm/edit-sync.ts +++ b/src/webview/cm/edit-sync.ts @@ -401,10 +401,9 @@ export function createEditSync(opts: EditSyncOptions): EditSync { // until a same-generation foreign advance arrives. The named fields, not // argument positions, are what keep the call sites readable and typo-proof; // the DIRECTION is held by behaviour, not by the naming. - // Measured: swapping `from`/`to` reds 7 tests either way — the acksInFlightEdit - // swap reds 4 in cm-edit-sync.test.ts plus 2 in editor.test.ts's (d3) block - // and 1 in shell.test.ts; the shouldDropBufferedForEpoch swap reds 5 in - // cm-edit-sync.test.ts plus the same 2. Do not delete those in a tidy-up. + // Measured: swapping `from`/`to` at either call site reds tests across + // cm-edit-sync.test.ts, editor.test.ts and shell.test.ts. Those tests are what + // hold the direction — do not delete them in a tidy-up. // // Two consumers read it, and they MUST agree — that is the point of sharing // one predicate rather than two hand-written copies. `shouldDropBufferedForEpoch`