You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: MCP-to-browser propagation test fails on timing under load #1046
The simlin-serve test that checks an MCP edit reaches the browser fails now and then on timing alone.
It asserts the round trip takes under 2 s, and that time includes a debug-build server parsing, compiling, and writing the model while the rest of cargo test runs alongside it.
The test should check that the event arrives and is correct, not how fast.
Example
Seen once in the pre-commit hook, on a branch that did not touch simlin-serve; it passed on rerun:
MCP edit -> browser WS propagation must be under 2s (AC5.3 budget + 1s slack); observed 2.24s
The projectChanged event had arrived with the right source, path, and version before the timing assertion failed.
Why it matters
A red pre-commit hook on correct code blocks the commit and teaches people to rerun until green.
It is the only elapsed-time assertion in the simlin-serve tests; the others wait for an event with a timeout that trips only if it never arrives.
Fix
Delete the edit_started / propagation measurement and its assertion, and give the WebSocket wait a generous ceiling (e2e_live_update.rs uses 5 s for the same frame).
Rename the test to drop "within one second" and fix the comment, which talks about a 1 s budget the code does not check.
A real latency check belongs in a release-build benchmark, not here.
While there, api_save.rs has four 1 s timeouts on an in-process broadcast channel; widening them is free.
changed the title [-]test: e2e_mcp_browser asserts a 2s wall-clock propagation budget on a debug build under pre-commit load (flaky)[/-][+]test: MCP-to-browser propagation test fails on timing under load[/+]on Oct 12, 2026
Activity
[-]test: e2e_mcp_browser asserts a 2s wall-clock propagation budget on a debug build under pre-commit load (flaky)[/-][+]test: MCP-to-browser propagation test fails on timing under load[/+]