Repository navigation
test(ui-react): establish native online continuity setup - #2132
Conversation
34e4c0e to
8a0f0fe
Compare
|
Completed #1956 through PR #2132, merged as Ready proof 38900615201 and automatic main proof 38903809808 each pass all 14 selected jobs, with every actual checkout verified and main retention 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 |
Refs #1956. Supports the existing #1855 dependency.
What changed
Continuity scenes now establish their intended native online state before app navigation. Each networked browser context starts offline, creates its page, and transitions online through Playwright. The fixture asserts both starting states and checks the native state plus one trusted offline/online event for every subsequent drop/recovery. Failed scene preparation closes its owned context, page and listeners before propagating the original failure; a real-browser failure control covers that ownership. Snapshot preparation also enters its existing cleanup boundary before creating the page.
Why this shape
Installed Playwright 1.63.0 skips the initial false offline protocol update and repeated false updates. A context's default online option can therefore inherit the offline network namespace even while its loopback WebSocket works. A genuine native transition after page creation establishes the upload precondition without replacing navigator properties, granting external routes, or changing product policy. The namespace, preload, local-origin browser guard, original action sequence, deadlines and negative observation windows remain.
All 14 existing cases remain, including both viewports, both stale/fresh history paths, three held-snapshot cases, finite rendering, ten recovery cycles per viewport, native IME/commit, DOM/scroll/focus/selection/draft/attachment/pending-pill identity, upload completion and no unsolicited sends. The added failure cleanup control makes 15 cases. An AST comparison retains all 72 original matcher expressions (normalizing only a TypeScript non-null assertion), all six original test-name expressions and both explicit delay expressions.
Proof
Original locally tested head:
34e4c0e96dbe5259367f5be36591e17e1fb9b6ac. Source base:9506026705425653a40608395aa756cae2a344b2. Local native proof uses Bun 1.4.2, frozen private dependency copies, Playwright 1.63.0 and Google Chrome 140.0.7339.127, ordinary UID and a network namespace containing only up loopback, no external/default route, then dropped capabilities. Every invocation retains the mandatory package/client builds, original preload, required-Chrome guard and original local-origin route. The focused case is the original phone IME/two-drop case.failed scene closes its page and observers(expected true, received false). Suppressing the native drop while still stopping the server failsnative drop reports offline(expected false, received true). Both fail at their intended assertions, 0 pass / 2 fail / 14 assertions; command 63.55 s. Both mutations are restored.bun run check:pr --base origin/mainpasses against recorded refb67b1b84e8ceacf8f0df3aee8f23f8bf32a91703: all lint/leakage, environment/changeset gates and 54 affected fast cases / 181 assertions. Finalbun run typecheckpasses. Decision citation check: 44 pass / 113 assertions.Local costs are observations on a shared host, not a speedup benchmark. Baseline failed command: 85.78 s, 93.42 user + 8.06 system CPU seconds, peak RSS 1,224,228 KiB. Passing focused command: 76.82 s, 94.32 + 8.14 CPU seconds, RSS 1,223,464 KiB. Mutation command: 63.55 s, 91.24 + 7.75 CPU seconds, RSS 1,233,156 KiB. Complete restored file: 395.64 s, 100.02 + 12.44 CPU seconds, RSS 1,227,008 KiB. Across the six recorded native invocations, including both incomplete attempts, command wall time totals 1,034.42 s; 412.63 s belongs to those incomplete development attempts. No performance improvement is claimed from a failed-versus-passing comparison.
Two incomplete development attempts are retained: the newly added cleanup control initially awaited native work inside Bun's synchronous promise rejection matcher, including one arm without method spies. They stalled before a named result and were explicitly terminated (exit 143): 301.22 s, CPU 84.70 + 7.20 s, RSS 1,244,412 KiB; and 111.41 s, CPU 90.91 + 7.54 s, RSS 1,226,536 KiB. The latter's passive stages place the stall after real browser/context creation. The final control explicitly awaits/catches, then makes synchronous assertions, following the already documented #1993/#1999 boundary. These incomplete attempts are not green proof or a diagnosis of another historical browser failure. There was no unchanged retry, longer product timeout or weaker assertion.
Main advanced afterward to
b67b1b84e8ceacf8f0df3aee8f23f8bf32a91703via #2067, changing onlypackages/ui-server/tests/boot-probe-deadline.test.ts. It does not overlap this fixture, its imported helpers, dependencies or product inputs. The branch retains its measured base; required hosted confirmation must prove the actual combined tree.Hosted unit proof on the previous combined base
The ready confirmation run 38897050841 completed unit (1) successfully. Its actual checkout, log and artifact agree on merge commit
dbf3139fb925f6daf70461480886e6697ada69a4, treeaa596d1a2f2873847f6e269fcd061ac8647b856f, with parentsb67b1b84e8ceacf8f0df3aee8f23f8bf32a91703and the unchanged PR head34e4c0e96dbe5259367f5be36591e17e1fb9b6ac. The changed continuity source matches the locally tested bytes (SHA-25676473f62a80848a8b247d052b8153ce994bf5ced5a652d73dc36c4751ac9c486). This is evidence for that previous combined base, not current-base qualification.The full JUnit report has 967 passing tests / 7,069 assertions / zero failures or skips, and all 62 reported file identities exactly match the selected-file manifest. The changed file appears once and passes all 15 cases / 1,836 assertions. Its executed names exactly match local discovery:
The immutable source and executed assertion counts preserve initial native offline/online checks, trusted events in both later directions, and the failure-cleanup oracle; the local intended mutations above establish their ability to fail. Hosted tools are Bun 1.4.2 (
744846f84) and Google Chrome 155.0.8059.39, distinct from the local Chrome version.The unit-proof-1 artifact is 47,238 bytes; downloaded ZIP SHA-256
a12ec0f0997af729fbfc1a286cd3bfabfb5a16a64005a1339e740c88b21a53acmatches GitHub's artifact digest. It retains the full JUnit report, selected checkout, timings and resource receipt. Unit job elapsed time is 624 s; proof commands total 583.828 s (offline lease prerequisite 26.206 s; full selected unit execution 557.622 s). The continuity file takes 461.052 s, including setup/teardown, with 346.642 s across case bodies. Its original 107 negative observations consume 53.611 s plus 2.695 s for retained frame observations. VM-wide sampling during proof commands records 525.81 active CPU seconds and 2,594,672,640 peak used bytes on a four-CPU VM (585 one-second samples); this is not process peak RSS and excludes separate setup/install and queue time. These costs are observations, not a speedup claim.That previous-base event is now complete: all 13 selected jobs before the aggregate passed, while the aggregate failed at
candidate-proof.ts:22withCandidate became stale: live PR head, readiness or base changed. All 14 executed checkouts weredbf3139fb925f6daf70461480886e6697ada69a4; total job time was 8,004 s, event elapsed 1,652 s. This is a stale-candidate failure, not a test failure; it does not qualify the newer combined tree.Current candidate and completed selected hosted proof
Main advanced to
3fc6fea5e22304df2810348074c32b1983fbea46. #2062 changes browser timing extraction/refresh and layout cost admission inputs; #1997 changes stack workflow/documentation. Neither changes the continuity fixture, its runtime helpers or dependencies. A fresh ready transition alone retained GitHub's old PR base and old synthetic merge ref: run 38900241519 was cancelled during metadata after 43 job seconds, with no test jobs executed; its preceding draft event 38900236725 cost 3 job seconds. These cancelled events are not passing proof.The branch is now rebased onto immutable main
3fc6fea5e22304df2810348074c32b1983fbea46. Current head is8a0f0fe49d2711f20e50a7368b40e6e58e935817. GitHub REST and the fetched merge object agree on candidate32723cf0a78268eb5da6874fd3ecf9fb4881311a, parents exactly current base/current head, and tree35b99c9f7097585d9c430c7e988971c300bebd20. The original two-file implementation patch is byte-for-byte unchanged; continuity source SHA-256 remains76473f62a80848a8b247d052b8153ce994bf5ced5a652d73dc36c4751ac9c486, andtest-waits.mdSHA-256 remainsa182f2c0abb443c7602c3b3d08a0414cfc4fa42809e1487d101fc20cf7ef3ca8. Historical native and hosted receipts retain their original head/base identities.The PR now changes three files: the original fixture/testing documentation plus a ten-line correction to the work-issue CI/merge reference. That note records the observed stale ready-transition behavior, checking REST base and fetched merge parents before expensive confirmation, and refreshing a draft branch when necessary. It does not change CI or freshness policy.
Both additional committed local preflights against
origin/mainat3fc6fea5e22304df2810348074c32b1983fbea46pass all lint/leakage/environment/changeset gates and 54 cases / 181 assertions. Before rebase: 6.18 s elapsed, 12.38 + 1.59 s user/system CPU, peak RSS 587,792 KiB. Rebased final head: 4.90 s elapsed, 11.79 + 1.25 s CPU, peak RSS 608,932 KiB. The local native suite was not repeated because its inputs and original patch are unchanged; the current candidate subsequently completed the selected hosted proof below.The refreshed draft CI event 38900476092 passed both executed jobs on verified candidate
32723cf0a78268eb5da6874fd3ecf9fb4881311a, costing 44 job seconds; contract event 38900476472 passed. The PR was marked ready at 12:27 UTC on 2026-10-16 to request fresh confirmation, which completed successfully as recorded below. Merge/main verification subsequently completed as recorded below.Completed current-candidate confirmation
Ready confirmation 38900615201 passed all 14 selected jobs, including the proof aggregate, with all 14 actual job checkouts verified as
32723cf0a78268eb5da6874fd3ecf9fb4881311a(parents3fc6fea5e22304df2810348074c32b1983fbea46and8a0f0fe49d2711f20e50a7368b40e6e58e935817, tree35b99c9f7097585d9c430c7e988971c300bebd20). Total job time was 8,592 s. This is the completed selected proof for the current candidate; the previous-base event and cancelled refreshes above remain separate receipts. Final live head/base checks and actual squash/main verification subsequently passed as recorded below.The fresh unit (1) job 116971998698 has 973 passing tests / 6,985 assertions / zero failures, errors or skips across exactly all 62 current selected file identities. The changed continuity file again passes the exact 15 case names listed above / 1,836 assertions, with source SHA-256
76473f62a80848a8b247d052b8153ce994bf5ced5a652d73dc36c4751ac9c486. The shard's root-file distribution differs from the previous event, so its full-report totals are recorded separately; the continuity identities, source and assertions match. Checkout log, artifact manifest, JUnit commit properties and resource receipt agree on the verified current candidate.The fresh unit-proof-1 artifact is 47,309 bytes, with downloaded ZIP SHA-256
afcc5d47a4ed9454d3881c26864b6bc96519bd57a94011de21a87e238aa36a7dmatching GitHub's digest. It retains the full selected report, checkout manifest, timings and resources. Chrome is 155.0.8059.39 and Bun 1.4.2 (744846f84). Unit job elapsed 596 s; proof commands 558.595 s; JUnit total 558.473 s. The continuity file took 453.375 s including setup/teardown, with 344.475 s across case bodies. Its original 107 negative observations took 53.614 s, plus 107 retained frame observations taking 2.659 s; render readiness remained 35 calls / 7.030 s. VM-wide proof sampling recorded 479.95 active CPU seconds, 2,776,768,512 peak used bytes, and 559 one-second samples on four CPUs; this is not process peak RSS. No speedup is claimed.CI-only cost before this final confirmation totals 8,186 job seconds: initial draft 42, previous-base confirmation 8,004, preceding cancelled draft 3, cancelled stale refresh 43, another old-head draft 50 (38900294069, both actual checkouts
dbf3139fb925f6daf70461480886e6697ada69a4), and refreshed current-head draft 44. Including the successful final confirmation, these CI events total 16,778 job seconds, excluding separate contract events. Costs include unsuccessful/stale work rather than presenting only the final pass.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 parent3fc6fea5e22304df2810348074c32b1983fbea46and tree35b99c9f7097585d9c430c7e988971c300bebd20, 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
de0bd2099cab834955fa71b7bde70c5dace48e29b1d7d4321c2abf74e3085020matches 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-ais complete. Issue closure and dependency reconciliation are the remaining tracker bookkeeping; #1855 remains separate optimization work.Checklist
Anything left open
No implementation or verification work remains for #1956. Issue closure and dependency reconciliation remain as tracker bookkeeping; #1855 is a separate optimization task.