Repository navigation
test(ui): reduce repeated browser journeys and fixture startup - #185696
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR reduces automatic Control UI unit jobs from three to two and removes repeated work from existing browser tests and Gateway fixtures. Example: Canonical automatic CI selects the Control UI unit inventory.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this owner-directed optimization is useful, but the shard-width change leaves two dependent test contracts failing in exact-head CI. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe CI manifest turns repository, event, and changed-path facts into test inventories and job matrices; GitHub Actions executes those plans through the existing test runners. flowchart TD
A[Repository and event facts] --> B[CI manifest planner]
B --> C[Selected test inventory]
C --> D[Native Vitest shards]
D --> E[Unit and browser jobs]
E --> F[CI gate]
Technical reviewBest possible solution: Keep the existing planner and fixture owners, repair both dependent test expectations, and retain the two-runner change only if its recorded trial passes. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the repeated work, and exact-head CI annotations directly confirm both introduced test failures; no target code was executed during this review. Is this the best way to solve the issue? The existing-owner changes are appropriately scoped, and the inspected consolidations retain distinct behavior checks; the remaining repairs belong in dependent tests rather than another planner abstraction. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against db5caca3489d. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests +26, Docs +6, Other +7. Total +39 across 19 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 27, 2026, 5:01 AM ET / 09:01 UTC. |
|
Merged via squash auto-merge.
|
…law#185696) * test(ui): reuse mention selections and trim repeated history proof * test(ui): reuse boot boundary module lookups * test(ui): share config autosave and identifier persistence proof * test(ui): consolidate repeated header menu lifecycle checks * test(ui): consolidate native pull request journeys * ci(ui): share automatic unit coverage across two runners * test(ui): reuse authenticated clients for fixture RPCs * test(ui): retain three shards and await persisted reconnect history
What Problem This Solves
UI CI repeats browser journeys, native menu cycles, a real roster debounce, and full source-map scans against one immutable boot-test build. Fixture observations also start a new CLI process for each RPC.
User Impact
No user-visible change. Runner labels, shard counts, per-job workers, concurrency, timeouts, runtime policies, production behavior and dependencies are unchanged. The two-unit-shard experiment was rejected after real CI and reverted; this PR retains only the test-work reductions.
Why This Change Was Made
This change reduces repeated setup within existing test flows, uses their existing browser clocks, and reuses authenticated fixture clients. It preserves each remaining assertion and names the cheaper owner proof for every removed case.
The palette now selects ten people once, measuring the same live chips at 1280 and 390 pixels with separate empty baselines and retained 1/2/10-person anchors, overflow checks, ten-person limits, keyboard dismissal and one exact native submission. Cold lazy-module mention handoff remains separate.
The removed warm-history
stalerow is covered bychat-history-cursor.test.ts→ clears a rejected cursor before falling back to a full tail fetch. The retained compaction and branch-change E2Es still prove IndexedDB warm reload, rejected subscribed cursor, cursor-free full refill and visible replacement history. Current, appended-message and authenticated-scope-change rows remain.The omitted duplicate palette submission/focus observation is covered at both viewport widths by
command-palette-create.e2e.test.ts→ starts one $destination task without replacing the foreground draft at $width px (1280/local, 390/device). Those physically submit and assert unchanged foreground URL, draft, focus and both caret endpoints.command-palette-mentions.test.ts→ carries selected people into the first message for a $role retains the mention transport owner; the consolidated browser journey still verifies its exact ten-person message and spans.The config suite combines quiet autosave and 64-bit identifier persistence in one browser journey. It retains the mixed string/numeric IDs, exact raw and whole config payload, base hash, four viewport checks, save/reload, raw editor verification, and optional captures/video. The removed standalone identifier case also has a cheaper owner keeper:
config-draft-model.test.ts→ config.set preserves 64-bit id strings through the form submit roundtrip.The boot-boundary suite now memoizes its five successful source-path lookups for its own build lifetime: twenty full map scans become five. The map clears before a new build root is assigned. Resolution stays lazy, errors still throw, the shared resolver stays unchanged, and all eighteen boot cases remain. No browser state is shared.
The pull-request E2E keeps geometry checks at one, two and three rows, then traverses all three identities once in each viewport (12 → 6 action traversals). The exact cloud-idle fixture and its enablement, absent account controls and absent reclaim-guidance checks move into the full terminal publication journey, removing a duplicate page launch. The hovercard Escape test advances its existing browser clock for the same 300 ms no-reopen assertion.
The removed requested-result wording remains covered by
chat-pull-requests.test.ts→ keeps requested publication recovery exposed beside merged history. Shared/personal eligibility remains covered bychat-github-publication.test.ts→ keeps personal publication unavailable on busy or remote workspaces without blocking shared publication. Native action/focus/Escape/hide proof remains inchat-pull-requests.browser.test.tsx→ keeps title-first Details cards usable at $width px with $checks checks; mobile current/hidden/superseded routing remains inchat-details-mobile-content.test.tsx→ routes current mobile PRs to Checks and rejects hidden or superseded navigation.The header browser test now checks native hide completion, exactly-once callbacks, closure and focus on its existing Minimize/Side panel selections, instead of reopening the same action twice more. Both labels and states, the paused Escape/reopen lifecycle, and callback-before-content-update observations remain. No full case was deleted.
The goal case installs the existing browser clock only after the held mutation ACK completes and Save goal disappears, then advances the roster collection window. The sessions.list response stays held until requested, preserving the losing-read ordering and final authoritative objective assertions. Appearance keyboard journeys are unchanged: sidebar, header and compact have distinct parent action/focus owners.
Evidence
pnpm install --frozen-lockfilepnpm tsgo:uigit diff --checke7a12c5aff60427a14f8a73a6463f042c0793eff: run 40478911093 passed, all 12 selected UI jobs; merged as 0465189Integration review found no overlapping changed paths between the retained test cuts. The initial five-case experimental planner fixture needed its missing UI-scope flag corrected; that experiment and its five added cases are now reverted, and the original planner is restored.
No screenshots are needed: production appearance is unchanged. No test files, imports or support exports are retired; whole-repository deadcode scans are not repeated for these case consolidations.
Cost evidence and selection limits
The accepted #183498 checkpoint remains 88.33 comparable / 91.50 full runner minutes, 593-second critical path (run 40276355362). The latest completed scheduled main 40468589754, head
fde1a2ef8667cd00499694dbfb806ba7e7e2aa88, costs 91.2667 comparable / 94.10 full minutes, 697 seconds, including failed work (10 UI passes, 3 failures). The older 40463504008 snapshot was 119.30 comparable / 122.43 full minutes, 808 seconds. These are different selected workloads and heads; none is silently normalized to another or counted as this PR's saving.The three journey files passed on the older 40463504008 snapshot: goal recovery 32.025s, palette mentions 29.259s, warm history 31.062s, or 92.346s total. The removed stale row was 4.199s and the duplicate palette viewport case 10.294s. The boot-boundary file also passed all eighteen cases in 162.081s on that run (job
122053691132); this includes its private ungrouped build and browser flows. Config safe write passed in 43.091s on that same shard; its original quiet and identifier cases took 4.314s and 3.174s respectively. The header case envelope was 3.221s in main run sourcefde1a2ef8667cd00499694dbfb806ba7e7e2aa88; its file was unchanged on this batch base. These are historical bounds, not projected or measured savings. After timings will come only from this PR's real CI run; no local speed claim is made.A prior bounded diagnostic of the unchanged source-map resolver used an older existing artifact (
ef1b9ce2a8868d0c1bd2ea818b3f6eaa30621c50, 654 maps), five serial interleaved AB/BA pairs, and a loaded Mac. Memoization reduced logical map reads/JSON parses 13,080 → 3,270 (−75%) and process CPU median 4.544 → 0.766 seconds. It compared identical twenty output regex strings; failures and URL semantics were unchanged. This is structural/CPU evidence, not current-head CI savings, and its noisy wall timings are not a forecast. No new local benchmark or build was run for this PR.Runner minutes sum Actions job start/completion spans, not rounded invoices. Fixed overhead is already mostly shared: exact dependencies and Chromium restore from cache, and ordinary E2E shards do not each rebuild the public UI. This cut attacks repeated browser work without expanding infrastructure.
Latest completed main: per-job phases, ranked by occupied runner minutes
Additive job and owner phases
All cells are runner minutes. Env/deps and browser are refined in the next table. Setup/callback/cleanup/queue/mixed/unclassified replace the original inclusive test cell and sum to it. Unclassified on a missing-log row means the entire test window is unresolved, not test execution.
Additive environment and browser refinements
These rows replace Env/deps and Browser above; do not add them again. Cache includes only observed restore scopes. Install tail preserves a reconciliation scope crossing a rounded API boundary. Residual is uninstrumented action overhead.
Setup-only refinement and non-additive Gateway observations
Fixture-only, Gateway-only and their overlap partition just the setup-only cell above. Gateway-start/readiness unions at the right are nested observations, not additional time; they may also overlap callbacks in mixed windows.
The tables partition observed intervals. Missing owner markers remain unclassified; callback time is not pure CPU. Gateway start/readiness unions are nested observations and are not added to totals. Failed work is charged. All thirteen exact-job logs were retained.
Unit setup consolidation trial — rejected
Primary metric: API job started_at → completed_at. Both rows pass, but one exceeds593s; inventory and CPU details below.
Trial total: 26.4167min, latest completed main 14.1000min (+87.35%), contemporaneous main 27.1000min (-2.52%, includes a failure).
Inventory: 2169 core runtime files / 2169 selected files, plus 66 WebKit files = 2235 project-file executions; identical row group inventories=True. Parseable modules=2232; duplicate project/file ownership across rows=0. Unparseable paths are listed in JSON.
Limits
The packing commit was reverted after this result. Acceptance required both complete inventory and a maximum 593-second job, plus a justified reduction in aggregate runner cost. The 1,017-second row alone failed that limit. Different heads, failed work and the additional WebKit tail prevent treating the comparison as causal; the failed trial is still charged in full. No additional run was started just to seek a better timing. The ordinary three-shard planner and its original guards/docs are restored. Focused reversion proof: 10 projection/runtime cases and 2 execution-envelope cases passed once, tooling types passed, and independent P0–P2 review was clean.
Stop booting the CLI for fixture RPC observations
HTML publication and reconnect continuity now acquire one existing authenticated Gateway test client per suite, under the suite lifetime signal, and join client shutdown before Gateway teardown. This removes at least five one-shot CLI process launches from the successful paths (one HTML
sessions.create; reconnect create and at least threechat.historyrequests). Additional reconnect poll attempts no longer boot the CLI either. The HTML dashboard handoff still runs through the CLI. No generic helper changed.The same public RPCs, parameters and response assertions remain. The uncursored reconnect history requests are still independent of the browser and its stream buffer. Both cases remain intact:
retains final parent-edited HTML after source deletion, reload, sandbox preview and exact downloadandreconstructs one streamed turn after browser socket loss, then aborts and follows up cleanly. No case was removed and no cheaper keeper substitutes for their real transport/lifecycle proof. Every original assertion remains. The two persistence checks retry their complete assertion group against a fresh cursor-free response, so faster RPC transport no longer relies on CLI startup time.These are complete callback/file windows; they do not measure CLI-exclusive time or predict saved runner minutes. The process count is a successful-path source lower bound, not an instrumented exact count. Current-main wait-clock already uses this client and is outside this cut.
Local proof: targeted UI typecheck and scoped lint/format; isolated P0–P2 reviews for both fixture RPC reuse and persistence-wait repair were scoped-clean. No new build or local E2E was run; replacement CI 40478911093 passed both complete real-Gateway shards, including the repaired reconnect case. Two-file test LOC 523→552 (+58/−29); production LOC 0. The additional lines express client lifetime and the actual persistence boundary; obsolete JSON wrappers and a type assertion are removed.
The first full run exposed one new failure in the optimized reconnect case: the fast independent history read reached the Gateway before its deferred abort partial was persisted (
40475865007,reconstructs one streamed turn after browser socket loss, then aborts and follows up cleanly). The former CLI startup delay had hidden this observation gap. The abort owner deliberately hands partial persistence to the still-settling producer; its regression test verifies the transcript remains unchanged before producer completion. The repair waits for the existing exact abort-history assertions together on a fresh RPC response. Completed-history assertions use the same persisted-state wait. All row count, exact content, idempotency, abort metadata, wire, reload and ordering contracts remain intact; no fixed sleep or production behavior changed. Runtime proof is the passing replacement CI run 40478911093; no local build was started.Initial exact-head measurement and replacement proof
Run 40475865007, head
2d949341a1b98e4eca1a79c3c5a9f731bdcb0c97, used checkoutb532c62ddbf37da1f8ecd3e58290b08d6aabd236(base344e397240dbc01d0d281ac36ece9ae3b5efa11a). The 11 selected jobs used 145.10 runner minutes with a 1,099-second completion path. Build-artifacts, Control UI performance, and locale producer surfaces were skipped; this is not a full producer-inclusive result and no savings are claimed. The contemporaneous main's 146.83 minutes had different source, selected scope and failed work; it is not evidence of a saving.RG2 failed two named cases:
loads the selected tail before restored Home and caches shared avatar bytesandreconstructs one streamed turn after browser socket loss, then aborts and follows up cleanly. The reconnect observation gap is repaired here. Main's #185661 repairs duplicate prepared-identity resolution for selected-tail; that named fix was incorporated by a conflict-free merge oforigin/mainbefore the replacement push. Both cases passed in the observed current-main run; neither is silently waived.The following table records the rejected head's real costs; it is not replacement-head proof. The replacement run will determine retained test-work cost and contracts.
Rejected trial: real per-job phase minutes
Additive job and owner phases
All cells are runner minutes. Env/deps and browser are refined in the next table. Setup/callback/cleanup/queue/mixed/unclassified replace the original inclusive test cell and sum to it. Unclassified on a missing-log row means the entire test window is unresolved, not test execution.
Additive environment and browser refinements
These rows replace Env/deps and Browser above; do not add them again. Cache includes only observed restore scopes. Install tail preserves a reconciliation scope crossing a rounded API boundary. Residual is uninstrumented action overhead.
Setup-only refinement and non-additive Gateway observations
Fixture-only, Gateway-only and their overlap partition just the setup-only cell above. Gateway-start/readiness unions at the right are nested observations, not additional time; they may also overlap callbacks in mixed windows.
Replacement head:
e7a12c5aff60427a14f8a73a6463f042c0793eff; merged mainaaa0f434e956cb25684d107a1815535fd6d683f0, including the selected-tail repair #185661. Its real PR diff is only the ten test files above. The merge was conflict-free; completed constituent proof is reused and replacementci:fullrun 40478911093 passed the current integration.Landed head: final CI phases
The exact replacement head
e7a12c5aff60427a14f8a73a6463f042c0793effpassed CI 40478911093, with all 12 selected UI jobs passing and no failed test names. Native auto-merge landed it as0465189230d0518fba7e8e83c3beb92a525d4417.The run charged 166.1833 UI runner minutes, and the preflight-to-last-UI completion path was 1,328 seconds. The longest job was mocked E2E 1 at 1,321 seconds; real-Gateway rows were 1,226/1,047 seconds and unit rows 704/606/486 seconds. Build-artifacts, performance and locale producer surfaces were skipped. The −30% campaign target and 593-second path target are not demonstrated by this run. The earlier and current runs differ in source, selected workload and cache behavior; these results establish passing contracts and real spent compute, not a causal savings claim.
Passing replacement: every selected job, additive phase minutes
Additive job and owner phases
All cells are runner minutes. Env/deps and browser are refined in the next table. Setup/callback/cleanup/queue/mixed/unclassified replace the original inclusive test cell and sum to it. Unclassified on a missing-log row means the entire test window is unresolved, not test execution.
Additive environment and browser refinements
These rows replace Env/deps and Browser above; do not add them again. Cache includes only observed restore scopes. Install tail preserves a reconciliation scope crossing a rounded API boundary. Residual is uninstrumented action overhead.
Setup-only refinement and non-additive Gateway observations
Fixture-only, Gateway-only and their overlap partition just the setup-only cell above. Gateway-start/readiness unions at the right are nested observations, not additional time; they may also overlap callbacks in mixed windows.