Files
codegraph/__tests__
Colby MchenryandClaude Opus 5.5 26d6ccece5 test(mcp): hold the watcher's sync so staleness-banner edits stay pending (#2105)
`MCP staleness banner > lists pending files under "Pending sync"` flaked in
the full suite (2 of 4 runs): status showed "0 modified" and no Pending sync
section. The tests used `debounceMs: 4000` to keep an edit pending while they
queried, but since #1397 a lone edit syncs after a 300ms quiet window whatever
the configured debounce. codegraph_status awaits a freshly spawned worker to
count changes before reading the pending set, and under load that outlasted
the window, so the sync had already cleared the entry.

A 500ms pause before the query fails the status, banner and #1968 path tests
deterministically. Hold the watcher's sync open with a never-settling spy in
those four setups instead; no assertion changes, and the test that checks the
banner drops after a sync still runs a real one.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:52:32 +00:00
..