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(ui-server): the files_changed workspaces/ case outruns the 30 s test limit on a loaded unit worker #4249
packages/ui-server/tests/turn-scope.test.ts "files_changed leaves out a reference clone under workspaces/ but counts every path outside it (#3793)" timed out at the 30 s per-test limit, [30000.20ms]. This was hosted candidate run 44207608156, job unit (8), for PR #4240, which touches only ui-react markdown rendering.
After the timeout, the test body was still running. Its final assertion then failed as an unhandled error between tests: BRAIN_PATHS_PAST_THE_CAP_STILL_PAUSE, with the expected count: 1001 in the diff.
Cause
The test (packages/ui-server/tests/turn-scope.test.ts:85-104) writes 1500 files under workspaces/argo/src and 1000 more in the brain, one writeFileSync at a time. Then it runs journal observations over them. That takes a few seconds on an idle machine. On the shared hosted unit worker, it ran next to the test-invocation rebuild cases, and the memory log shows the cgroup near its peak, so it ran past 30 s. Nothing in the test is wrong except its budget: the 30 s limit is a hang catch-all, not a timing claim.
Acceptance criteria
The test gives itself a budget that fits its file volume under load. Either pass an explicit timeout that scales with the work (as other heavy fixtures in packages/ui-server/tests/ do), or cut the file count to what the cap needs, for example by lowering max_files_changed.
Its assertions are unchanged: a reference clone under workspaces/ does not count, and a path outside it does, including a workspaces-old/ sibling.
The timed-out test no longer surfaces its last assertion as an unhandled error in a later test.
Delivered in #4254 (squash bd751d4 on main). The case now uses a 20-path cap and 170 files instead of 1,000 and 2,500, and its assertions are unchanged. The single-case file run dropped from about 3.3 s to 0.54 s locally. Mutation: with turn.filesChanged counting workspace paths, the case fails on WORKSPACE_CLONE_DOES_NOT_PAUSE_FILES_CHANGED.
The first candidate run (44275585611) exposed a related race in the same file: five cases observed before the sandbox's PID 1 had forked the worker shell, and under load the freezer could not confirm a stopped tree within its 5 s deadline. Those cases now wait for the shell first. The cause is inferred from the freezer code; it did not reproduce locally. The repeated-under-load determinism job passed on the merged head (run 44279379494).
Activity
schlessera commentedon Nov 18, 2026
Claimed for implementation. Claim token:
claim-e35e2578. Branch:test/4247-4249-4252-test-races.Worked together with #4247, #4249 and #4252 in one test-only PR. Collisions: closure-level only with long-lived drafts, no path collision.
test(ui-server): observe a scope worker only once its shell runs (#4249)
test(ui-server): close three test races: partial JSON lines, a slow c…
schlessera commentedon Nov 18, 2026
Delivered in #4254 (squash bd751d4 on main). The case now uses a 20-path cap and 170 files instead of 1,000 and 2,500, and its assertions are unchanged. The single-case file run dropped from about 3.3 s to 0.54 s locally. Mutation: with
turn.filesChangedcounting workspace paths, the case fails onWORKSPACE_CLONE_DOES_NOT_PAUSE_FILES_CHANGED.The first candidate run (44275585611) exposed a related race in the same file: five cases observed before the sandbox's PID 1 had forked the worker shell, and under load the freezer could not confirm a stopped tree within its 5 s deadline. Those cases now wait for the shell first. The cause is inferred from the freezer code; it did not reproduce locally. The repeated-under-load determinism job passed on the merged head (run 44279379494).