Repository navigation
test(ui-backend-claude): count relay directories in a private temp directory (#4250) - #4253
Merged
Merged
Conversation
…rectory (#4250) The relay-directory assertions diffed the shared temp directory before and after a turn, so a relay another test process created at the same time counted as this turn's: main run 44219495479 saw 2 where 1 was expected. The file now runs with a TMPDIR of its own, and relayDirs asserts it is reading that directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Independent reviewReviewed head 396a0b5 against base 7a15151. Reviewer: agent. No findings. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4253,
"head": "396a0b5e30381528a696af91906966ffe17254cf",
"base": "7a151513fc814cccb67b354d4403d41dfb7b0487",
"reviewer": "agent",
"outcome": "no-findings",
"findings": []
} |
schlessera
marked this pull request as draft
November 18, 2026 02:28
schlessera
marked this pull request as ready for review
November 18, 2026 02:28
This was referenced Nov 18, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4250 (red-main incident; this is its second declared fix). Follows #4251.
What this does
#4251 fixed the browser failure; main run 44219495479 at 7a15151 passed all three browser shards. The same run failed
unit (3)onpackages/ui-backend-claude/tests/autonomous-envelope.test.ts"finishing the turn stops its relay": expected length 1, received length 2. The incident record added that failure to #4250, so main stays red until it passes.Cause:
relayDirslistsbrain-inference-*in the sharedtmpdir(), before and after a turn starts, and expects exactly one new directory.Fix:
TMPDIRof its own, created inbeforeAlland restored inafterAll. Bun'stmpdir()readsTMPDIRon each call.relayDirsasserts it is reading that private directory, so the redirect cannot silently stop working.Proof
brain-inference-noise-*directories in/tmp. The unfixed test then fails with "Received length: 8", the main run's assertion. Fixed, the file passes 15/15, three times, under the same loop.TMPDIRredirect removed, every relay assertion fails on "relays are counted in this file's own temp directory". Restored.turn-data-tree-placement,turn-data-tree(two places) and theserver-host-relay-probefixture diff or count shared temp-directory prefixes the same way. They are filed as test: temp-directory diffs count other processes' directories (turn-data-tree, relay probe) #4252, with no milestone, to keep this declared fix minimal.check:prpasses.Collisions
bun scripts/collisions.ts --json --pr 4253at head 396a0b5: closure reports with #3059, #3069, #3581, #3622, #4151, #4234, #4238, #4248.{"version":1,"kind":"brain-check-pr-receipt","head":"396a0b5e30381528a696af91906966ffe17254cf","base":"origin/main","mode":"focused","startedAt":"2026-11-18T02:25:17.566Z","finishedAt":"2026-11-18T02:25:43.521Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12821.64194},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":105.3018140000022},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":68.17350599999918},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":17.594939999999042},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":12926.617085000002}]}🤖 Generated with Claude Code