Repository navigation
ui-react: native continuity setup times out awaiting its initial track upload #1956
Description
Out of scope
Changing product offline upload policy, forcing the whole browser suite online, granting external network access, weakening the namespace/preload/request guards, shortening or removing any continuity observation window, deleting the upload predicate, or treating an unchanged retry as a correction. This is not a claim that earlier passing native continuity receipts are invalid or that the product loses uploads.
Context
At current main 085d8ccf4a76f58b48640800ee9e86cb573aa2be, an isolated diagnostic of the original native case 320 phone, dark: an IME composition started before a drop is still active after two drops and commits normally stopped during scene preparation. The original predicate waiting for the track chip's accessible label to contain uploading timed out after 30 seconds. The IME action, connection drops and final terminal/history checks were never reached.
The command used the original mandatory package/client build, frozen dependencies, Bun 1.4.2, real Chrome 140.0.7339.127, ordinary UID, the existing test preload and BRAIN_REQUIRE_CHROME=1. An explicit user/network namespace had only an up loopback interface and no external/default route; setup capabilities were dropped before the test. Native browser launch retained --no-sandbox and --disable-dev-shm-usage. The existing browser route permits only the fixture's local origin.
The test-only diagnostic added passive Playwright socket metadata listeners and synchronous timestamps. It did not replace the browser WebSocket, change socket forwarding, send protocol frames, add waits, or change fixture actions. All 192 original await expressions, 61 matcher expressions and five test-name expressions were identical. There was no observer exception or unreadable metadata record. The source was restored byte-for-byte afterward.
Actual outcome: 0 pass / 1 fail / 9 filtered / 2 assertions, body 31,826.90 ms, Bun 81.45 s, whole command 81.53 s. Mandatory setup was 49,046.795208 ms; CPU was 86.20 user + 7.53 system seconds, peak RSS 1,256,344 KiB. Shared-host load was uncontrolled. This is an executed scene-readiness failure, not a failed terminal-equivalence experiment.
A separate minimal read-only probe used the same namespace setup, UID, dependencies and Chrome launch flags, through bun run test with the original preload and required-Chrome guard. A fresh about:blank page returned navigator.onLine=false. It passed one diagnostic assertion in 0.53 s whole command (293.53 ms body; Bun 463 ms), CPU 0.30 + 0.21 s, RSS 171,644 KiB. It made no app build, online setter, interface/route change or external request.
Evidence limit: the failed scene did not capture its own navigator.onLine, chip label, track state, net.uploads, request/response events or page errors. The separate probe establishes that harness's browser precondition, not the cause of the earlier scene failure. A paused upload, a lost input/action, another state transition, or an observer effect must not be ruled out solely from these receipts.
Source at the exact main commit:
- (
scene,packages/ui-react/tests/connection-continuity-runtime.test.ts:344-375) creates the context, permits only the local origin, holds track-upload responses, and waits for a connected socket. It does not establish or assert the browser's native online state. - (
await page.locator,packages/ui-react/tests/connection-continuity-runtime.test.ts:401-404) selects the original nonempty 202-byte GeoJSON and waits foruploadingbefore saved-draft and later recovery assertions. - (
const changed,packages/ui-react/src/components/chat/composer.tsx:180-185) gates the real upload queue on both connected WebSocket state andnavigator.onLine !== false. - (
add,packages/ui-react/src/lib/track-uploads.ts:97-108) stages files aspausedwhen the queue is offline; its pump only starts picked files. This supplies a concrete hypothesis, not a measured failed-scene state.
The original continuity test SHA-256 is 3b77a5695a32890662d561e795fa37675117095beaa803a647a1a55f1e891f18; the separate diagnostic probe source SHA-256 is 0f20f2ba077f8c77d952b3a877e7abadcc4c69af99b882ac0cd178b4c06c4807. Raw logs, commands, source copies, AST comparison and namespace/resources receipts are preserved in checksum-addressed snapshots.
Scope
Supporting #736: native fixture connectivity and controlled host state. This supports #1855 but is separate from the test-cost optimization scope of #1849. GitHub refused the native parent attachment on 2026-10-14 because #736 already has its maximum 100 direct sub-issues (HTTP422). This issue remains standalone; the reference does not claim native membership. Existing issues were not moved to make room.
Diagnose the intended initial online-upload precondition in this unchanged native continuity fixture under an explicitly offline harness. Capture the failed scene's actual browser connectivity, socket status, selected file, track state/chip text and original upload request/held-route counters. Establish whether the problem belongs to fixture/harness preconditions or a product transition before selecting a correction.
Acceptance criteria
- Preserve both receipts and distinguish the failed scene from the independent about:blank probe.
- Capture the missing scene-local state at the original upload predicate, without changing its timeout, original action sequence or expectation.
- Establish a source-bound causal control. If a harness or fixture correction is appropriate, preserve genuine native offline/online events and both directions of upload interruption/resumption; do not mask them with a permanent online override.
- Preserve both viewports, ten recovery cycles, native IME/commit, DOM identity, scroll/focus/selection, draft/attachment/pending-pill identity, upload completion and no-unsolicited-send assertions. All original negative windows remain unless separately qualified under their existing scope.
- Prove any correction with intended failing-first/restored controls, cleanup of observer/browser state on failure, focused native proof and complete selected current-head hosted qualification.
Verification
Start from the exact source above with frozen dependencies. The original selection is:
BRAIN_REQUIRE_CHROME=1 bun run test packages/ui-react/tests/connection-continuity-runtime.test.ts --test-name-pattern '320 phone, dark: an IME composition started before a drop is still active after two drops and commits normally'Run it inside the explicit ordinary-UID, loopback-only namespace with the preload and original browser route guard. Retain the mandatory build. Add bounded read-only failure-state diagnostics before deciding on a controlled environment comparison or source correction. Do not classify a separate online-state probe as failed-scene attribution.
Related work
Closed #867 and #1184 measured and repaired ambient-offline staging in other picker/staged-track fixtures; they are relevant precedent, not an established duplicate or cause here. Open #1917 reaches a later missing queued-follow-up assertion after successful upload/recovery in this same file. #1915's zero opening-animation observation and #1884's file-loading accessibility naming defect are unrelated boundaries. The original continuity behavior belongs to #1013 under #578; this diagnostic was discovered during #1855, without changing its wait policy.
Contract impact
No selected product or contract change. A fixture/harness correction would be test-only; any product correction needs its normal contribution and release proof.
Current reproduction and implementation boundary — 2026-10-15
At inspected main 400c50ed231f33eeca875ec9223b24ad535b2b22, a new scene-local diagnostic reproduced the original upload predicate timeout in an ordinary-UID loopback-only namespace. Before the predicate and after its unchanged 30-second timeout, the actual scene reported native navigator.onLine=false, connected WebSocket, intact draft text plus one image, the named nonempty 202 B track chip reading waiting for connection, and zero upload requests/held routes. The chip wording maps to paused (trackStatus, packages/ui-react/src/lib/track-uploads.ts:26-32). This fills the prior scene-local evidence gap.
A paired native environment control added one up dummy interface with a documentation-only address inside the isolated namespace, still with no external/default route. No browser online override, app change, predicate/timeout change or network-guard weakening was made. The actual scene then reported navigator.onLine=true, connected WebSocket, the same nonempty track uploading, and one upload request held by the original route. The original selected IME/two-drop case passed all 76 expectations. Both runs retained mandatory package/client builds, the original preload, BRAIN_REQUIRE_CHROME=1, native offline/online actions and observation windows. Bun was 1.4.2 and Chromium was 152.0.7977.82; these are new controls, not a rerun of the historical Chrome 140 receipt.
The local initial-upload failure is now reproduced and source-bound to the fixture inheriting native offline state. Implementation should establish/assert its intended initial native connectivity under an egress-denied harness, preserving subsequent genuine offline/online events and upload interruption/resumption. No permanent navigator override or product policy change is selected. The remaining work is a scoped fixture/harness correction with the acceptance criteria and complete selected qualification above; this diagnostic does not qualify all ten cases or the historical browser version.
Correction (2026-10-15): Replaced the missing-reproduction handoff with executed scene-local failure and paired native-environment evidence. Historical receipts and their original limitations remain historical. Removed needs: repro; the complete ordinary issue can be picked up for the scoped correction.
Completed correction and verification — 2026-10-16
PR #2132, originally tested at head 34e4c0e96dbe5259367f5be36591e17e1fb9b6ac and now rebased to head 8a0f0fe49d2711f20e50a7368b40e6e58e935817, establishes the intended initial native connectivity locally to the networked continuity contexts: start offline, create the real page, transition online before app navigation. It asserts both initial states and the native state plus one trusted event in each later drop/recovery direction. Failed scene preparation closes its context/page/listeners, with a real-browser injected-failure control. No navigator property, product offline policy, external route, guard, deadline or negative observation window changes.
On source base 9506026705425653a40608395aa756cae2a344b2, Bun 1.4.2, frozen Playwright 1.63.0 and real Google Chrome 140.0.7339.127 in the ordinary-UID loopback-only namespace, the original selected IME case first failed its unchanged 30-second upload predicate. Actual scene observations again showed native offline, connected WebSocket, the named 202 B track paused, intact draft/image and uploads=0/held=0. This is a new source-bound receipt; older receipts and their limits remain above.
The restored complete current file passes 15 cases / 1,836 assertions in 395.64 seconds whole command, including every one of the 14 existing cases plus failure cleanup. Both widths, ten-cycle paths, native IME/commit, late-history/snapshot cases, identity/geometry/selection/draft/upload/no-send assertions remain. Omitting failure cleanup fails the real page-closed assertion; suppressing the native offline transition while still stopping the server fails the native offline assertion. Both mutations are restored. Final strict types, local preflight (54 cases / 181 assertions) and decision citations (44 cases / 113 assertions) pass. The PR records CPU/RSS, complete commands/conditions, all six native attempt costs including two incomplete development attempts, and the existing #1993/#1999 matcher limitation avoided by the final cleanup control.
The ready confirmation run 38897050841 completed unit (1) successfully on actual merge checkout dbf3139fb925f6daf70461480886e6697ada69a4, tree aa596d1a2f2873847f6e269fcd061ac8647b856f, combining base b67b1b84e8ceacf8f0df3aee8f23f8bf32a91703 with unchanged head 34e4c0e96dbe5259367f5be36591e17e1fb9b6ac. All 62 selected file identities match the full report: 967 pass / 7,069 assertions / no failures or skips, including exactly the same 15 continuity cases / 1,836 assertions and byte-identical changed source. The PR records every executed continuity name, the artifact digest and costs: 624 s job elapsed, 583.828 s proof commands, 461.052 s continuity file including setup/teardown; no speedup is claimed. The unit-proof-1 artifact SHA-256 is a12ec0f0997af729fbfc1a286cd3bfabfb5a16a64005a1339e740c88b21a53ac.
The previous-base event has finished: all 13 selected jobs before the aggregate passed, but the aggregate correctly rejected the moved base (Candidate became stale: live PR head, readiness or base changed). All 14 executed checkouts were the previous candidate dbf3139fb925f6daf70461480886e6697ada69a4; total job time was 8,004 s and event elapsed 1,652 s. No test failure is claimed. Main advanced to 3fc6fea5e22304df2810348074c32b1983fbea46; #2062 changes browser timing extraction/refresh and layout cost admission inputs, while #1997 changes stack workflow/documentation. Neither changes local continuity proof inputs. A ready transition retained GitHub's old PR base and merge ref, so event 38900241519 was cancelled during metadata (43 job seconds, no executed test jobs; preceding draft event 38900236725 cost 3 job seconds).
The branch is now rebased onto immutable base 3fc6fea5e22304df2810348074c32b1983fbea46, with current head 8a0f0fe49d2711f20e50a7368b40e6e58e935817. GitHub REST and the fetched object agree on merge candidate 32723cf0a78268eb5da6874fd3ecf9fb4881311a, exact current base/head parents, and tree 35b99c9f7097585d9c430c7e988971c300bebd20. The original two-file patch is byte-for-byte unchanged; a ten-line work-issue CI/merge reference correction records the observed stale-ref behavior and required verification/branch refresh, making three changed files without changing CI policy. Additional committed local preflights against the new main pass all gates and 54 cases / 181 assertions: 6.18 s before rebase and 4.90 s afterward, with CPU/RSS recorded in the PR. Historical native and hosted proof keeps its original identities; no heavy local repetition was needed.
The refreshed draft event 38900476092 passed both executed jobs on verified candidate 32723cf0a78268eb5da6874fd3ecf9fb4881311a (44 job seconds), and contract event 38900476472 passed. The PR was marked ready at 12:27 UTC on 2026-10-16. Ready confirmation 38900615201 then passed all 14 selected jobs on that exact candidate, including the proof aggregate. Its fresh unit report passes 973 cases / 6,985 assertions across exactly all 62 selected files, including the same 15 continuity cases / 1,836 assertions. Previous-base receipts remain historical; the current-candidate and automatic-main results below complete qualification.
Correction (2026-10-16): Recorded complete selected ready and automatic-main proof, verified squash identity, all fulfilled acceptance criteria and final measured costs. Earlier source identities, stale/aborted events and incomplete local attempts remain historical evidence. The implementation claim is complete; closure and dependency reconciliation remain tracker bookkeeping.
Merged result and automatic main verification — 2026-10-16
PR #2132 merged at 12:54:04 UTC as 626a03af4a9db064751230a84732755b8afa961e. Immutable API and local Git verification agree on sole parent 3fc6fea5e22304df2810348074c32b1983fbea46 and tree 35b99c9f7097585d9c430c7e988971c300bebd20, exactly the ready candidate's qualified tree; the squash is present on remote main.
The automatic main CI run 38903809808 passed all 14 selected jobs, including aggregate 116990388374. All 14 actual job checkouts are the squash above; the retention ledger is {}. Main CI cost 8,407 job seconds / 1,191 elapsed seconds. The successful ready confirmation cost 8,592 job seconds / 1,491 elapsed seconds. Total CI-only job time across this invocation is 25,185 seconds: 8,186 for earlier events, 8,592 for final ready confirmation, and 8,407 for main. Separate automatic website run 38903809854 passed artifact and deployment jobs, costing 337 job seconds, excluded from that CI-only sum. Separate contract events are also excluded. Historical stale/aborted receipts and incomplete local development costs remain recorded; no speedup is claimed for this failed-to-passing fixture correction.
The automatic-main unit (1) job 116982564364 passes 973 tests / 6,985 assertions / zero failures, errors or skips across exactly all 62 actual selected file identities. The continuity file executes the same exact 15 cases / 1,836 assertions, with unchanged source SHA-256 76473f62a80848a8b247d052b8153ce994bf5ced5a652d73dc36c4751ac9c486. Its checkout log, manifest, JUnit commit properties and resource receipt all identify the actual squash, sole parent and verified tree above. Chrome is 155.0.8059.39 and Bun 1.4.2 (744846f84).
The main unit-proof-1 artifact is 47,291 bytes. Downloaded ZIP SHA-256 de0bd2099cab834955fa71b7bde70c5dace48e29b1d7d4321c2abf74e3085020 matches GitHub's digest. It retains the full selected report, checkout manifest, timings and resource receipt. Unit job elapsed 597 s; proof commands 554.791 s; JUnit total 554.662 s; continuity file 451.719 s including setup/teardown, with 345.432 s across case bodies. All 107 original negative observations remain (53.660 s) plus 107 retained frame observations (2.683 s); render readiness remains 35 calls / 6.798 s. VM-wide proof sampling records 489.73 active CPU seconds and 2,557,358,080 peak used bytes across 555 one-second samples on four CPUs; this is not process peak RSS.
All #1956 acceptance criteria are satisfied: historical receipts and their limits remain; the missing scene-local state was captured at the unchanged upload predicate; native setup and both trusted transition directions are asserted without an online-property override; both viewports, ten-cycle and IME paths, history/snapshot cases, identity/draft/upload/no-send checks and original negative windows remain; failed setup owns and closes its context; intended failing-first/mutation controls and complete selected current-candidate/main proof pass. PR and issue retain release milestone 0.44.0. Implementation and artifact-audit claim c1956-20261016-a is complete. Issue closure and dependency reconciliation are the remaining tracker bookkeeping; #1855 remains separate optimization work.
Activity
schlessera commentedon Oct 15, 2026
2026-10-15 bounded reproduction at main
400c50ed231f33eeca875ec9223b24ad535b2b22: the scene-local initial-upload failure is reproduced, with a native environment control.This differs from the original diagnostic and independent
about:blankprobe: it captures the actual selected scene immediately before the original upload predicate and again on its failure/success. Only read-only state observations and a catch/rethrow surrounded that unchanged predicate. Product code, original fixture actions, timeout, expectations, socket forwarding and waits remained unchanged.Two attempts used frozen installed dependencies, mandatory package/client builds, Bun 1.4.2, real Chromium 152.0.7977.82, ordinary UID, capability drop, required-Chrome guard, original network preload and local-origin browser route. The browser launch retained its original flags. This browser version differs from the historical Chrome 140 receipt.
navigator.onLine=false, WebSocketconnected, named 202 B GeoJSON chipwaiting for connection, uploads=0, held=0; unchanged after original 30-second timeoutnavigator.onLine=true, WebSocketconnected, same named 202 B chipuploading…, uploads=1, held=1; original predicate passesBoth captures retained the draft text and one image. The live picker FileLists were already cleared by the application; the nonempty named track was measured from the actual chip, rather than incorrectly reading the cleared input as lost file selection.
waiting for connectionmaps to queuepaused(trackStatus,packages/ui-react/src/lib/track-uploads.ts:26-32). The queue gate requires native online state as well as connected WebSocket (const changed,packages/ui-react/src/components/chat/composer.tsx:180-185), and an offlineaddstagespaused(add,packages/ui-react/src/lib/track-uploads.ts:97-108). These observations and the paired native-state control establish the initial fixture precondition boundary; no product upload-loss claim follows.Exact selected command in each namespace:
Namespace launch used
unshare --user --map-current-user --keep-caps --net,ip link set lo up, thensetpriv --inh-caps=-all --ambient-caps=-all --bounding-set=-all. The paired arm additionally ranip link add repro0 type dummy,ip addr add 192.0.2.1/32 dev repro0,ip link set repro0 upbefore dropping capabilities;ip routewas empty. No external route/access, permanent navigator setter, timeout extension or changed assertion was introduced.The original source hash was restored byte-for-byte:
3b77a5695a32890662d561e795fa37675117095beaa803a647a1a55f1e891f18; diagnostic source hash140e92d8f6d5c352da91fa93cfde3f375d487ae7a5a9c4d7f80e814f75b44da0. Temporary browser/server state was cleaned by the original teardown and namespace exit.Limits: one attempt per arm, uncontrolled shared-host load, one selected case and current Chromium only. This does not qualify the full ten-case suite or assert identical behavior on historical Chrome 140. The next work is the scoped native fixture/harness precondition correction and its acceptance/qualification proof, preserving real subsequent offline/online transitions and all original observations. The body now records this evidence; remove
needs: reproand addagent-ready. Preserve the existing p2 ranking: wanted, unscheduled work, with no invented milestone. Standalone placement remains appropriate because the supporting epic's documented native-child limit has not been worked around.schlessera commentedon Oct 16, 2026
Claiming the scoped native connectivity harness correction for the authorized epic continuation. Claim token: c1956-20261016-a. Intended branch: fix/1956-native-connectivity-c1956a. Preserve the native online/offline transitions, all original continuity observations and offline guards; prepare a draft PR with failing-first and restored native evidence.
schlessera commentedon Oct 16, 2026
2026-10-16: scoped correction prepared in draft #2132 at
34e4c0e96dbe5259367f5be36591e17e1fb9b6ac. The body now records the fresh scene-local failing-first receipt, intended cleanup/native-drop mutation failures, restored complete 15-case / 1,836-assertion native pass and local checks. Original guards, native transitions, observation windows and coverage remain. Complete selected hosted confirmation and merge/main reconciliation are still required; the claim remains active for this shared end-to-end invocation.schlessera commentedon Oct 16, 2026
Completed #1956 through PR #2132, merged as
626a03af4a9db064751230a84732755b8afa961e. Verified sole parent3fc6fea5e22304df2810348074c32b1983fbea46and tree35b99c9f7097585d9c430c7e988971c300bebd20match the qualified ready candidate; the squash is on remote main.Ready proof 38900615201 and automatic main proof 38903809808 each pass all 14 selected jobs, with every actual checkout verified and main retention
{}. Main unit proof covers all 62 selected files (973 tests / 6,985 assertions), including the exact 15 continuity cases / 1,836 assertions, unchanged source and all 107 original observation windows. The main unit artifact digest isde0bd2099cab834955fa71b7bde70c5dace48e29b1d7d4321c2abf74e3085020.Every acceptance criterion is met: scene-local failing-first evidence, genuine native setup/drop/recovery states and trusted events, preserved behavior/windows, owned failed-setup cleanup, intended mutation failures and complete selected proof. The bodies retain full case/source/resource receipts and historical limits. CI-only invocation cost is 25,185 job seconds, including stale/cancelled events; separate website success costs 337 job seconds. Incomplete local attempt costs remain recorded. No speedup is claimed.
Release milestone remains 0.44.0. Claim
c1956-20261016-aimplementation and artifact audit are complete; the coordinating agent will read back and perform issue closure/dependency reconciliation. #1855 remains separate optimization work.