test(ui-server): the files_changed workspaces/ case outruns the 30 s test limit on a loaded unit worker

Open Beginner friendly
#4,249 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Read packages/ui-server/tests/turn-scope.test.ts:85-104 and compare timeout settings for heavy fixtures elsewhere in packages/ui-server/tests/. Adjust the test budget or file count while preserving its assertions about reference clones, outside paths, and workspaces-old/ siblings. Run the focused test under load and confirm it completes within its budget without leaking a later assertion failure.

Written by the indexing model from the issue text.

Description

agent-ready area: ui-server priority: p3 type: test

What happens

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.
Dominant language
TypeScript
Stars
4
Forks
0
Avg merge
6h 5m
Merged PRs (30d)
730

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from schlessera/brain-kit

All issues in schlessera/brain-kit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.