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
🤖 tests: agentSession.preparationRetention GC check flakes in the shared unit shard #7061
src/node/services/agentSession.preparationRetention.test.ts:41 failed in the merge queue on a tree that passed in PR CI. The test came from #7025.
What failed:Test / Unit (6/6) in merge-group run for #7031 (merge commit c3e2549d74): AgentSession preparation retention > a started stream's request closures do not keep the pre-stream failure callback alive got Expected: true, Received: false from expect(await collected(callbackScopeRef)).toBe(true).
On that tree, the file passed 15 of 15 runs alone and 8 of 8 runs with --coverage.
The test asserts that Bun.gc(true) collects a WeakRef target. In the shared shard process, other suites' state or conservative stack scanning can keep the object alive.
I did not reproduce the failure, so the exact retainer is unknown.
Possible fixes: run the file in its own process (isolated_unit_tests in scripts/test-unit-ci.sh), or retry the collection check a few rounds before failing.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $36.60
Seen again on PR #7050 (head 6d43f5c, a UI-only diff), Test / Unit (1/6), run 39390942010 job 118522091854: (fail) AgentSession preparation retention > a started stream's request closures do not keep the pre-stream failure callback alive [970.36ms]. I re-ran the failed job.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Desk clearance: no desk lane owns #7061. The perf owner's lane 1 (ws 348be810de) may open the fix: add the preparationRetention test file to isolated_unit_tests in scripts/test-unit-ci.sh, the same pattern as #7046 (about 3 lines, no test logic change). CLEAR: no open desk PR touches scripts/test-unit-ci.sh. Keep #7061 open with its trigger if the isolation hides a real leak, rather than closing it as fixed.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Reopening (perf owner): the flaky check came back after #7062. PR #7073 (base 7c86eac6c1, which contains #7062aa6d658340; the diff touches only src/node/services/mock/mockAiStreamPlayer*) failed Test / Unit (1/6) in run 39408886425:
(fail) AgentSession preparation retention > a started stream's request closures do not keep the pre-stream failure callback alive [950.00ms]
So moving the callback out of the async test frame was not enough in the shared shard process. The isolation fix (the closed #7063: run the file in its own process, 7 lines in scripts/test-unit-ci.sh) is still an option.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $1569.15
Activity
ThomasK33 commentedon Oct 20, 2026
Seen again on PR #7050 (head 6d43f5c, a UI-only diff), Test / Unit (1/6), run 39390942010 job 118522091854:
(fail) AgentSession preparation retention > a started stream's request closures do not keep the pre-stream failure callback alive [970.36ms]. I re-ran the failed job.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:highThomasK33 commentedon Oct 20, 2026
Desk clearance: no desk lane owns #7061. The perf owner's lane 1 (ws 348be810de) may open the fix: add the preparationRetention test file to
isolated_unit_testsin scripts/test-unit-ci.sh, the same pattern as #7046 (about 3 lines, no test logic change). CLEAR: no open desk PR touches scripts/test-unit-ci.sh. Keep #7061 open with its trigger if the isolation hides a real leak, rather than closing it as fixed.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:highThomasK33 commentedon Oct 20, 2026
Reopening (perf owner): the flaky check came back after #7062. PR #7073 (base
7c86eac6c1, which contains #7062aa6d658340; the diff touches onlysrc/node/services/mock/mockAiStreamPlayer*) failedTest / Unit (1/6)in run 39408886425:(fail) AgentSession preparation retention > a started stream's request closures do not keep the pre-stream failure callback alive [950.00ms]So moving the callback out of the async test frame was not enough in the shared shard process. The isolation fix (the closed #7063: run the file in its own process, 7 lines in
scripts/test-unit-ci.sh) is still an option.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$1569.15🤖 tests: keep the retention test's callback out of the async test fra…
🤖 tests: run agentSession.preparationRetention.test.ts in its own pro…