Repository navigation
Description
Context
#1806 combined-state verification recorded one unexplained native promotion failure on 2026-10-14. Combined tree f675f9878ff9e932099995fe57c379e62be92169 merges transcript head a84402b6ecb77c37f311cff36922ce6a4f488ca9 with main 25899b1e5829b9d7593ed56e2ae3f6fe271b72f0.
bun run test tests/leakage-gate.test.ts tests/decision-citations.test.ts packages/ui-sdk/tests/transcript-store.test.ts packages/ui-backend-claude/tests/worker.test.ts packages/ui-render-puppeteer/tests/png-bounds.runtime.test.ts with required real Chrome reported 100 pass / 1 fail. The real worker linked-turn-temp test asserted child exit zero, then readFileSync of the expected promoted report.pdf threw ENOENT. The original run did not print the promotion records or sandbox area state. All transcript, renderer, citation and leakage cases passed. No product or test repair is claimed.
The test body predates the main cleanup in #1882; that PR only extends this file's cancellation cases. This observation does not establish a new cleanup regression. Current source navigation at inspected main: the successor is a real worker preserves native answer bytes while fresh UI history links the promoted copy (#2049) (packages/ui-backend-claude/tests/worker.test.ts:78), and promotion is constructed by const promoter (packages/ui-backend-claude/src/worker-spawn.ts:249). These current pointers do not change the historical source or command above.
Diagnostic controls on unchanged combined source: printing the already-collected promotion records before the assertions yielded the expected promotion and a writable scratch area, with the named test passing. The temporary print was restored. A transcript-then-worker differential passed 27 tests; leakage/citation-then-worker passed 62. Neither reproduces the original failure or proves its cause. A suspected JSONL terminator was inspected and is correctly escaped; no terminator change was made. Searches for the exact test title and worker/JSONL findings found no open matching investigation; completed #1655 supplies feature context, not this recurrence diagnosis.
Out of scope
Changes to transcript-store recovery, removing the native test, retries to claim green, weaker promotion assertions, speculation that the recent cleanup or transcript tests caused the failure, or changes to production promotion policy without causal evidence.
Scope
Capture the precise missing native promotion boundary under the original multi-file setup, retaining worker exit, collected promotion/refusal records, runtime-state-save outcome and writable-scratch selection. Diagnose fixture contamination, resource/native ownership or a production-path failure before choosing a repair.
Acceptance criteria
- Reproduce the original ENOENT with named boundary evidence, or document a bounded non-reproduction with exact source/runtime/setup and the minimum evidence required on recurrence.
- Distinguish whether promotion was absent, refused, copied to another domain or subsequently removed; inspect the actual collected records and owned lifecycle.
- Preserve the existing exit-code, saved-file bytes, transcript rewritten-link and governance-record assertions, worker sandbox and network guards.
- Any demonstrated repair has an intended failing-first and restored semantic mutation receipt plus current selected hosted proof; a diagnostic pass alone is not a repair.
Verification
Use keyless real Linux worker tests with the original multi-file order and independent named/differential controls. Assert child exits and retain diagnostic boundaries before cleanup. Keep historical failed evidence separate from later passing controls.
Contract impact
None established. Investigation needs original-failure reproduction/boundary evidence before implementation readiness. No release milestone or priority inferred.
2026-10-16 source clarification at main 7d1a31d09b96739a85bff5151cc2e1300c9ac4d0: the active native promotion subject is now named a real worker preserves native answer bytes while fresh UI history links the promoted copy (#2049) (test.skipIf, packages/ui-backend-claude/tests/worker.test.ts:78-125); copy-out/promotion at that SHA was (const promoter, packages/ui-backend-claude/src/worker-spawn.ts:198-212). The old linked-turn-temp name/ranges above describe the historical occurrence. A new post-native-exit cancellation control failed earlier on null wrapper exit while retaining the promoted file; it does not reproduce the historical zero-exit ENOENT. Preserve needs: repro and the original scope; see the dated comment for baseline, controlled and restored receipts.
2026-10-21 source reconciliation at main c2f080f20a31224a1eeccde321c574292eaedb02: the current native successor remains (test.skipIf, packages/ui-backend-claude/tests/worker.test.ts:78-125); promotion, state copy-out and report delivery are now (const promoter, packages/ui-backend-claude/src/worker-spawn.ts:203-220). The preceding ranges retain their historical source context. Later publication-order, restrictive-permission, real descriptor-reuse/GC, existing-hosted-evidence and leaked-mount controls did not reproduce the original zero-exit ENOENT. Retain needs: repro and native parent #736; a failing promotion/destination lifecycle receipt is still missing. No additional unchanged runtime run or correction is claimed.
Current control and recurrence protocol — 2026-10-24
The current successor is a real worker preserves native answer bytes while fresh UI history links the promoted copy (#2049) (test.skipIf, packages/ui-backend-claude/tests/worker.test.ts:78-127). The original linked-turn-temp receipt remains tied to its historical source; the current test additionally retains native transcript byte identity while checking the promoted file, fresh replay and promotion record.
At main dc5d3c73282c29a3f0098306d398743ee18ec791, Bun 1.4.2, one bounded current-source control ran:
scripts/test-offline.sh -- bun run test ./packages/ui-backend-claude/tests/worker.test.ts --test-name-pattern 'a real worker preserves native answer bytes'
Exit 0; 1 test / 5 assertions passed in 429.44 ms, with 7 other cases explicitly filtered out. This is a single isolated successor-test control after the worker changes, not the original multi-file ordering or a causal reproduction. No diagnostics or code were changed. On recurrence retain the worker exit, promotion/refusal records and actual destination/scratch state before cleanup; the original ENOENT remains unexplained and needs: repro remains.
2026-10-24 continued triage at main dc5d3c73282c29a3f0098306d398743ee18ec791: Recorded a fresh bounded offline run of the current native promotion successor and its exact filter/limits. The original combined-run ENOENT and historical anchors remain intact; the passing current control is not a repair or complete multi-file proof.
Triage 2026-11-03 at main 3d3516a0247702560c09c5a0889bdec39b8313fb: corrected the moved current successor citation. Promotion, state copy-out and the promotion report are now at (const promoter, packages/ui-backend-claude/src/worker-spawn.ts:238-255). Earlier dated ranges keep their historical sources. No recurrence was found in failed main CI runs from 2026-10-29 to 2026-11-03, and no new runtime result is claimed. needs: repro remains.
Current source navigation — 2026-11-05
The native successor remains (test.skipIf, packages/ui-backend-claude/tests/worker.test.ts:78-127); current promotion and copy-out start at (const promoter, packages/ui-backend-claude/src/worker-spawn.ts:240-257). Earlier dated ranges identify their own inspected revisions. The original zero-exit ENOENT still lacks a failing promotion/destination lifecycle receipt; all recorded passing controls remain non-reproductions.
2026-11-05 triage at main 35217d283b849b5ef81700d5d4c2ec7486405d12: Refreshed the current promotion anchor; retained the unexplained original zero-exit ENOENT and needs: repro without repeating passing controls. Existing rulings, historical receipts and remaining qualification requirements are preserved; no runtime result or causal repair is claimed.
2026-11-11 triage at main 3c44ac6fc56d27675dadaf38a16254db53c39f69: Refreshed the current native promotion successor and constructor pointers. The historical failure, later test-health non-reproduction and needs: repro remain distinct.
Activity
schlessera commentedon Oct 14, 2026
2026-10-14 triage at main
155dffdd8237a1543da3109f3de0b659cfac5c93: wanted unscheduled native promotion reliability is p2. Preserve needs:repro, native parent #736 and no agent-ready; recorded passing controls do not explain the original ENOENT. No duplicate runtime run or repair claim.schlessera commentedon Oct 15, 2026
2026-10-15 bounded reproduction attempt at main
400c50ed231f33eeca875ec9223b24ad535b2b22.Different condition from the recorded controls: retained the complete original five-file set, then randomized test order with a fixed seed and reran each file three times within the same test invocation. This exercises repeated fixture/mock teardown in one Bun process, rather than the previously recorded two-file differential or pre-assertion promotion print alone.
Linux, Bun 1.4.2, bubblewrap available, Chromium 152.0.7977.82. Network preload, worker namespaces, original exit/bytes/rewritten-link/governance assertions and renderer guards remained enabled. No credentials or external inference were used.
Commands (from an isolated built checkout):
The unchanged baseline passed 101/0 (9.12s); the randomized repeated invocation passed 303/0 (28.27s), with no skips. The linked-turn-temp subject executed four times total. The latter invocation temporarily printed diagnostics after
await spawner.finish(), so printing did not delay the promotion boundary. All three diagnostic observations had child exit 0, exactly one 28-bytepromotionto the expected turn destination, writable scratch, a present destination and saved transcript, and no reported spawner failure. The original semantic assertions then passed. The temporary probe was restored and the checkout is clean.This is a bounded non-reproduction, not a repair or evidence that the historical failure cannot recur. It does not recreate historical combined tree
f675f987, historical host load, or every interleaving; the randomized flag also does not establish cross-file concurrency. Current source anchors still identify the linked-turn-temp test (packages/ui-backend-claude/tests/worker.test.ts:77-113) and post-exit copy-out/promotion (packages/ui-backend-claude/src/worker-spawn.ts:195-204).Retain
needs: repro, p2, native parent #736 and noagent-ready. The next useful recurrence receipt must capture the failing worker's collected promotion/refusal records,spawner.failure()/copy-out error, writable scratch selection and saved transcript presence/content shape before fixture cleanup; if a promotion record exists, retain destination existence immediately after promotion and immediately before the failing read to distinguish missing copy from later removal. Passing observations above do not settle that boundary.schlessera commentedon Oct 15, 2026
2026-10-15 additional bounded attempt at immutable main
3100afa2b8efa25ea31114cdee1f2a89a48dd013: not reproduced.This approach differs from the earlier single-process randomized reruns: three fresh Bun test processes retained the original five-file selection/order, and a temporary lifecycle probe observed destination existence at report delivery, after
spawner.finish(), and again after a 500-ms hold before the original assertions. The hold specifically gives subsequent removal an observation window. It is a diagnostic perturbation, not an unchanged-fixture baseline or a repair.Setup: isolated detached checkout, exact-SHA built package outputs, Linux x86_64 / WSL2 kernel 6.18.33.2, Bun 1.4.2, bubblewrap 0.9.0, actual renderer executable
/usr/bin/google-chrome-stable(140.0.7339.127). Each invocation used a separate cache directory. Other local issue investigations were active on the same host; this is not pristine hosted-CI reproduction. Original network preload, worker namespaces, offline renderer guards and exit/bytes/rewritten-link/governance assertions remained enabled; no inference or credentials were needed.Repeatable probe: in the linked-turn-temp test (
packages/ui-backend-claude/tests/worker.test.ts:77-113on the inspected source), keeprecords.push(...found)in the promotion report callback and additionally print{found, present: existsSync(join(brain,.brain/scratch/turns/${turnId}/report.pdf))}. Immediately afterawait spawner.finish(), print{code, failure: spawner.failure(), records, areas: sandbox.areas.map(a => ({name: a.name, writable: a.mount.writable})), present: existsSync(join(brain,.brain/scratch/turns/${turnId}/report.pdf)), transcript: existsSync(join(saved, project,${session}.jsonl))}. Thenawait Bun.sleep(500), print destination existence again, and retain every existing assertion and cleanup. Production copy-out/promotion remains unchanged (packages/ui-backend-claude/src/worker-spawn.ts:195-204).Run that diagnostic selection three times as separate processes:
Observed: all three commands exited 0; each passed 101 tests, 0 failures, 432 assertions, with no skips (9.41s, 9.71s, 8.52s). In all three subject executions:
promotionto the expected turn destination, which already existed at callback delivery.The temporary probe was restored; the isolated checkout is clean. This excludes neither a short-lived disappearance between observations nor observer-induced scheduling effects, and does not recreate the historical combined SHA or unknown original load. No natural ENOENT or causal boundary was captured.
Label reconciliation: retain
type: test,area: backends,priority: p2,needs: repro; retain native parent #736 and leaveagent-readyabsent. Passing controls do not resolve the missing original-failure evidence. On recurrence, preserve the failing worker's promotion/refusal records, copy-out error /spawner.failure(), writable area selection, saved transcript and destination existence at report delivery versus failing read before cleanup. That receipt is still needed to distinguish absent/refused promotion from subsequent removal.schlessera commentedon Oct 15, 2026
2026-10-15 distinct bounded cross-checkout overlap attempt at inspected main
d2b4cf941498d1276deee8acf42f411b7d1c8090: original missing promotion not reproduced.Previous controls used randomized repetitions in one process or three sequential fresh processes with a 500ms hold. This experiment launches two ordinary Bun test processes concurrently in separate isolated exact-source checkouts. Each retains the original five-file selection/order and repeats each file three times. This introduces independent worker/Chrome activity across processes without changing test isolation or disabling the workspace lease. The subject records destination existence at promotion-report delivery and after finish, buffers those observations in memory, and prints only in finally after the original semantic assertions. There is no intentional wait or console print before the target read; the extra synchronous existence reads remain an observer perturbation.
Both corrected invocations exit 0: 303 pass, 0 fail, 1,296 assertions each, no skips, 16.55s and 16.08s. Across all six subject executions, the report contains exactly one expected 28-byte promotion; the destination exists at report delivery and after finish; worker exit is 0, no spawner failure is reported, scratch is writable, and the saved transcript exists. Original saved-file bytes, rewritten answer link and exact promotion-record assertions pass. Real renderer cases also run under required Chrome. These observations do not explain the historical ENOENT or prove a short-lived disappearance impossible.
Repeatable command in each of two independent checkouts, launched concurrently:
BRAIN_REQUIRE_CHROME=1 bun run test tests/leakage-gate.test.ts tests/decision-citations.test.ts packages/ui-sdk/tests/transcript-store.test.ts packages/ui-backend-claude/tests/worker.test.ts packages/ui-render-puppeteer/tests/png-bounds.runtime.test.ts --rerun-each=3Linux, Bun 1.4.2, bubblewrap 0.9.0, real Chrome 140.0.7339.127. Exact-SHA donor dependencies/builds were copied; donor/shared checkout unchanged. Network preloads, worker namespaces, offline renderer guards, original child-exit/byte/transcript/governance assertions and deadlines remain active. Other independent investigations were active on the host; this is neither load-free CI nor the historical combined source
f675f987.Setup limits are retained explicitly: initial archive copies lacked Git metadata, so three earlier invocations were non-green at the citation scanner's
git ls-filesboundary (288 pass / 3 fail / 3 errors each), while their promotion subjects passed. Those are setup failures, not promotion reproductions. The first two invocations also serialized correctly under their shared checkout lease. After creating isolated Git indices for the inspected source, the two corrected invocations above used distinct roots concurrently. No lease or citation guard was bypassed, and the corrected results are not a product-repair claim.Temporary instrumentation is restored in both checkouts; tracked diffs are empty. Source anchors remain the linked-turn-temp test (
packages/ui-backend-claude/tests/worker.test.ts:77-113) and post-exit copy-out/promotion (packages/ui-backend-claude/src/worker-spawn.ts:195-204). Retained local artifacts include every initial/corrected log and exit, the exact probe patch, six report/finish observations and summary. No upload or implementation.Retain open state,
type: test,area: backends,priority: p2,needs: repro, native parent #736, and noagent-ready; label delta none. Next useful experiment is the original historical combined tree with these boundary snapshots and its dependency/build identity retained, or a natural recurrence receipt containing promotion/refusal records, copy-out/spawner failure, scratch selection, saved transcript and destination state at report delivery versus failing read before cleanup. Current passing overlap controls cannot replace that missing failure boundary.schlessera commentedon Oct 15, 2026
2026-10-15 distinct historical merge-input experiment: the original missing promotion was not reproduced.
Unlike the preceding newer-main repetition/overlap attempts, this pass reconstructed the two recorded historical inputs: transcript head
a84402b6ecb77c37f311cff36922ce6a4f488ca9and main25899b1e5829b9d7593ed56e2ae3f6fe271b72f0.git merge-tree --write-treeproduced clean tree49e3260512b053a5a801a0b8a2b53e3aa09dd71d. The reported combined identityf675f9878ff9e932099995fe57c379e62be92169is absent from the available local object database and GitHub's commit lookup; this is a reconstruction of its stated inputs, not verified identity with that missing object.An isolated checkout used that tree, its unchanged frozen lockfile (SHA-256
92a734b4d010bb85631c9bc03b47102660afa722c3039db165ed9aa3c042c7c0), and freshly built package outputs. Frozen install and independent build both exited 0; internal workspace links resolved inside this checkout. Installed Claude Agent SDK 0.3.293, Puppeteer Core 25.12.0, TypeScript 6.0.3. Runtime: Linux x86_64, kernel 7.2.5-3-omarchy, Bun 1.4.3, bubblewrap 0.12.0, Chromium 152.0.7977.82. The Bun version differs from the prior 1.4.2 controls; historical host load is unknown.Executed the original five-file selection twice as fresh ordinary processes: once unchanged, then once with buffered observations confined to the linked-turn-temp test. Each invocation had a 180-second outer termination bound:
timeout --signal=TERM --kill-after=10s 180s env BRAIN_REQUIRE_CHROME=1 bun run test tests/leakage-gate.test.ts tests/decision-citations.test.ts packages/ui-sdk/tests/transcript-store.test.ts packages/ui-backend-claude/tests/worker.test.ts packages/ui-render-puppeteer/tests/png-bounds.runtime.test.tsBoth exited 0: 101 pass, 0 fail, 432 assertions, no skips in 10.32s and 9.96s. The promotion subject ran twice; actual offline Chromium cases also ran. The diagnostic observation recorded one expected 28-byte
promotion, destination present at report delivery, afterspawner.finish()and immediately before cleanup, child exit 0, no reported spawner failure, writable scratch, and a saved transcript containing the rewritten destination. Original saved-byte, rewritten-link and exact-record assertions passed.The probe buffered existence/record snapshots and printed only from
finally; it added no deliberate wait. Its additional synchronous observations still perturb scheduling. Source anchors verified on the reconstructed tree: the linked-turn-temp test (packages/ui-backend-claude/tests/worker.test.ts:77-110) and the promoter/copy-out boundary (packages/ui-backend-claude/src/worker-spawn.ts:195-204). Network preloads, worker namespaces, offline renderer guards, assertions and per-test deadlines remained enabled.This is bounded non-reproduction, not a repair, causal classification or proof that the historical failure cannot recur. A natural recurrence still needs promotion/refusal records, copy-out/spawner failure, scratch selection, saved transcript and destination state at report delivery versus the failed read before cleanup. No new implementation readiness follows.
Retain
type: test,area: backends,priority: p2,needs: repro, native parent #736 and noagent-ready; label delta none. The probe was restored and the reconstructed tree reverified, then the owned worktree was removed. Its directory/registration, native test processes and recorded fixture roots are absent. Logs, patch, runtime/source identities and cleanup receipts remain in the local durable evidence directorybrain-repro-evidence-1902. No fixes or PRs.schlessera commentedon Oct 16, 2026
Native filesystem-operation trace — 2026-10-16. Read the complete issue and all five prior controls. At independently frozen-installed/full-built main
55dbf1cf5e92cc084d3fde99c6e5c409854f7465, observed the actual create/read/unlink interval instead of more existence snapshots, waits, randomized repeats or cross-checkout overlap. Bun 1.4.3, Linux, required real/usr/bin/chromium, original worker namespaces, test preload and renderer isolation retained.The unchanged original five-file selection runs under strace 7.0 with
openat,rename,renameat,renameat2,unlink,unlinkat,mkdir,mkdirat,rmdir,link,linkat,copy_file_range, PID-separated absolute timestamps and decoded fd paths:BRAIN_REQUIRE_CHROME=1 PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium strace --kill-on-exit -ff -ttt -yy -s 512 -e trace=openat,rename,renameat,renameat2,unlink,unlinkat,mkdir,mkdirat,rmdir,link,linkat,copy_file_range -o /tmp/brain-repro-pass/1902-trace/native bun run test tests/leakage-gate.test.ts tests/decision-citations.test.ts packages/ui-sdk/tests/transcript-store.test.ts packages/ui-backend-claude/tests/worker.test.ts packages/ui-render-puppeteer/tests/png-bounds.runtime.test.tsActual: exit 0, 101 pass / zero fail / 432 assertions, 7.86s, no skips. The native promotion subject passes its original exit, exact saved bytes, rewritten transcript link and exact governance-record assertions.
The kernel trace records the worker's scratch
report.pdfcreate at 1792161309.515237. The host opens the expected promoted turn destination with O_CREAT|O_EXCL at 1792161309.535579; the original assertion's read opens that same destination successfully at 1792161309.537722. The first recorded unlink of that destination is 1792161309.541333, in fixture cleanup after the read. No intervening destination removal is recorded. This supplies a syscall timeline for one successful promotion; it does not explain the historical ENOENT or rule out another lifecycle.A preceding recursive fs.watch diagnostic also passed the same 101 cases/432 assertions (5.40s), but its event buffer was empty despite the successful file creation. That observer is unqualified for detecting the relevant lifecycle and is not used as evidence that no removal occurred. It was restored byte-for-byte before the syscall run. Tracing itself perturbs scheduling; this is current main, not verified identity with the unavailable historical combined object. No product, assertion, deadline, scratch policy or guard was changed.
Full logs/exits and native traces remain locally in
/tmp/brain-repro-pass/(1902-*,1902-trace/); source is restored. Retain needs: repro, type/area/p2/native parent and no agent-ready. A naturally failing read still needs its promotion/refusal/copy-out outcome and destination lifecycle before cleanup. The trace now distinguishes create/read/cleanup order without a test-side pre-read wait, but no cause, repair or broader qualification follows from this passing receipt.schlessera commentedon Oct 16, 2026
This pass tested turn cancellation triggered by the real native worker's exit, rather than another file observer, filesystem trace or removal wait. Main
7d1a31d09b96739a85bff5151cc2e1300c9ac4d0, Bun 1.4.3, independently installed/built checkout.The original five-file selection first passed 101 tests, 0 fail, 433 assertions, 11.05 s. Real Chromium was required. The qualified offline launcher preserves the current UID, brings loopback up, then drops inherited/ambient/bounding capabilities before running the normal wrapper, matching the repository's namespace-entry pattern. Two earlier launcher preparations are kept separately: root mapping caused 20 Chromium launch failures; retaining setup capabilities as nonroot made four native worker cases refuse bubblewrap. Neither reached a valid combined behavioral baseline or reproduces promotion loss. No browser sandbox or worker guard was disabled to correct setup.
The diagnostic used one retained AbortController for the target fixture's turn, then registered a
workerStartedobserver that aborts it when the actualworker.exitedpromise resolves. All original assertions remain; the original five-file combination runs again. Result: 100 pass / 1 fail, 429 assertions, 7.74 s, exit 1. Crucially, this is not the reported ENOENT: native exit was 0, but the exposed wrapper exit became null and the originalexpect(code).toBe(0)failed first. At that point there was exactly one correct 28-byte promotion, writable scratch, the expected destination file and saved transcript present, and nospawner.failure()value. The file-byte/history assertions were not reached in that arm.Restoring the fixture and running the named native case gives 1 pass / 0 fail / 7 filtered, five assertions, 526 ms; all original byte/history/governance checks execute. Temporary source was restored. This particular post-native-exit cancellation changes exit reporting while preserving promotion; it does not establish that every cancellation phase behaves the same, or explain the historical zero-exit/missing-file result.
Current source naming has changed: the subject is now
a real worker preserves native answer bytes while fresh UI history links the promoted copy (#2049)(test.skipIf,packages/ui-backend-claude/tests/worker.test.ts:78-125); copy-out/promotion is at (const promoter,packages/ui-backend-claude/src/worker-spawn.ts:198-212). Historical combined-tree receipts remain immutable. Keepneeds: repro; no product defect, repair or complete hosted proof is inferred from this controlled cancellation.schlessera commentedon Oct 17, 2026
2026-10-17 — NOT REPRODUCED; retained hosted-CI evidence.
The new dimension is mining existing GitHub Actions checkout receipts, JUnit and full job logs for natural occurrences, rather than creating another local execution or observer perturbation. Prior approaches covered combined/differential selections and promotion prints; randomized same-process repetitions; fresh processes/caches with a 500-ms hold; cross-checkout overlap; reconstructed historical merge inputs; fs.watch/native syscall tracing; and native-exit-triggered cancellation. None recorded this hosted-evidence search.
Inspected main
dcc09e9c8601f6513eec907cfbf7d3ffbc01bf16; current citations remain valid: (test.skipIf,packages/ui-backend-claude/tests/worker.test.ts:78-125) and (const promoter,packages/ui-backend-claude/src/worker-spawn.ts:198-212). Local Bun 1.4.3 was used only for the leakage gate. No local test, new workflow, source instrumentation or branch was created.Inventoried 60 main CI runs, then downloaded all four unit artifacts from 12 completed push/scheduled runs (48 archives). Six selected the subject; six did not and supply no subject coverage. Also inspected the original transcript PR's CI and its delivered main CI. Checkout manifests and actual checkout logs agree on every SHA below. All are attempt 1.
5a7db9381c3c6b3609618de092f5085f7f8ea534d6ad60a26119978e70a5ad1f1dbcb8fbbf3a9faea769d0f184bfc44f10015ff5cfa1660501f85f4c0316ccfc326e2d8d5c9558ecd1bf9d151b6e7e18a90490e023643e78d5c032ec7b5735967fe3ffa5a90490e023643e78d5c032ec7b5735967fe3ffa529f8527d40caefa59493d45bdaaf2cb1e4c4ba6c1977f525ebfb3a6fa0480237764e168211ed4a9bResult: eight distinct subject passes, zero observed subject failures/skips. Combined and per-worker XML were deduplicated. The first two execute the original four assertions; the newer subject retains exit/file/promotion checks and adds native-byte/fresh-history proof under #2049. Hosted runtime logs show Bun 1.4.2 (744846f84) throughout, real Chrome 154.0.8037.97 for the historical pair and 155.0.8059.39 for the six newer cases. These are existing guarded native executions through
scripts/test.ts --timeout 30000; no assertion, preload, sandbox or deadline was modified.Four relevant jobs succeeded (historical pair, 38972819385, 39020903910); four failed elsewhere. The scheduled job exits 1 after unrelated failures and termination of another worker (script exit 143). Its promotion case explicitly passed beforehand but is absent from final XML. Therefore absent XML is not counted as a failure, skip or nonexecution, and these subject passes do not claim complete green runs. The original local failing run's promotion/copy-out boundaries remain unavailable.
Command forms used by the bounded collector (outputs saved in scratch); run/job IDs are linked above and artifact IDs come from each run's artifact response:
The 12-run artifact sample:
39022626205 39021498615 39020903910 39019902195 38998866934 38972819385 38971682118 38965431017 38958535376 38949349901 38947337609 38945512386. All metadata/log/artifact retrievals succeeded (exit 0); the local XML/log summarizer exits 0 in 0.69 s. Historicalunit-proof-1throughunit-proof-4artifacts were additionally retrieved withtimeout 50s gh run download "$run" -R schlessera/brain-kit -n "unit-proof-$shard" -D <scratch>/.... Logs, archives, exact selections and the summarizer remain in scratch.This bounded search establishes no natural or induced ENOENT and no causal trigger or fix. Retain
needs: reproand all other labels; no body correction is warranted. No milestone, assignee, priority or parent changed. No diagnostic edits required restoration; checkout remains clean and detached, with no branch or hosted experiment left behind.schlessera commentedon Oct 17, 2026
2026-10-17 — NOT REPRODUCED; local restrictive-permissions control.
New dimension: run the real worker/promotion fixture under inherited umask 077, rather than preceding-file order, randomized repetition, cross-checkout overlap, historical merge reconstruction, filesystem observers or native-exit cancellation. This varies the creation permissions of the actual scratch/state/promoted files; no promotion policy or wait changes.
Command:
(umask 077; TMPDIR=<disk-backed scratch> timeout --signal=TERM --kill-after=10s 90s bun run test ./packages/ui-backend-claude/tests/worker.test.ts --test-name-pattern "a real worker preserves native answer bytes while fresh UI history links the promoted copy").1 pass / 0 fail, seven intentionally filtered, five assertions, exit 0, 1.106s runner / 545.29ms target. The current native successor test performs real worker exit/finish, exact promoted report readback, unchanged native transcript bytes, fresh history link normalization and exact promotion records. No ENOENT recurs. No authored source changes.
Environment: Local shared Linux host at
9d5cd00b7646ffee951c7a29a38717989f7fd868, Bun 1.4.3, real bubblewrap sandbox and native worker. Independent frozen dependencies and completed initial build; normal guarded wrapper/preload, disk-backed fixtures. umask 077 is deliberately supplied to this process tree only. Host concurrency/resource pressure is uncontrolled and not measured; no CPU/memory quota. Current #2049-extended test is not an exact replay of the original historical five-file command or remote CI/production.Keep
needs: repro. Restrictive creation permissions do not expose the missing-promotion boundary in this local control. No historical permission, starvation, cleanup cause or repair is established; original failure and missing contemporaneous promotion/runtime-state evidence remain. Full command/log/exit receipts and any diagnostic source are retained in this pass's local artifact directory.schlessera commentedon Oct 17, 2026
2026-10-17 — NOT REPRODUCED: live tmpfs descriptor reuse plus forced garbage collection.
Tested detached main
12d5ba62e6265876236ac9449f824dfc04c88e5a, Linux x86_64, Bun 1.4.3 (c6da4a4d3), bubblewrap 0.12.0, actual offline Chromium 152.0.7977.82. Frozen install and full build exited 0. The experiment used a private network namespace with loopback enabled, then dropped setup capabilities; CPU affinity was limited to 0–3. Network preloads, worker namespaces, renderer isolation, original deadlines and every original assertion remained enabled.New dimension: explicitly reuse retired extra-stdio pipe descriptor numbers for the real worker's retained runtime-state/turn-temp mounts, then collect the retired child objects while those mounts are live. Previous attempts varied:
Hypothesis: a stale subprocess finalizer closing a recycled mount descriptor could prevent post-exit transcript enumeration/promotion despite native exit 0. This is motivated by the repository's documented older-Bun extra-stdio bug and existing
tests/helpers/extra-stdio-fd-probe.ts; it is not evidence that the historical occurrence used that bug. Current promotion is reached through held mount descriptors (const promoter,packages/ui-backend-claude/src/worker-spawn.ts:203-220). The active original-assertion control remains (test.skipIf,packages/ui-backend-claude/tests/worker.test.ts:78-125). Earlier citations in the body retain their stated historical SHA context.Temporary fixture-only recipe: before the existing target's
spawner.spawn, launch two serialnode:child_process.spawn("/bin/sh", ["-c", "exit 0"], {stdio: ["ignore", "pipe", "pipe", ...Array(128).fill("pipe")]})children. Drain every pipe, assert both child exits 0, retain their objects and record parent-sidestdio[3...]_handle.fdnumbers. Hold one additional/dev/nulldescriptor during the second launch through test cleanup to vary allocation. In the existingworkerStartedcallback, release the retired objects and callBun.gc(true)eight times; repeat eight collections in itsworker.exited.thencallback. BufferfstatSyncidentity snapshots around both phases, WeakRef collection observations and final promotion/state snapshots; print only infinally. After all original assertions, additionally require both live mount descriptors to belong to the retired parent-pipe set. Production code was unchanged. The exact qualified patch and all six invocation logs/exit receipts remain in scratch.Recorded test argv/environment in shell form (the bounded scratch runner invoked it for each arm); apply the diagnostic patch only for the experiment and restore it before the final control:
No skips. In the qualified experiment, runtime-state FD 19 and turn-temp FD 24 actually reused retired parent-pipe numbers. Both remained directories with identical device/inode identities before/after collection at worker start and native exit. WeakRefs confirmed both retired child objects were collected by the latter phase. Native and exposed wrapper exits were 0; there was exactly one correct 28-byte promotion, writable scratch, destination present and transcript present, with no
spawner.failure(). Exact file bytes, unchanged native JSONL, fresh-history promoted link and exact governance record all passed.Setup evidence is separate: three earlier one-child allocation variants each exited 1, 100 pass / 1 fail / 435 assertions, in 9.68s, 9.88s and 10.63s (outer walls 9.797s, 9.989s, 10.773s). Their original promotion assertions passed; only the added descriptor-reuse coverage assertion failed. They did not reach the intended reuse condition and are neither ENOENT reproductions nor green qualification.
This induced GC/reuse condition did not reproduce missing promotion. It narrows this specific current-runtime hypothesis without explaining the original local failure or proving a repair. Retain
needs: reproand all other labels; no body correction, milestone, assignee, priority or parent change. Diagnostic edits were restored byte for byte, tracked checkout is clean/detached and promotion fixtures are gone. No hosted experiment, branch, PR or fix was created.schlessera commentedon Oct 17, 2026
2026-10-17 — Not reproduced, reversed native output publication order at main
bfaf3be35408e7983f6b525430118fa867c19d6a.New approach: in the current real-worker successor fixture, move the existing report.pdf write after the exact native transcript write, immediately before worker exit. Previously the report preceded the transcript. This tests completion/promotion when the reference is published before its target, unlike earlier cancellation, filesystem tracing, descriptor collection, permissions and suite-order controls. No bytes, delays, source links, promotion policy or child-exit assertion change.
Command:
timeout60s bun run test ./packages/ui-backend-claude/tests/worker.test.ts --test-name-pattern 'a real worker preserves native answer bytes while fresh UI history links the promoted copy'. 1pass/0fail,7filtered,5assertions, exit0,714ms runner /361.31ms case. The actual sandboxed worker exits0; original report readback, unchanged native transcript bytes, fresh rewritten history and exact promotion-record assertions all pass. No missing report occurs.Own frozen install/full build, Bun1.4.3, native bubblewrap/worker and standard offline preloads, disk-backed isolated checkout on shared local host. This is a deliberately reversed fixture order, not historical combined-source or original five-file proof. Temporary test source restored byte-for-byte; log/diagnostic source retained locally.
Keep
needs: repro: no historical missing-promotion ownership, natural recurrence or repair established.schlessera commentedon Oct 17, 2026
2026-10-17 — Second round: Not reproduced. Original successor-worker case passes: 1 pass / 0 fail / 5 assertions, 616 ms total / 333.95 ms case. Promoted file, exact native transcript and fresh UI history all match. at main
33cc244ea9f4f92114201a29d0d27edf24f89ce1.New approach: Publish the native report by writing a sibling report.partial and renaming it atomically to report.pdf before the original transcript write/worker exit, rather than writing report.pdf directly or reversing publication order. All original bytes and readback/history/promotion assertions remain.
Not reproduced. Original successor-worker case passes: 1 pass / 0 fail / 5 assertions, 616 ms total / 333.95 ms case. Promoted file, exact native transcript and fresh UI history all match.
Command:
bun run test packages/ui-backend-claude/tests/worker.test.ts -t "a real worker preserves native answer bytes". Own isolated frozen dependencies and successful full build; Bun 1.4.3, shared local Linux host. Browser controls use the unchanged pinned Playwright 1.63.0 noble image, Vitest 4.1.11 and verified locked fonts with network disabled. Original offline guards and deadlines retained. Native bwrap/worker and output promotion execute; no watcher workaround, source repair or historical fixture-lifecycle cause inferred.Keep
needs: repro: no historical cause or correction established. Temporary source edits restored; diagnostic inputs and output retained locally. No fix, PR or hosted dispatch.schlessera commentedon Oct 17, 2026
2026-10-17 — Third round: Not reproduced:1pass/0fail/5assertions,7filtered,959ms total.
New approach: Fsync the native worker report descriptor and close it before publishing its original transcript, rather than direct-write/rename ordering, umask or descriptor/GC churn. Existing exact report/transcript/history/promotion assertions remain.
Command:
bun run test packages/ui-backend-claude/tests/worker.test.ts -t "a real worker preserves native answer bytes".Local test at main
2a0b77f675da2f01c32adba3f4920650a5ee09fa, isolated checkout with its own successful frozen install and full build, Bun 1.4.3. Browser probes use the pinned Playwright 1.63.0 noble image, Vitest 4.1.11, verified offline fonts and network disabled. Existing offline guards, assertions and deadlines retained. Shared Linux host; no historical runner equivalence or measured starvation claimed. This deliberately adds native durability synchronization; it does not establish historical write durability or a repair.Keep
needs: repro: this does not establish the historical cause or a correction. Diagnostic source restored; command, input and complete output retained locally. No implementation, PR, push or hosted dispatch.schlessera commentedon Oct 17, 2026
2026-10-18 — Control under the #2370 host condition: not reproduced. The unchanged focused target for this issue passed on a host carrying about 8,000 leaked Docker Desktop bind mounts. On that same host, bwrap setup costs about 2 s and
egress-worker-runtime.test.tsfails 10/10 at its 5 s worker-setup budget. Results: boot-probe-deadline 18 pass / 0 fail; native-answer-bytes promotion 1 pass; live-ancestor lease 1 pass. The mount-table pathway therefore does not explain this observation as a focused run. A broad-order recurrence on a host that passes #2370's preflight would still be informative.schlessera commentedon Oct 18, 2026
2026-10-18 — reproduction pass at
775eb17aab740fa759c2182f306c38fc17acbcbe.Different approach: Publish the real worker report with awaited asynchronous Bun.write before native transcript publication and exit, rather than earlier synchronous write/fsync, atomic rename or reversed publication controls. Original exact-byte, file/promotion and fresh-history assertions remain.
Observed: Not reproduced: original real-worker/native-answer promotion case passes, 5 assertions, 7 cases filtered. Awaited asynchronous report publication retains exact native transcript bytes, promoted file/receipt and fresh UI history checks. Outer invocation exit
0, elapsed 0.365 s; outer watchdog fired: false.Command (from repository root; any diagnostic source changes are described above):
Bun 1.4.2, real bubblewrap worker. This supplies a different file-publishing API/completion boundary without artificial delay or deletion; it does not reconstruct the historical combined ordering or establish the original missing-file cause.
This is focused local evidence, not historical-run equivalence, a repair or full candidate proof. Existing assertions, deadlines and offline guards were retained. Temporary source instrumentation was restored byte for byte. Keep
needs: repro; no readiness or closure change. Full log, command/exit receipt and diagnostic patch are retained in task-owned scratch.schlessera commentedon Oct 18, 2026
2026-10-18 — second reproduction pass at
775eb17aab740fa759c2182f306c38fc17acbcbe.Different approach: Publish the real worker report through one vectored writevSync call with two buffers and explicit close before original transcript/exit. Unlike earlier Bun.write/fsync/rename/reversed publication, this varies the native vectored-write boundary while retaining exact bytes and promotion/history assertions.
Observed: Original native report/promotion/fresh-history case passes, 1 test / 5 assertions, 7 filtered; exact output bytes and promoted history remain verified. Outer invocation exit
0, elapsed 0.365 s; outer watchdog fired: false.Command (working directory: repository root; any diagnostic source changes are described above):
Explicit environment:
TMPDIR=/dev/shm/odysseus-repro2.The report uses one vectored write call followed by descriptor close, with native transcript publication afterward. This is an intentional publication variation, not evidence of original storage timing.
This is focused local evidence, not historical-run equivalence, a repair or full candidate proof. Existing assertions, deadlines and offline guards were retained. Temporary source instrumentation was restored byte for byte. Keep
needs: repro; no readiness or closure change. Full log, command/exit receipt and diagnostic patch are retained in task-owned scratch.schlessera commentedon Oct 18, 2026
2026-10-18 — third reproduction pass at
775eb17aab740fa759c2182f306c38fc17acbcbe.Different approach: Publish the actual report inode through linkSync from a sibling temporary name, then unlink that temporary name before the unchanged transcript publication and native worker exit. This differs from previous direct/writev/rename publication controls. Original bytes, native sandbox, promoted readback, transcript and history assertions remain.
Observed: 1 pass; 0 fail; 5 expect() calls Outer invocation exit
0, elapsed 0.414 s; outer watchdog fired: false.Command (working directory: repository root; any diagnostic source changes are described above):
Explicit environment:
BRAIN_REQUIRE_CHROME=1,PUPPETEER_EXECUTABLE_PATH=$PLAYWRIGHT_CHROME,DEBUG=pw:browser,TMPDIR=/tmp/brain-repro-audit-3/native-state.Original broad invocation and its reported failure remain unqualified. No failure-cause or repair inference from these controls.
This is focused local evidence, not historical-run equivalence, a repair or full candidate proof. Existing assertions, deadlines and offline guards were retained. Temporary source instrumentation was restored byte for byte. Keep
needs: repro; no readiness or closure change. Full log, command/exit receipt and diagnostic patch are retained in task-owned scratch.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
dc5d3c73282c29a3f0098306d398743ee18ec791: Recorded a fresh bounded offline run of the current native promotion successor and its exact filter/limits. The original combined-run ENOENT and historical anchors remain intact; the passing current control is not a repair or complete multi-file proof.schlessera commentedon Nov 10, 2026
2026-11-10 triage at main
3aadc8df5: Recurrence check only; the body is unchanged. I searched the failed-job logs (gh run view <id> --log-failed) of every failed mainCIrun from 2026-11-01 to 2026-11-10: 28 runs, 27 with failed-job logs. The native successora real worker preserves native answer bytes …appears in five of them, as passes only, with no promotion ENOENT. The anchors (worker.test.ts:78,const promoteratworker-spawn.ts:240) still hold. Since 2026-11-05, #3823 changed only the cleanup-report plumbing inworker-spawn.ts, not promotion.needs: reproand p2 remain.schlessera commentedon Nov 10, 2026
Test-health audit (run
th-20261110180830-ff27e0, cluster 2), at1bbdbbfb9d1de08f5062bbfb6bf3c4c07f2785f1on Linux with bwrap: not reproduced.bun scripts/test-health.ts measureofpackages/ui-backend-claude/tests/worker.test.tswith its four neighbours (worker-state,worker-failure,transcript-archive,worker-save-refused),--shuffle --together: 10 runs of the file (in order and shuffled), 0 failures, plus 3 runs of the five files together in one process, 0 failures. The native promotion case passed every time.This differs from earlier attempts only in pairing the file with its worker-state neighbours rather than the original five-file set, so it adds no cause. The test was left unchanged (one unrelated assertion in the same file now names the refusal message). Keeping
needs: repro.schlessera commentedon Nov 13, 2026
Closing as not planned (maintainer-requested triage, 2026-11-13). One local sighting on 2026-10-14, on a combined tree that can no longer be retrieved, with more than 40 varied local runs since and no recurrence. The acceptance criteria accept a bounded non-reproduction with a recurrence protocol, and both are already in this issue.
Recurrence sweep (2026-11-13). I read the failed-step log of every failed product job on main
CIfrom 2026-10-28 to 2026-11-13: 84 jobs across 300 runs. In the same window 1,005 unit, 764 browser, 501 layout and 256 runtime_host jobs passed. NoENOENT … report.pdfappears in any of them.One more cause is now excluded. With a foreign process holding the whole default maintenance budget, which reproduces #3019 and six sibling issues on demand,
packages/ui-backend-claude/tests/worker.test.tsstill passes 8 of 8 on main631bbae2c(receipt). So this was not shared-ledger contention.On recurrence: file a new issue with the promotion records and the sandbox area state the original run did not print, as the protocol here describes.