Repository navigation
perf(ci): reuse UI build content in real-Gateway jobs - #184802
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 lets real-Gateway CI reuse validated public UI build output while retaining private-QA runtime preparation. Example: A private-QA job restores a public build seed with unchanged UI inputs.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this is a useful, maintainer-directed optimization with one confirmed, narrowly repairable CI failure. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe CI setup action restores build seeds; the UI build wrapper validates input identities and output hashes before publishing artifacts consumed by real-Gateway browser tests. flowchart TD
A[Protected public build] --> B[Existing build cache]
B --> C[Real Gateway CI setup]
C --> D[Private QA runtime build]
D --> E[UI input and output validation]
E --> F[Reused or rebuilt UI]
F --> G[Real Gateway browser tests]
Technical reviewBest possible solution: Retain the existing cache owners and update the real-Gateway planning expectation to include the newly enabled cache scope. Do we have a high-confidence way to reproduce the issue? Current-head CI reproduces the introduced setup-field mismatch, and source inspection independently confirms the exact failing expectation. Is this the best way to solve the issue? Reusing the existing validated cache is appropriately scoped; the smallest remaining repair is to update the existing consumer test rather than add another cache or workflow path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bec69fc8e105. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests +64, Docs +6, Config +1, Other +30. Total +101 across 6 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 26, 2026, 12:56 PM ET / 16:56 UTC. |
|
Merged via squash.
|
* ci(ui): reuse public UI build content in real-Gateway jobs * test(ci): expect shared cache in real-Gateway setup * test(ui): await initial lazy automation readiness * test(ui): retain native table modal failure facts * test(ui): stabilize clipboard, lazy panel and attachment checks
What Problem This Solves
Real-Gateway CI repeats Control UI compilation during private-QA preparation even when the protected public build cache contains matching UI output. Restore that existing full-build cache and let the UI build owner validate and reuse its content. Private runtime preparation still runs
pnpm build; runner sizes, fanout, test selection, validators, and the sole protected cache publisher remain unchanged. There is no user-facing rendering change.The cache identity retains complete source-plugin discovery across public/private builds, native UI declarations/assets, and Vite-consumed inputs. Backend-only packaged metadata is excluded only after JSON and plugin-ID validation. Unconsumed test bodies no longer invalidate the bundle; the complete test-path inventory still invalidates added/removed glob matches, and consumed test content remains hashed. This uses the existing cache owner without a second artifact pipeline or another cache writer.
Published replacement head. Current published head:
5b959766d26dc051b1de0f61a696ad3f9f64f3cf. Prior published head:a926f755153e5ba8510f49a106d7e076a81fa4ba. Integrated main and comparison base:fae514bf96c4b8295893ebfe293524f5ef9b7edc. The replacement commit is pushed. Replacement-head run 40400729552 completed successfully: all selected UI jobs and all other executed jobs passed. Its13charged UI rows consume116.50full/113.32comparable minutes with an849-second selected path; no qualified saving is claimed. Main integration includes the already-landed PDF fix #184943; no dependency or lockfile change is introduced.The follow-up diagnostic records failure-only structural table/modal state and counts from already-retained browser errors. To keep the existing file within its line cap, the self-contained browser snapshot callback moves to
control-ui-e2e-browser-state.tsand is passed directly to the same singlepage.evaluate. Node-side capture keeps its existing five-second deadline, public/private separation, late-read behavior, original-error handling and file ownership. No listener, second browser read, passing-test DOM work, assertion change, retry or timeout increase is added. This does not fix or attribute the original modal timeout.User Impact
User impact: no user-visible rendering change; this affects CI preparation and diagnostics.
Why This Change Was Made
Use the existing validated UI cache during private-QA preparation while preserving the private runtime build and sole cache publisher.
Evidence
The cache fixture retains flavor reuse, unconsumed edits, new test paths, consumed-input changes, native UI/font invalidation, malformed manifests and validator refusal. Real-build parity is separate from that fixture. Original proof used Node24.22.1 for fixed-timestamp builds and Node26.12.1 with pinned Bun for focused checks; those are retained observations, not reruns on this merged head.
Current four-file test repair
The replacement commit changes 4 existing test files, +9/−8 relative to a926f75, with no production change, new case, deleted assertion, timeout increase or retry. The final combined isolated P0–P2 review was scoped-clean (
round159-cache-repair-review*); its scope is these four files, not a fresh review of every earlier cache/diagnostic change.The two attachment/media files follow the already-landed menu labels:
Camera/Media, retaining the camera dialog'sTake phototitle. The identical reviewed patch has one old-label red control and all16existing cases green (13 attachment/3 media;49.13s Vitest/51.69s wrapper) on main9890d705; UI types, final format and whitespace passed. The before and final blobs match the reused proof. These are exact-file proof results, not replacement-head CI.The session-details test now awaits
vi.dynamicImportSettled()after changing the projected owner, before its unchanged visible-attribution assertion. The native host update promise only joins synchronous rendering; the people list loads through a real lazy boundary. The whole file passed 19/19 once in5.52s, with the affected case39ms; one-file format/whitespace passed. No deterministic reproduction established lazy loading as the exact original CI cause, so this is a grounded readiness repair with that attribution limit retained.The cloud conflict suite now uses the existing
browserLaunchOptions: { headless: true }escape hatch. Its Chromium process is private while its bundled server remains shared. In prior CI the diagnostic clipboard read received exactly the oversized-message notice copied by a concurrent message-actions suite: browser contexts isolate DOM, but share their browser process's native clipboard. The original diagnostic DOM, focus/scrolling and selection checks passed before that readback. The single authorized whole-file replay stopped before tests on the retained.artifacts/dist-artifacts.lock(owner27586); no lock was deleted or modified and no bypass or successful replay is claimed. This small extra browser fixture cost remains unmeasured in CI.Session scoped lint hit the same retained artifact lock before analysis. The final combined review explicitly retained the clipboard replay and lint gaps; no setup failure is counted as a pass. Evidence is in
round158-session-lazy*,round155-cloud-clipboard*andround155-media-label-*.Unresolved prior-head failure
Exact prior run 40387136604, head
c584cdd01768f3e7e41bd355866a98a6cbe53cb3, completed/failure:11 selected UI jobs passed,2 failed,0 cancelled, locale skipped. The PR-only case isControl UI new-session page mocked Gateway E2E > shows the submitted prompt before creation responds and restores it after failure (390, dark, reduce, markdown): the Expand table click completed but the nativeExpanded tabledialog visibility wait timed out. The exact case passes scheduled main.One isolated replay and the unchanged12/12 original-order file both passed. Those local observations alone did not establish a repair, inherited failure or current-head success; the later successful exact-head CI result is recorded below. The test retains its unique pending-preview→accepted-transcript table-open/content/close contract; static/history modal tests do not replace it.
The source audit rules out a stale result from the new UI content-cache lookup on this mocked-E2E path: its bundled server directly invokes Vite instead of
scripts/ui.mts. The click synchronously captures its current target; there is no demonstrated asynchronous-event closure error. Source/owner retirement while the lazy modal import is pending can intentionally cancel opening, but the original failure records no relevant detach or presentation transition. No cancellation or modal-lifecycle cause is established. New failure facts distinguish absent, closed or hidden modal state and retained script/browser-error counts without changing the interaction.The second failed UI job is the historical PDF case
Session file PDFs > previews linked PDFs above and below the inline cap and downloads fresh bytes, also failing on the retained scheduled main. Main subsequently fixed it in #184943. That separate failure does not justify classifying the table timeout as inherited.Real CI minutes and per-job phases
The original baseline remains106.00 comparable min; the landed checkpoint was88.33 comparable /91.50 full min and593 s. The target is74.20 comparable min and≤593 s. The replacement-head after observation is run40400729552:116.50full/113.32comparable minutes and849s, all jobs green. It exceeds both the74.20-minute campaign target and593-second checkpoint path; no qualified saving is claimed.
Both retained runs charge the whole successful producer. The main observation has12 passes/one PDF failure; the prior cache run has11 passes/two failures. Different source/workload and unresolved failure prevent causal comparison. These are consumption observations, not a forecast or a credited percentage cut.
Retained scheduled main40387557460: additive phase minutes
Prior cache run40387136604: additive phase minutes
Prior published a926f75: complete terminal CI
Run 40396617286 at published a926f75 is completed/failure:9selected UI jobs passed,4failed,0cancelled,1skipped. All13charged rows are terminal. Full consumption is147.55min, comparable144.63min, comprising29.23fixed/other and118.32inclusive tests/checks. The selected path is1101s and longest job1096s. Both real-Gateway jobs and the producer passed. This is prior-head evidence. The published replacement5b959766 subsequently passed run40400729552, reported below; no cost saving is claimed.
The failed cases are one session-details attribution case in unit1,11Platform attachment menu cases in E2E2,3Existing photos and videos cases in E2E4, and the cloud diagnostic clipboard case in E2E3; the aggregate gate failed. All16exact failing names are retained in the review data with source logs. The replacement addresses these three mechanisms; no blanket inherited-failure attribution is claimed. The older c584 modal timeout remains causally unproven.
Tables are generated from retained exact step/job JSON. Each raw row closes exactly to its job span. Whole-second timestamps are elapsed proxies, not invoices. Env/deps is composite; zero Install/Download/Restore cells mean no separately timed interval. Tests includes imports, discovery, nested builds, fixtures/Gateway startup and in-test cleanup. Failed work is charged, and no machine normalization or additive nested-build credit is applied.
The new key invalidates old UI seeds once. Credit zero warm-cache runner-minute savings until a protected-main producer publishes it and an eligible consumer demonstrably reuses it. Cold fallback and successful contracts alone are insufficient. No second publisher or broader cache authority is introduced.
Current changed-file LOC and landing state
Computed read-only from pinned merge-base
fae514bf96c4b8295893ebfe293524f5ef9b7edcand exact local head5b959766d26dc051b1de0f61a696ad3f9f64f3cfGit blobs. No main update or Git mutation was performed for this package..github/actions/setup-node-env/action.yml.github/workflows/ci.ymldocs/ci.mdscripts/ui.mtstest/scripts/ci-workflow-guards.test.tstest/scripts/ci-workflow-planning.test.tstest/scripts/ui.test.tsui/src/e2e/chat-attachment-menu.e2e.test.tsui/src/e2e/chat-media-picker.e2e.test.tsui/src/e2e/cloud-workspace-conflict.e2e.test.tsui/src/pages/chat/components/chat-details-session.test.tsui/src/pages/chat/components/chat-summary-automations.test.tsxui/src/test-helpers/control-ui-e2e-browser-state.tsui/src/test-helpers/control-ui-e2e-diagnostics.ts14 files, 34,354 → 34,494 LOC; +431/−291. The four-file replacement adds9/removes8 lines over prior a926f75. The two diagnostic files still total721→750 lines (+29); extraction moves existing browser snapshot ownership without a second capture. There is no production Solid rendering change or dependency change.
This replacement head is published; run40400729552 is green and current-head native preparation completed in batch51307. Landing remains unverified in this body. Native session34962 joined with exit1 during validation of the prior cache review document: behavioral sweep was marked pass while its silent-drop assessment was unknown. After reading the current cache publication, diagnostic capture and four-file test diff, this document records no introduced silent drop; the original modal's unknown cause remains a separate investigated test gap. No source was changed for that correction. The replacement-head broad CI result and completed native preparation are separate from the earlier validation failure; no merge is claimed. No prior auto request or outcome is reported for this PR. Clipboard replay and lint remain setup-blocked; no qualified runner-minute saving or landing is claimed.
Current green exact-head phase evidence
Run 40400729552, head
5b959766d26dc051b1de0f61a696ad3f9f64f3cf, completed successfully. All13charged UI rows passed; locale was skipped, with no failed/cancelled jobs across the full run. Full consumption is 116.50min, comparable consumption 113.32min, inclusive tests/checks 92.93min, and fixed/other 23.57min. The selected path is 849s, longest job 847s. The entire active producer is charged. This establishes current-head correctness, not a causal campaign saving or checkpoint-path qualification.Env/deps remains composite. Fixture/Gateway startup, imports, discovery, nested builds and in-test cleanup remain inside inclusive tests where no exclusive interval exists. These whole-second GitHub elapsed spans are not billed-invoice measurements. The table is copied verbatim from the retained exact-run phase report; prior tables above retain their own run identities.