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.
This commit is contained in:
Neil
2026-09-12 20:13:28 -07:00
parent c42fcaa1b2
commit 310c1ea78d
@@ -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')