Skip to content

fix(web): stop restart waits after each test - #147

Merged
cmdaltctr merged 2 commits into
v3from
fix/mcp-section-timer-flake
Oct 29, 2026
Merged

cmdaltctr merged 2 commits into
v3from
fix/mcp-section-timer-flake

Conversation

@cmdaltctr

Copy link
Copy Markdown
Owner

What

A restart wait (useReloadAfterRestart) polls the server for up to 90 s on real timers. In tests it outlived its file. A poll that landed after jsdom closed window failed the Frontend job with ReferenceError: window is not defined (run 40889383420, attributed to McpSection.test.tsx; all 2,137 tests had passed).

  • waitForRestart takes a current check and returns without another sleep once a later wait replaced it.
  • stopRestartWaits() ends every running wait; src/test/setup.ts calls it after each test.

Scores: likelihood 3 (one failure in recent runs) × impact 2 (a rerun) = 6.

Checks

  • New test "stops without another sleep once the wait is no longer current" fails without the fix and passes with it (mutation checked).
  • npm run lint, npm run typecheck, npx vitest run: 172 files, 2,138 tests, no unhandled errors.

Also checked here

This PR changes no dependency file and no ci.yml, so it is the first ordinary PR since ADR-107. Floor matrix scope should print [""] and only the base Floor resolution entry should run.

Codecov

Codecov uploads from before 13:40 UTC today went to the old repository name llamaindex-rag-mcp and stayed pending. Uploads since then go to cmdaltctr/omrs and complete. This PR's upload checks that again; no workflow change is needed if it completes.

A restart wait polls for up to 90 s on real timers. In tests it outlived
its file, and a poll after jsdom tore down window failed the run with
'window is not defined' (seen once on PR #146, McpSection.test.tsx).
A superseded wait now stops after its current poll, and the test setup
ends every wait after each test.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 36b799f and 3b2a006.

Files selected for processing: 5
  • web/index.html
  • web/src/indexHtml.test.ts
  • web/src/lib/restartWait.test.ts
  • web/src/lib/restartWait.ts
  • web/src/test/setup.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.76%. Comparing base (36b799f) to head (3b2a006).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               v3     #147   +/-   ##
=======================================
  Coverage   94.76%   94.76%           
=======================================
  Files         365      365           
  Lines       29302    29302           
  Branches     3748     3748           
=======================================
  Hits        27767    27767           
  Misses       1012     1012           
  Partials      523      523           

@cmdaltctr
cmdaltctr merged commit 9c017c8 into v3 Oct 29, 2026
17 checks passed
@cmdaltctr
cmdaltctr deleted the fix/mcp-section-timer-flake branch October 29, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant