Repository navigation
Description
Context
Original failure. During a bounded #1970 reproduction attempt on main 3100afa2b8efa25ea31114cdee1f2a89a48dd013, the unmodified hygiene review browser file ran 58 cases: 57 passed, one failed (exit 1, 79.70 s). The failing case was transient selection refresh retries an unavailable REST read and stops at server completion. It failed in initial scene readiness: expect.poll(() => ui!.stores.inbox.getState().online).toBe(true) exhausted its matcher timeout before the host was created (scene, packages/ui-react/tests/browser/hygiene-review.layout.tsx:54-110, poll at line 87). Raw log SHA-256 78929efba2e7cff7569cdaa22fdec58543a0ae05a7de1b8175d5e1f637c9ca28.
Recurrence (2026-10-15). At d2b4cf941498d1276deee8acf42f411b7d1c8090, the complete file with passive socket/message diagnostics failed four cases (54 pass) with the same initial-online assertion. Each failed timeline shows the new socket open, hello handled, both inbox snapshots handled and online true 3.0-4.2 ms after open; at poll rejection the same socket is still OPEN, but online is false. No close or error was captured on that socket. The writer of the true → false reset was not captured.
Demonstrated fixture defect (2026-10-16). scene binds its sender, onmessage and onclose to the mutable globals ui and socket (lines 75-86) rather than to the root and socket it created. A forced-ordering native experiment at ed6b0c5f09ada1b6f899bf245f3f1b176352bf77 showed that releasing a disposed scene's real close callback after the next scene is online resets the new root and fails the original poll, while an owner-bound callback does not. That repair is delivered by #2754/#2914 (541b8d983), with owner-bound sender, message and close callbacks; its native regression receipts do not attribute the historical natural failures. The experiment does not show that the natural failures had this ordering.
Controls that did not reproduce. Instrumented complete-file runs (buffered ownership, store subscriptions, state-write interception, one-CPU quota), focused runs under altered JIT, raster and NetLog conditions, three unchanged complete-file runs on 2026-10-19 (174 cases) and a fixed 300 ms delayed-close variant all passed. Instrumentation changes scheduling; these passing controls cannot explain the failed receipts. Exact commands, images and hashes are in the comments.
#1685 (null read after settling) and #1970 (post-click Applying state) are distinct observations; no shared cause is established.
Scope
Attribute the historical natural initial-online failures: capture, in a naturally failing invocation, the root, socket and fixture identities, the synchronous true → false writer stack and the teardown boundary at the failed poll, then run a causal control that distinguishes an active-root writer from a superseded-root lifecycle.
Collect any new recurrence on a tree that includes #2754, and record whether the fix is present. A recurrence with owner-bound callbacks rules out the stale-callback mechanism for that occurrence.
Out of scope
- The fixture ownership repair itself (ui-react: bind hygiene fixture socket callbacks to their owning scene #2754).
- Changing product behavior, weakening assertions, increasing deadlines, rerunning until green.
- The post-click manual recheck failure in ui-react: manual hygiene recheck remains applying in browser proof #1970 and the null-read in ui-react: hygiene-review layout test reads the item before it renders #1685.
- Repeating the instrumented passing controls already recorded without a new execution dimension.
Acceptance criteria
- A naturally failing initial-online poll is captured with correlated root/socket/fixture identity, the synchronous writer stack of the true → false transition and the teardown boundary, with the original assertion and timeout unchanged.
- The report states whether ui-react: bind hygiene fixture socket callbacks to their owning scene #2754's owner binding was present in that tree, and whether the captured writer is the active root or a superseded one.
- Connection readiness failure is distinguished from later review-render and post-click terminal-state failures.
- Any further correction is scoped only to the boundary the evidence identifies, with failing-first and restored-mutation proof, and filed as its own task if it is not ui-react: bind hygiene fixture socket callbacks to their owning scene #2754.
Verification
From packages/ui-kit inside the pinned network-disabled Playwright 1.63.0 image (ID sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27), with the original fixture, preload and request guards and verified read-only fonts:
node /repo/node_modules/vitest/vitest.mjs run --project=ui-react-layout --browser.fileParallelism=false ../ui-react/tests/browser/hygiene-review.layout.tsxKeep each failed receipt separate from passing controls, and record the exact SHA, image, Bun and Vitest versions, and log hashes. Temporary instrumentation is restored byte for byte.
Contract impact
None.
2026-10-24: split the demonstrated socket-ownership fixture defect into #2754; this issue keeps the historical attribution investigation with needs: repro. Consolidated the dated evidence sections into Context; attached to the browser-verification epic #2753. The previous body is preserved in a comment.
2026-10-24 continued triage at main dc5d3c73282c29a3f0098306d398743ee18ec791: Made the existing requirement to collect a new recurrence on a tree containing #2754 an explicit dependency. #2754 is still open and owns the demonstrated callback-owner repair; this issue retains needs: repro for the historical natural writer/ordering gap. Both are p2; no natural failure is attributed to the controlled experiment.
2026-10-25 triage at main 541b8d98328a760290ac6dd4a7f065af76153408: Verified merged #2914 and the owner-bound fixture on inspected main. The completed #2754 prerequisite is no longer an active blocker; preserve needs: repro, the original failure identities and the current worker claim/branch. No new natural occurrence or causal attribution is supplied.
Post-owner-binding verification — 2026-10-25
#2754 is delivered by #2914 at verification base 541b8d98328a760290ac6dd4a7f065af76153408. Bounded current-tree sampling produced 11 complete local hygiene inventories (1,122 reported cases) with no captured initial-online failure, plus one route-aborted attempt with no final report. The complete layout project passed 1,315/1,315 in 69 files. Separate later-focus and route failures are #2919 and #2922; they do not establish an initial-online recurrence.
Restoring only the old global close lookup reproduces the unchanged initial-online poll (scene, packages/ui-react/tests/browser/hygiene-review.layout.tsx:67-131, original poll line 103) in three ordinary cases, as well as the held-close regression. Restoring the owner binding gives 102/102 passes. A further traced comparison captures a superseded-owner true-to-false writer only in the deliberately held case; no naturally failed original poll recurs with tracing. The historical same-failure writer criterion remains unproved.
No additional code PR is proposed. The coordinator can select an evidence-based bounded non-reproduction closure without more code, crediting #2914 for its demonstrated fixture repair while retaining this historical attribution limit. Until that disposition is chosen, keep the issue open with needs: repro. Typecheck and local preflight pass on the exact base above. The required root suite was interrupted by its outer watchdog with earlier failures and no complete totals; it is incomplete proof on unchanged main, not a green receipt. A newer main head advanced after these tests and is not qualified by the older receipts.
Full reproduction table, conditions, source/CPU/runtime identities, causal-control and restored-mutation logs, failed baseline evidence, CI cutoff and follow-ups: dated verification receipt.
2026-10-25: folded the post-#2914 sampling and causal-control results into the current specification. Preserved the stricter historical attribution criterion and all earlier failed receipts; no further product or fixture change is delivered here.
Activity
schlessera commentedon Oct 15, 2026
Initial-online recurrence and bounded state diagnostics — 2026-10-15
At inspected source
d2b4cf941498d1276deee8acf42f411b7d1c8090, ran distinct passive fixture/socket/message/store timing diagnostics in an isolated copy, using audited exact-source built outputs and remapped workspace links. No product code, frame bytes/order, authoritative fixture behavior, original assertion/deadline or guard changed. The temporary probes are restored after preserving patches and logs.320: delayed final dismiss, and1280: delayed final check,dismissandlater(full names enddelivers completion to both devices without reload). The originally reported transient-selection case passes in this invocation. This is a failed complete-file receipt, never green proof.Captured failed boundary: in all four failures, fixture start and authoritative start return; the new socket opens;
server_hellois parsed/handled; both actualinbox_snapshotmessages are handled; the second handler observesonline: true. Socket open→that true state takes 3.0–4.2ms. When the original poll rejects, the same socket is still OPEN,supportedis true, online is false, and the host has not been created. No close/error appears in that socket's captured timeline. The 54 successful scene timelines reach the original poll success 142.4–249.6ms after scene entry.This narrows the observation beyond a socket that never opened or delivered its initial snapshots. It does not identify what resets the store between the handled snapshot and rejected poll, establish an old-callback cause, or explain the original failing transient-selection instance. The later subscription stacks were not present in the failed run. Empty close/error logs alone do not exclude another lifecycle/state writer.
Command for each complete-file diagnostic, from
packages/ui-kit:The middle diagnostic adds
-t 'delayed final|transient selection refresh retries'. Each command runs in a fresh pinned Playwright 1.63.0 container (sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27), native Chromium, Vitest 4.1.11, Bun 1.4.2,--network=none --ipc=host --user 1000:1000, invocation-owned tmpfs/tmp, checksum-locked fonts read-only, existing fixture/preload/request guards, and an outer 120–180s bound. Other independent host work was uncontrolled. These are sequential diagnostic refinements, not unchanged retries until green or hosted-job reruns.Failed raw-log SHA-256:
1f30a36cecdc7f6ab0edef2ad0a8f1624600b0c5a7f1c19db93b73c84b8f1621. Complete traces, the two probe patches and passing diagnostic logs remain local. The issue body now incorporates the actual recurrence and its limits.Keep
needs: repro, type/areas/p2, no milestone/assignment or agent-ready, and documented standalone ownership. Next experiment: retain the fixture/root/socket owner identities and synchronous inbox transition stack in the same naturally failing initial poll, including every true→false write and teardown boundary. Distinguish whether that writer addresses the active root or a superseded one, then scope a causal control before correction. No implementation, timer increase, state injection, synthetic message, repair or unrelated #1970/#1685 cause is claimed.schlessera commentedon Oct 15, 2026
Buffered root/socket ownership control — 2026-10-15
Read the complete body and prior diagnostic comment, then ran one distinct bounded experiment at snapshot
fb219e069a8afd7fbc5eac6524b7a77ec08a7560. The initial poll remains inscene(packages/ui-react/tests/browser/hygiene-review.layout.tsx:57-110), before host creation. Its predicate and deadline are unchanged.What differs from the previous attempts: the temporary test-only probe assigns separate scene/root/socket identities, retains read-only subscriptions to earlier roots through the end of the file, and correlates each socket callback's original owner with the global root it actually addresses. It buffers all observations in memory instead of printing during normal event handling. Every true→false transition captures its synchronous writer stack; a failed initial poll would dump the buffer in
finally, before teardown. This tests for a callback addressing a replacement root while reducing per-event console transport. It does not force a close, delay, reset or failure.The isolated checkout copied only dependencies from a byte-identical lockfile (
a33ace577ec87f79769d40c3e8e25d637563b5ec8ea25e5ad40bb9b7a593285c) and built packages independently. Build Bun: 1.4.3; native fixture Bun: 1.4.2; container Node: 24.20.0; installed Vitest: 4.1.11; Playwright: 1.63.0. Image ID:sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27. The container retained--network=none --ipc=host --user 1000:1000, an invocation-owned tmpfs, verified read-only fonts and the existing fixture/preload/request guards. Browser execution was coordinated after the other scheduled browser experiment; unrelated host activity remained uncontrolled.Only
hygiene-review.layout.tsxreceived diagnostic additions. All 143 original expectation-containing lines, 58 native-action lines and 22 test-declaration lines remain byte-identical. The native server/command, product source, frames, test order, assertions and timeouts were retained.From
packages/ui-kitinside the pinned offline container, with a 180-second outer process bound:Actual result: exit 0; 58 passed, 0 failed, no filtered cases; Vitest duration 127.65 seconds (135.62 seconds including container startup/cleanup). All 58 initial online polls resolved, including the originally reported transient-selection case and the four earlier recurring callers. The final dump retains 2,318 events with zero dropped entries:
dispose → disconnect → handleStatusChange → connectionLost. The other three are the existing explicit actions in the reconnect, stop-on-offline and scheduled-read-disconnect tests. No false transition occurs during an initial online poll, and none addresses an inactive root.The expected diagnostic failure boundary did not recur. These observations do not establish a stale-owner cause, identify the earlier reset writer, prove a repair or qualify a complete layout shard. Buffered instrumentation can still affect scheduling. The original failed receipts remain valid and separate.
Raw log SHA-256:
81f9af16525b7edb4f49d95abbff8af1e434291af86ca87cc7d066a4a606a2fb. The command/runtime receipts, patch, source hashes, complete event buffer and classified transitions are retained locally under/var/tmp/brain-repro-evidence-1974-owner-trace.Keep
needs: reproand noagent-ready: still required is the owner-correlated true→false writer and fixture/socket/teardown timeline in the same naturally failing initial poll, followed by a source-bound causal control. Preserve type/areas/p2, no milestone or assignment, and standalone ownership; #736 still has 100 native children. No fix, PR, closure or shared cause with #1970/#1685 is claimed.Cleanup verified: diagnostic source restored byte-for-byte, temporary worktree directory and Git registration removed, invocation container and recorded child processes absent, and the shared checkout remains clean. Reusable dependency/font caches were retained.
schlessera commentedon Oct 16, 2026
Buffered ownership under one-CPU quota — 2026-10-16. Read the full issue, both prior comments and the later controlled stale-close mechanism. At main
55dbf1cf5e92cc084d3fde99c6e5c409854f7465, independently frozen-installed/full-built with Bun 1.4.3, ran the complete real hygiene file with temporary read-only owner tracing and Docker--cpus=1. This varies resource scheduling without forcing an old callback, delay, store reset or message order. Earlier buffered ownership controls had no CPU quota; the separate old-close intervention forced its ordering.Pinned offline Playwright 1.63.0 image, native Chromium, Vitest 4.1.11, network none/host IPC, ordinary UID, verified read-only font cache and existing native fixture/request/preload guards. Inner command from ui-kit:
Actual: exit 0, 58/58 pass, no excluded cases, 201.46s Vitest duration; 207.57s including container execution. The original initial-online poll and its deadline remain unchanged. Temporary test-only diagnostics buffer scene/root/socket identity, open/close events and synchronous online-transition stacks; failure would dump before teardown. The 292 retained events contain no failed initial poll, no socket close while any replacement global root exists, and no false transition addressing a superseded owner. All 58 scene registrations/socket opens and original polls execute. This is instrumented passing evidence under an imposed quota, not calibrated reproduction of historical host conditions or proof against other orderings.
The source file was restored byte-for-byte after capture. Full log, command/result, exact diagnostic source and parsed events remain in
/tmp/brain-repro-pass/(1974-*,hygiene1974.instrumented). Container exits normally; no product code, assertion, deadline, fixture authority or frame bytes changed.Retain
needs: repro, current type/areas/p2, standalone ownership and no agent-ready. Still required is a naturally failing poll with its synchronous true→false writer and active/superseded root/socket ownership, followed by a causal control. The earlier forced old-close mechanism remains valid with its original limits; this passing resource arm neither attributes the historical failures nor selects a correction/shared cause with #1970/#1685.schlessera commentedon Oct 16, 2026
New pass at main
7d1a31d09b96739a85bff5151cc2e1300c9ac4d0used source-level state-write interception, rather than the earlier inbox subscriptions/socket callbacks or another CPU quota. Temporary probes wrap the inbox initializer's actual internal Zustand setter and its externalstore.setState, retaining arguments, return values and write order. Each store instance receives its own identity; before/after online values and synchronous pre-write stacks are buffered. No subscriber is added and no state value, message, assertion or deadline changes.The entire original hygiene-review file ran once in the pinned offline Playwright 1.63.0 image, Chromium 153.0.8010.12, Vitest 4.1.11, fixture Bun 1.4.3, with existing guards/locked fonts and original browser-file scheduling. 58 pass, 0 fail, no filtered cases, exit 0, 144.61 s; container execution 155.65 s. The optimizer reported a lockfile-triggered reoptimization on this newly advanced checkout; this is not a warm-cache or hosted-resource benchmark.
The main test document's buffer contains 117 store-instance identities and 1,663 records: 770 internal writes, three external writes, and construction records. Store identities are not asserted to be a one-to-one root/scene count. All 59 observed true→false changes are attributable to the existing teardown or explicit disconnect actions; no unexplained initial-online reset was captured. There was no failed-poll dump. Secondary native pages have their own globals, so this buffer is not claimed as an aggregate of every page's stores.
Both instrumented source files were restored byte-for-byte. The original failed initial-online receipts remain valid; interception still perturbs timing and this passing control cannot identify their reset writer. Keep
needs: repro: still needed is this writer/owner evidence at a naturally failing initial poll, followed by its causal control. No correction or full-layout-shard pass is claimed.schlessera commentedon Oct 17, 2026
2026-10-17 — native browser-engine scheduling control: NOT REPRODUCED.
At main
1da7b2aa09e561c06d51864dd77df5a94e85d93c, this attempt varied WebKit versus Chromium, a dimension absent from the nine earlier runs/controls (unmodified file, passive timing, close identity, subscriptions, buffered ownership, forced old-close ordering, CPU quota and setter interception). Hypothesis: a different engine's native WebSocket task scheduling might expose the stale-owner close ordering without holding callbacks. No new observers or induced ordering were added.Current citations verified:
scenestarts atpackages/ui-react/tests/browser/hygiene-review.layout.tsx:54; mutable-global close handler remains line 86, original online poll line 87, original failing case/caller lines 455–456. The issue has no native parent; its documented standalone relationship is preserved.Frozen dependency verification (
timeout 60s bun install --frozen-lockfile) and independent package build (timeout --signal=TERM --kill-after=10s 600s taskset -c 0-3 bun run build) both exited 0. Build/native-fixture Bun 1.4.3, Node 24.20.0, Vitest 4.1.11, Playwright 1.63.0; runtime-reported Chromium 153.0.8010.12 and WebKit 26.6 (installed revision 2359). Pinned image IDsha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27.Each engine ran once, sequentially, in its own container with
--cpus=4 --network=none --ipc=host, ordinary UID, private tmpfs, verified read-only fonts, and existing fixture/preload/request guards. Shared host load was uncontrolled. Both used this exact inner command frompackages/ui-kit(replace ENGINE with chromium or webkit for the report filename):timeout --signal=TERM --kill-after=10s 300s node /repo/node_modules/vitest/vitest.mjs run \ --project=ui-react-layout --browser.fileParallelism=false \ ../ui-react/tests/browser/hygiene-review.layout.tsx \ -t '^(?!.*(?:failed outcomes retain|field input accessibility tree|actual page reload, reconnect and two devices|delayed final|REST-only refreshed finding)).*$' \ --reporter=verbose --reporter=junit --outputFile.junit=/evidence/ENGINE.junit.xmlFor the WebKit arm only, the temporary
ui-react-layoutconfig selectedinstances: [{ browser: "webkit" }]and removed its Chromium-specific media launch arguments; reduced motion and all setup/guards stayed intact. Product, fixture and test source, assertions and deadlines were byte-identical. The name filter excludes 22 cases from groups that use Chromium CDP or native permission helpers; it retains 36 cases in declaration order, including the original transient-selection case. These are deliberate exclusions, not complete-file/shard proof.JUnit independently confirms both inventories and the original target passing (1.8466s / 1.7720s whole-case times). No initial-online assertion failed. This engine variation neither reproduces the symptom nor identifies the historical reset writer; it does not establish a repair or exclude other orderings.
Logs, JUnit, commands, prior-approach inventory and config patch remain under
<scratch>. Log SHA-256: Chromium0e3e0369b0c690b2ff13d5c0cbf50786efe3bdfa0cd5d063f65f2770c80488d3; WebKitca5c55f247291fb034150ee092963204955cbb36ea6145165f7a50c1d904d952.Config restored byte-for-byte; recorded source/lockfile hashes match and checkout is clean. Both containers are absent. No branch, hosted dispatch, fix or PR was created. Keep
needs: repro; label/body changes: none. The missing same-failure writer/owner timeline and causal comparison remain required.schlessera commentedon Oct 17, 2026
2026-10-17 — NOT REPRODUCED; local complete-file compilation-policy control.
New dimension: disable Chromium V8 JIT (
--js-flags=--jitless) while running the entire original hygiene review file, retaining inter-scene teardown/order and native sockets. This changes compilation/tiering policy rather than prior passive/buffered ownership tracing or the deliberately held old-socket callback control. No root binding, socket callback, wait or assertion changes.Command:
pinned offline Docker: node /repo/node_modules/vitest/vitest.mjs run --project=ui-react-layout --browser.fileParallelism=false ../ui-react/tests/browser/hygiene-review.layout.tsx.58 pass / 0 fail, exit 0, 99.24s runner / 109.08s including container launch, 95.78s test execution. Every initial online poll passes; the historical transient-selection case completes in 1,812ms. All four post-click manual rechecks also pass. The reporter stays quiet until the file summary: absence of incremental case output does not establish a setup stall. Pinned Playwright 1.63.0 / Chromium 153.0.8010.12 / Vitest 4.1.11, native fixtures, verified fonts and offline guards remain. Provider configuration restored byte-for-byte; owned container exited.
Environment: Local testing on a shared Linux host, isolated detached checkout at
9d5cd00b7646ffee951c7a29a38717989f7fd868, independently frozen-installed dependencies and successful full build, Bun 1.4.3. Independent host builds/tests overlapped; no dedicated resource allocation or measured starvation is claimed. This is not remote CI or production evidence.Keep
needs: repro. No naturally failing root/socket/online transition recurs, so the failed writer stack remains missing. This local passing compilation-policy control does not prove the induced old-callback mechanism caused either historical local failure, establish starvation or qualify a product/fixture repair. 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, renderer-only scheduling control at main
bfaf3be35408e7983f6b525430118fa867c19d6a.New dimension: request Chromium CDP CPUThrottlingRate8 while the actual Bun fixture server remains unrestricted, unlike the prior whole-container one-CPU quota, ownership tracing, engine crossover and JIT policy. Every original test/poll/teardown assertion and deadline remains.
Full file: 58pass/0fail,exit0,133.22s; all initial online polls pass. That first command detached its CDP session immediately after setting the rate, so actual persistence of the override across the file was not verified. It must not be treated as a measured8× full-file control.
A refined single-case control retains the CDP session through afterAll, then explicitly restores rate1 and detaches. Same deterministic browser computation takes161ms before setting rate8 and1248.6ms afterward, with equal result, demonstrating effective slowdown. The original
transient selection refresh retries an unavailable REST read and stops at server completioncase passes, 1pass/0fail,57filtered,exit0,9.08s. Its unchanged initial online poll succeeds. No owner/state instrumentation, fabricated frame or held old-close callback is added.Command: original ui-react-layout hygiene file in pinned offline noble container, serial files; second arm adds that case's name filter. Own frozen install/full build, Bun1.4.3 / Node24.20.0 / Vitest4.1.11 / Playwright1.63.0, verified fonts/guards and shared local host. No server/process quota or historical-load equivalence claimed. Temporary command/config/test changes restored byte-for-byte; logs/calibration/source retained locally.
Keep
needs: repro: no unexplained natural online reset or historical writer/ownership stack captured. No correction or full-shard proof claimed.schlessera commentedon Oct 17, 2026
2026-10-17 — Second round: Not reproduced. Original transient-selection case passes, 5.72 s total / 2471 ms case, 57 filtered. Browser confirms permessage-deflate with client/server no-context-takeover. Initial online poll and subsequent unavailable-read/server-completion assertions execute unchanged. at main
33cc244ea9f4f92114201a29d0d27edf24f89ce1.New approach: Enable actual server per-message WebSocket deflate and request compression on hello and stream sends. Assert browser socket.extensions negotiated permessage-deflate after original initial-online readiness. This varies native payload compression/decoding rather than batching callbacks or CPU throttling. Installed Bun server types checked for the option and send compression flag.
Not reproduced. Original transient-selection case passes, 5.72 s total / 2471 ms case, 57 filtered. Browser confirms permessage-deflate with client/server no-context-takeover. Initial online poll and subsequent unavailable-read/server-completion assertions execute unchanged.
Command:
node scripts/visual.mjs --inside --project=ui-react-layout --filter=hygiene-review.layout. 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. Negotiation/requested compression are confirmed; wire-level RSV bits were not independently traced. This focused result does not identify a stale owner or the writer in the old failed initial poll.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:the original transient-selection case passes,57filtered,6.15s. Initial inbox-online poll and later unavailable-read/server-completion checks execute.
New approach: Send two identical native server_hello frames at socket open, before the original subscribe handling. This tests duplicate startup negotiation and inbox initialization reentrancy, rather than payload compression, callback batching, CPU speed or later reconnect.
Command:
node scripts/visual.mjs --inside --project=ui-react-layout --filter=hygiene-review.layout.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. Only the fictional fixture repeats its hello. This supplies no production duplicate-hello evidence or attribution of the historical state writer. Original online assertion and message handling remain.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 18, 2026
2026-10-18 — reproduction pass at
775eb17aab740fa759c2182f306c38fc17acbcbe.Different approach: Retain the original transient-selection unavailable-REST-read case and its initial native inbox-online poll. New execution dimension: Node/Vite orchestration runs with V8 TurboFan optimization disabled (baseline JIT and WebAssembly remain available); this differs from earlier renderer-only JIT controls. Browser is local full Chrome 153 with host libraries, not the pinned container; no container-equivalence or baseline qualification claimed.
Observed: Not reproduced: original transient-selection unavailable-REST-read case passes, 57 cases intentionally filtered. Initial inbox-online readiness and subsequent retry/server-completion assertions execute; Vitest duration 4.10 s. Outer invocation exit
0, elapsed 7.882 s; outer watchdog fired: false.Command (working directory: packages/ui-kit; any diagnostic source changes are described above):
Explicit environment:
STORYBOOK_DISABLE_TELEMETRY=1,TMPDIR=/tmp/brain-repro-audit/cache,PUPPETEER_EXECUTABLE_PATH=$PLAYWRIGHT_CHROME.Node 24.21.0 --no-opt changes orchestration TurboFan policy while the native fixture WebSocket and startup frames remain unchanged. This differs from earlier duplicate hello, compression, CPU and callback-ownership interventions. Local full Chrome 153, verified locked fonts/native glyph guards, route-free namespace and dropped setup capabilities remain. No historical full-file or pinned-container qualification is claimed.
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.Command notation: REPRO_ROOT denotes the checkout root, including when the working directory is packages/ui-kit; executable variables denote the recorded local runtimes.
2 remaining items
schlessera commentedon Oct 19, 2026
Repro attempt, 2026-10-19, at main
09eb1f78e. Local Linux (WSL2): 32 CPUs, 47 GiB, Bun 1.4.2, 121 mountinfo entries. Chrome for Testing 153.0.8010.12 viaPUPPETEER_EXECUTABLE_PATH. CPU load came fromtaskset -c <cpus> yes > /dev/nullbusy loops.Not reproduced: 0 failures in 174 cases. The naive forced variant also passed.
node scripts/visual.mjs --project=ui-react-layout --filter=hygiene-review.layout×3 in the pinned container passed 58/58 each, about 90 s per run.socket.onclose = () => setTimeout(() => ui?.stores.inbox.getState().connectionLost(), 300). It still passed 58/58: by the time the delayedconnectionLost()hits the new global root, that scene'sonlinepoll has already returned. The failing window is narrower than a fixed delay. The issue's hold-until-next-scene-online induction remains the deterministic arm. The edit was reverted.Same bug class, not yet named here:
socket.onmessageat lines 82-85 also dispatches through the mutable global (ui!.connection.handleServerMessage). A late frame from the previous scene's socket would therefore be applied to the next scene's root as well. Theconst owner = uicapture should cover both handlers.Local note: the default font cache directory
/tmp/brain-kit-feature-capture-fonts/<hash>can be left root-owned and empty by an earlier Docker mount.visual.mjsthen fails at once withEACCES … mkdir …/fonts. SettingTMPDIRto a private directory avoids it.schlessera commentedon Oct 24, 2026
Previous body, preserved verbatim before the 2026-10-24 split into #2754 (fixture ownership repair) and this issue (historical attribution):
Body as of 2026-10-21
Out of scope
Changing product behavior, weakening assertions, increasing deadlines, rerunning until green, or treating this as the post-click manual recheck failure in #1970.
Context
During a distinct bounded reproduction attempt for #1970 on main
3100afa2b8efa25ea31114cdee1f2a89a48dd013, the entire unmodified hygiene review browser file executed 58 cases. The process exited 1: 57 passed, one failed, duration 79.70s. All four manual-recheck cases passed.The failing case was
transient selection refresh retries an unavailable REST read and stops at server completion(test,packages/ui-react/tests/browser/hygiene-review.layout.tsx:455-456). It failed in initialscenereadiness (scene,packages/ui-react/tests/browser/hygiene-review.layout.tsx:57-87):expect.poll(() => ui!.stores.inbox.getState().online).toBe(true)exhausted the matcher timeout, expected true, received false. Host creation/render had not occurred. This is actual browser assertion evidence; fixture startup and module import succeeded. No cause or deterministic trigger is established.#1685 concerns a later null-dataset read after initial connection and fixed settling. #1970 concerns a rendered post-click Applying state. This initial online failure is a distinct observation; a shared cause is not established. All-state searches for
hygiene onlineandtransient selection refreshfound no exact owner. #736 is the matching native verification-boundary epic, but its documented 100-child limit prevents attachment; leave standalone.Scope
Needs scoping: capture initial WebSocket opening/messages/close, fixture readiness and state transitions for the failed initial online poll, then reduce a causal boundary before selecting a correction.
Acceptance criteria
Verification
In the exclusive exact-SHA checkout, from
packages/ui-kitinside the pinned network-disabled Playwright 1.63.0 container:Image ID
sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27; Bun 1.4.2 supplied viaBUN_BIN; Vitest 4.1.11; original native fixture/preload/request guards, checksum-verified read-only fonts,--network=none --ipc=host, tmpfs/tmp. No source instrumentation, synthetic messages, response delays or deadline changes. Dependencies/builds reused from an inactive exact-SHA donor, workspace links remapped; all 4,194 tracked paths match the snapshot byte-for-byte. Shared host load was uncontrolled with other independent workers active. This was one run, not a pristine CI reproduction or repair.Raw log SHA-256:
78929efba2e7cff7569cdaa22fdec58543a0ae05a7de1b8175d5e1f637c9ca28. Evidence retained locally. Needs further reproduction/diagnosis before readiness. Wanted unscheduled reliability work: priority p2.Contract impact
No contract change proposed; correction scope depends on diagnosis.
Recurrent boundary and diagnostic limits — 2026-10-15
At source
d2b4cf941498d1276deee8acf42f411b7d1c8090, the complete real pinned-offline browser file with passive setup/socket/message diagnostics fails 4 cases and passes 54 (58 executed, exit 1, 71.32s). The initial-online assertion recurs before host creation in delayed-final dismiss at 320px and check/dismiss/later at 1280px; the originally reported transient-selection case passes. All four failed timelines show the new socket open, hello handled, both real inbox snapshots handled and online true after the second snapshot (3.0–4.2ms after socket open). At poll rejection, the same socket is OPEN and supported remains true, but online is false and the host is uncreated. No close/error is captured on that socket. This is a measured state boundary, not an identified reset writer or causal repair.A focused nine-case close-owner diagnostic passes (22.62s); observed close callbacks occur during teardown with the global root cleared, so a stale-root callback cause is not established. A further complete-file diagnostic adds read-only store subscriptions with synchronous online-transition stacks and passes all 58 cases (68.36s). Its false transitions are accounted for by disposal or explicit offline test actions. Those stacks were not present in the failed invocation and cannot retrospectively explain it. Instrumentation can change scheduling; preserve the failed receipt separately from passing controls.
A further owner-correlated buffered diagnostic at snapshot
fb219e069a8afd7fbc5eac6524b7a77ec08a7560passes all 58 cases and initial online polls (exit 0, 127.65s). It retains earlier-root subscriptions, separate root/socket/fixture identities and synchronous true→false writer stacks, with output deferred until failure or file completion. Its 2,318 events have no drops: all 58 socket-close callbacks run with the global root cleared; no message addresses another root; all 59 false transitions are accounted for by 56 own-root disposals and three explicit test actions. No initial-poll reset recurs. This is an instrumented passing control, not the missing failed-writer evidence or a repair. The follow-up evidence comment records the independent build, exact command/runtime, unchanged assertions/guards and durable artifacts.Still required is root/socket/fixture ownership, the synchronous true→false writer stack and teardown boundary in the same naturally failing initial-online poll, then a causal control distinguishing active-root from superseded-root lifecycle before selecting a correction. The dated evidence comment records exact commands, image/runtime, original assertions/guards, failed-log hash and local artifacts. No product/fixture repair, timeout change, shared cause with #1970/#1685 or successful whole-shard qualification is established. Retain needs: repro and no agent-ready; existing p2/type/areas, standalone relationship and missing causal scope remain.
2026-10-15 follow-up: folded the distinct buffered ownership control into the current diagnostic boundary; retained the earlier failed receipts and unresolved reproduction prerequisite.
Controlled old-socket close mechanism — 2026-10-16
At main
ed6b0c5f09ada1b6f899bf245f3f1b176352bf77, a bounded test-only scheduling control demonstrates one fixture mechanism for the measured initial-online boundary. Currentscene(packages/ui-react/tests/browser/hygiene-review.layout.tsx:54-87) registers the socket close handler against mutable globaluiat line 86, rather than its owning root.In an isolated archive with independently installed frozen dependencies and built packages, two temporary diagnostic cases establish a first real native scene, dispose its root and request its real socket close, then hold that actual close callback. After the next scene handles its real initial inbox snapshots and becomes online, the diagnostic releases the old callback through a microtask. No synthetic socket frame or product-store reset is injected. This deliberately forces an inter-scene ordering; it is not a naturally recurring receipt.
sceneonline poll fails with expected true / received false (1,822 ms case).Command from
packages/ui-kitinside the pinned offline Playwright 1.63.0 image, with a 120-second outer bound:node /repo/node_modules/vitest/vitest.mjs run --project=ui-react-layout --browser.fileParallelism=false ../ui-react/tests/browser/hygiene-review.layout.tsx -t 'diagnostic old-native-close'Result: exit 1 as expected, one diagnostic fails on the original online assertion and the owner-bound diagnostic passes; 58 original cases are deliberately filtered in this experiment. Image ID remains
sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27, network disabled, existing native fixture and preload/request guards retained, verified fonts mounted read-only. Raw log SHA-256:39acbb991cd6d66dcb478d636277617427bf799429f0758028014b72caaf561c; diagnostic source SHA-256:674f73361edce56c9c47ffd5c7d08a7d3683c30f53c353fb68923b6466fc2d47. Source was restored byte-for-byte after capture.A preceding unmodified complete-file run at this SHA passes all 58 cases (exit 0, Vitest 81.32 s); that separate control does not explain the earlier failures. Its raw log SHA-256 is
34b40bdc66283d87d4e34d84448aa1a446ef0a07869065ace94e043f15188bf3.Interpretation and remaining prerequisite: the controlled experiment identifies a real stale-owner fixture vulnerability and a causal distinction under the forced ordering. It does not identify the reset writer in the earlier naturally failing invocations, demonstrate that their teardown actually had this ordering, or establish a shared cause with #1970/#1685. Keep
needs: reproand noagent-readyuntil owner-correlated failed-run evidence or an explicit narrowing of the issue's scope resolves that historical attribution gap. No product/fixture correction is delivered by triage.Later ordering control and callback audit — 2026-10-21
The October 19 control at main
09eb1f78epassed three unchanged complete-file runs (174 cases). A fixed 300 ms old-close delay also passed: its reset arrived after the next initial poll had returned. That does not invalidate the earlier deterministic hold-until-next-scene-online intervention; a fixed delay does not establish the same ordering.Source inspected at main
c2f080f20a31224a1eeccde321c574292eaedb02confirms that both native handlers use the mutable global:socket.onmessagecalls the current root's connection (scene,packages/ui-react/tests/browser/hygiene-review.layout.tsx:81-85), andsocket.oncloseresets the current root at line 86. Any eventual owner-binding correction must audit both callbacks and the neighboring sender at lines 75–79, with original root/socket identities retained. The message path is a source-backed instance of the same ownership risk, not a measured natural late-frame failure. Keep needs: repro and the existing historical-attribution criterion; no new runtime run, scope-narrowing ruling or delivered correction is claimed.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
dc5d3c73282c29a3f0098306d398743ee18ec791: Made the existing requirement to collect a new recurrence on a tree containing #2754 an explicit dependency. #2754 is still open and owns the demonstrated callback-owner repair; this issue retains needs: repro for the historical natural writer/ordering gap. Both are p2; no natural failure is attributed to the controlled experiment.schlessera commentedon Oct 25, 2026
Unblocked: #2754 is closed, so
scripts/sync-project.tsis removing theblockedlabel.schlessera commentedon Oct 25, 2026
Claim
1974-initial-online-044-20261025: re-attempting this pre-selected investigation ontest/1974-hygiene-initial-online-044, starting at current main541b8d98328a760290ac6dd4a7f065af76153408with #2914's owner binding present. I will record bounded natural runs under documented load and audit post-merge CI; controlled callback defects remain separate from historical natural attribution. Original tests, assertions, deadlines and offline guards stay intact. This worker will not mark a PR ready or merge.schlessera commentedon Oct 25, 2026
2026-10-25 triage at main
541b8d98328a760290ac6dd4a7f065af76153408: Verified merged #2914 and the owner-bound fixture on inspected main. The completed #2754 prerequisite is no longer an active blocker; preserve needs: repro, the original failure identities and the current worker claim/branch. No new natural occurrence or causal attribution is supplied.schlessera commentedon Oct 25, 2026
Post-#2914 bounded verification — 2026-10-25, claim
1974-initial-online-044-20261025.Tested the fetched main commit
541b8d98328a760290ac6dd4a7f065af76153408ontest/1974-hygiene-initial-online-044. #2914's owner binding is present. The unmodified fixture SHA-256 isa261cdfccfbe250f96593377107d7f533fd30efeac9ba1fff773b0a45b8e5895.Natural current-tree executions
ui-react-layoutproject, four CPUs, overlapping hygiene suitesThat is 11 complete local hygiene inventories / 1,122 reported cases, plus one unqualified route-aborted attempt. Six reported failures concern the later explicit-disconnect title-focus assertion, never the initial poll. The three shipped held-callback/sender regression cases remain in every complete 102-case inventory; no case was filtered. The incomplete attempt supplies no case coverage and cannot establish its active case/phase.
The two constrained batches were predeclared as five attempts each. Each stopped when a failure appeared; after verifying the separate line-933 focus signature and filing #2919, only the original remaining attempts resumed. Every failed receipt remains in the totals. The fifth one-CPU attempt was not replaced. One earlier launcher argument error occurred before test collection and is excluded from these counts.
Each concurrent suite owned its checkout, frozen dependencies and full build. Quotas were verified as cgroup
cpu.maxvalues100000 100000and400000 100000. The constrained containers used the pinned Playwright 1.63.0 imagemcr.microsoft.com/playwright@sha256:eff16c30e6f3f4af0a03fa4b706120d5e9b0891c344a27d64559aff5900a4a27, Chromium 153.0.8010.12, Vitest 4.1.11, Bun 1.4.2, image Node 24.20.0,--network=none --ipc=host --user 1000:1000, private four-GiB/tmptmpfs and checksum-verified read-only fonts. The original preload/request guards, assertions, fixture responses and deadlines remained intact. Other host load was uncontrolled. The stock-runner arm used its normal scratch filesystem instead of the private tmpfs.Inner command, with no test-name filter:
The full-project arm omits only
--filter=hygiene-review.layout.Causal control, separate from natural fixed-tree sampling
After the natural batches, changed only the close callback back to the mutable global lookup:
The complete file then reported 98 pass / 4 fail, exit 1. One is the deliberately held-close regression. Three ordinary cases additionally failed the unchanged initial-online assertion in
scene, at line 103, before host creation:dark 320: failed outcomes retain the same finding and focus; never show the next carddark 320: a managed-worktree card (unknown) offers no file to opendark 1280: configuration blocker replaces the review; Start again retries; no open findings renders deferred countsNo added delay, held callback or synthetic state change was introduced to those ordinary cases. Restoring the owner binding byte for byte gives 102/102 pass, exit 0, 193.615 s wall. This counterfactual supports the close-owner boundary as a causal fixture repair for the reproduced control; it is not a natural recurrence with #2914 intact.
A separate one-run-per-arm diagnostic added bounded callback-owner/phase records and a synchronous subscription only while executing each real close callback. Original polls/deadlines remained unchanged. With the global lookup, 101 pass / 1 held-close failure: 105 callbacks, zero dropped events, one disposed-owner → replacement-owner write,
online: true → false, old socket CLOSED / new socket OPEN. The captured writer stack containsconnectionLostand the old close callback. The target is already mounted in this deliberately held case. No ordinary initial poll fails with tracing. With owner binding and the same diagnostics, 102/102 pass, 105 callbacks, zero mismatched owners or false writes into replacements. Both diagnostic sources were restored byte for byte.The historical natural failures' same-failure writer/teardown criterion therefore remains unmet. Instrumentation again changed the observed ordering. No additional code PR is warranted by these results. The coordinator can choose a bounded non-reproduction closure without more code, crediting #2914 for the demonstrated fixture correction, while explicitly retaining the historical attribution limit. I leave the issue open with
needs: reprofor that disposition rather than claiming its stricter historical criterion was proved.CI history and verification limits
The bounded CI history query through 2026-10-25 14:07 UTC returns nine runs since #2914's merge window. The one completed post-merge main run, 40177805058, checked out the tested
541b8d983and passed: layout shard 1 executed the hygiene file 102/102, and the two layout shards passed 573 + 742 = 1,315 cases. No initial-online signature appears in its logs. Four successful draft runs did not execute layout. The two failed PR runs stopped at stale-candidate metadata gates with layout skipped; they provide no browser failure. The newer main run 40200485073, head3b3485e7ea2744da461d9484fc79bd8dd8da8350, and one draft run were still in progress at the cutoff; neither is claimed green. This is limited post-merge history, not a long-term reliability qualification.bun run typecheckandbun run check:pr --base origin/mainpass on the exact tested head/base. Lint/leakage, environment and changeset guards pass; no shipped files changed. The required offlinebun run test ./testsdid not complete: its outer watchdog fired, with earlier root failures and no final suite total. Seven remaining owned descendants were subsequently terminated; no unrelated PID was killed. The sampled host load had risen to roughly 500 over 15 minutes on a 32-CPU host, while mount inventories remained 421–447 rather than the documented thousands-entry leak condition. That context does not excuse or turn the failed/incomplete root proof green. Its 14 captured failure lines and final log are retained. All these local failures execute the unchanged main tree itself, with no implementation diff; #2919 also recurs in two independently installed main checkouts. No introduced-regression comparison is inferred from a later passing control.Receipts and handoff
Selected raw-log SHA-256 values:
Full commands, per-run logs/JSON case reports, runtime/CPU/source identities, patches, writer traces and cleanup receipts are retained for the coordinator. Separate findings are #2919 (title focus after explicit disconnect) and #2922 (already-handled route abort), both attached to #2753. No product behavior, assertions or deadlines were changed. No PR, ready transition, merge, contract commit, changeset or qualification-pin refresh was made. Milestone 0.44.0 remains; this invocation's claim is being released.
schlessera commentedon Oct 25, 2026
Closing (coordinator, 2026-10-25): after #2754 / #2914 (owner-bound fixture socket callbacks, merged 541b8d9) no natural initial-online timeout occurred in 11 complete hygiene inventories (1,122 cases) on 541b8d9 under stock, 4-CPU concurrent, 1-CPU concurrent and full-layout conditions, nor in post-merge main CI (102/102). Restoring only the old global close lookup reproduces ordinary initial-online failures; owner binding removes them (evidence: #1974 (comment)). The historical natural writer is not separately proven; reopen with a new receipt if it recurs. Other observations filed as #2919 and #2922.