From 310c1ea78d4caed67dd4ba63f637f2df80fff1ed Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 12 Sep 2026 20:13:28 -0700 Subject: [PATCH] test(resource-manager): repair the merge-call ratchet anchor The ambiguous-id fix added `ambiguousWorktreeIds` after `worktreeById` in the mergeSnapshotAndSessions call, so the parity test's end anchor no longer matched: indexOf returned -1 and slice(start, -1) silently widened the scan to the rest of the file. The test still passed but stopped pinning the merge call site. Verified: removing `...resourceSessionBindings` now fails the test again. --- .../status-bar/resource-session-classification-parity.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/components/status-bar/resource-session-classification-parity.test.ts b/src/renderer/src/components/status-bar/resource-session-classification-parity.test.ts index fafe3cc155b..ec7c7a62848 100644 --- a/src/renderer/src/components/status-bar/resource-session-classification-parity.test.ts +++ b/src/renderer/src/components/status-bar/resource-session-classification-parity.test.ts @@ -16,7 +16,7 @@ describe('resource session classification parity', () => { const source = readFileSync(DERIVED_MODEL_PATH, 'utf8') const mergeCall = source.slice( source.indexOf('mergeSnapshotAndSessions(resourceSnapshot'), - source.indexOf('worktreeById\n })') + source.indexOf('ambiguousWorktreeIds\n })') ) expect(mergeCall).toContain('...resourceSessionBindings')