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
Flaky tests: agents shell-owner-exit / shell-owner-isolation behavior tests fail under suite load #3863
packages/agents/src/api/__tests__/shell-owner-exit.behavior.test.ts and shell-owner-isolation.behavior.test.ts fail intermittently when the full agents suite runs (npm run test --workspace packages/agents) on a loaded macOS machine (Apple Silicon, Bun 1.3.14). Each passes when rerun alone (3/3 and 6/6).
shell-owner-exit has failed this way in four separate full runs on the issue2616-final branch. The one failure captured in detail was the fixture child process not reporting readiness in time:
error: Missing public fixture readiness: ...shell-owner-exit-fixture.ts:64
throw new Error(`Missing real group: ${group.stderr}`);
Both tests spawn real process groups, and readiness waits on wall-clock timing, so suite load decides whether they pass. CI on Linux passes.
shell-owner-exit.behavior.test.ts has now also failed when run alone, not only during the full suite. That happened once on issue2616-final at ac62c62, with load average around 37. The failure was the same readiness timeout as before (Missing public fixture readiness from shell-owner-exit-fixture.ts:64). The next two isolated runs under the same load both passed 3/3.
So the test depends on how quickly the fixture's child process group becomes ready, which machine load decides, and not only on contention from other test files.
Another test in the same category: packages/core/src/services/workspace-checkpoint-owner.test.ts, case "closes new admission synchronously while completing an admitted physical snapshot". It failed once during a full core run at load average ~35, after waiting 14 s with Physical Git commit did not start. It passes 4/4 when run alone, and nothing on this branch touched it. Like the shell-owner tests, it waits on a real child process to start, so machine load decides whether it passes.
This failed again on 2026-10-16 in a full agents suite run on the #2616 integration branch (head e600f4fa9). The only changes since the previous run touch the CLI; nothing in packages/agents changed between the two heads.
The failing case was public Agent beforeExit shell ownership > removes only the failed explicitly disposed owner before sibling natural cleanup (2.4 s). It failed in runFixture at shell-owner-exit.behavior.test.ts:110, called from line 173:
error: Missing public fixture readiness: ...helpers/shell-owner-exit-fixture.ts:64
throw new Error(`Missing real group: ${group.stderr}`);
Error: Missing real group:
group.stderr is empty, so the fixture saw no process group and got no error text explaining why. Run alone right afterwards with bun test --timeout 180000 ./src/api/__tests__/shell-owner-exit.behavior.test.ts, the file passed 3 of 3 times. The full suite reported 712 of 713 files passing, and this was the only failure.
The shell-owner-isolation half of this issue also recurred on 2026-10-16, in a full agents suite run on the #2616 integration branch. Nothing in packages/agents changed between that head and the previously pushed one.
Failing case: Public Agent managed shell ownership (#2616) > cleans a safe same-owner group and log despite another group losing ownership (5.9 s). The assertion at shell-owner-isolation.behavior.test.ts:520 (called from line 791) expects no disposal failures, but the agent's dispose rejected with:
AggregateDisposeError: Agent dispose failed with 1 error(s): Shell supervisor 43521 did not confirm group drain before its deadline; logs retained
This is a different failure mode from the earlier shell-owner-exit "Missing real group" fixture readiness: the shell supervisor's group-drain confirmation misses its deadline under suite load. The test treats a missed deadline on the safe same-owner group as a failure, so a slow drain under load fails the test even when ownership cleanup is correct.
Run alone straight afterwards with bun test --timeout 180000 ./src/api/__tests__/shell-owner-isolation.behavior.test.ts, the file passed 3 of 3 times (6 pass each). The full suite reported 712 of 713 files passing, with this as the only failure.
Activity
github-actions commentedon Oct 12, 2026
LLxprt Issue Planner — infrastructure failure
The autonomous planner failed with exit code 1. Please inspect the workflow logs (Run planner agent section) and re-run once resolved.
acoliver commentedon Oct 12, 2026
shell-owner-exit.behavior.test.tshas now also failed when run alone, not only during the full suite. That happened once onissue2616-finalat ac62c62, with load average around 37. The failure was the same readiness timeout as before (Missing public fixture readinessfromshell-owner-exit-fixture.ts:64). The next two isolated runs under the same load both passed 3/3.So the test depends on how quickly the fixture's child process group becomes ready, which machine load decides, and not only on contention from other test files.
acoliver commentedon Oct 12, 2026
Another test in the same category:
packages/core/src/services/workspace-checkpoint-owner.test.ts, case "closes new admission synchronously while completing an admitted physical snapshot". It failed once during a full core run at load average ~35, after waiting 14 s withPhysical Git commit did not start. It passes 4/4 when run alone, and nothing on this branch touched it. Like the shell-owner tests, it waits on a real child process to start, so machine load decides whether it passes.acoliver commentedon Oct 16, 2026
This failed again on 2026-10-16 in a full agents suite run on the #2616 integration branch (head
e600f4fa9). The only changes since the previous run touch the CLI; nothing inpackages/agentschanged between the two heads.The failing case was
public Agent beforeExit shell ownership > removes only the failed explicitly disposed owner before sibling natural cleanup(2.4 s). It failed inrunFixtureatshell-owner-exit.behavior.test.ts:110, called from line 173:group.stderris empty, so the fixture saw no process group and got no error text explaining why. Run alone right afterwards withbun test --timeout 180000 ./src/api/__tests__/shell-owner-exit.behavior.test.ts, the file passed 3 of 3 times. The full suite reported 712 of 713 files passing, and this was the only failure.acoliver commentedon Oct 16, 2026
The
shell-owner-isolationhalf of this issue also recurred on 2026-10-16, in a full agents suite run on the #2616 integration branch. Nothing inpackages/agentschanged between that head and the previously pushed one.Failing case:
Public Agent managed shell ownership (#2616) > cleans a safe same-owner group and log despite another group losing ownership(5.9 s). The assertion atshell-owner-isolation.behavior.test.ts:520(called from line 791) expects no disposal failures, but the agent's dispose rejected with:This is a different failure mode from the earlier
shell-owner-exit"Missing real group" fixture readiness: the shell supervisor's group-drain confirmation misses its deadline under suite load. The test treats a missed deadline on the safe same-owner group as a failure, so a slow drain under load fails the test even when ownership cleanup is correct.Run alone straight afterwards with
bun test --timeout 180000 ./src/api/__tests__/shell-owner-isolation.behavior.test.ts, the file passed 3 of 3 times (6 pass each). The full suite reported 712 of 713 files passing, with this as the only failure.