Repository navigation
perf(ci): reuse compiler state and shorten guard and UI tests - #157265
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: blocked before merge. Reviewed September 24, 2026, 11:50 AM ET / 15:50 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch broadens incremental compiler-cache restoration, batches TypeScript guard parsing, and reduces setup and waiting time in Control UI tests. Merge readiness⛔ Blocked before merge - 3 items remain This PR remains useful: current main lacks the combined CI optimization, and the related merged UI work addresses a different bottleneck. Direct checks support the targeted gains, while mixed UI shard timings leave a performance tradeoff for review. Priority: P2 Review scores
Verification
How this fits togetherGitHub Actions selects checks for OpenClaw changes and runs type checks, source guards, and browser tests. Their results feed the PR merge gate. flowchart LR
A[Pull request changes] --> B[CI check selection]
B --> C[Compiler cache restore]
C --> D[Type checks]
B --> E[Guard parser batches]
B --> F[Browser test harness]
D --> G[CI results]
E --> G
F --> G
Decision needed
Why: The source and direct checks establish targeted correctness and speed gains, but they cannot decide the acceptable aggregate CI-time tradeoff. Before merge
Agent review detailsSecurityNone. PR surfaceTests +41, Docs +3, Config +54, Other +17. Total +115 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the compiler and guard gains, and land the UI changes once their aggregate PR-tier cost is understood or explicitly accepted. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR targets measured CI and test cost, with native before/after timings and successful selected checks. Is this the best way to solve the issue? Unclear for the full bundle: cache restoration and parser batching use existing owners, but the UI portion needs an aggregate timing decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 02ad6b76b1a2. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
The legacy executor fixture resolved its second-probe exit promise from stdout, then immediately expected the rejection on a separate stderr pipe. Process exit does not order those deliveries, and the stdout prefix could also arrive before the complete exit code. Record the actual rejection before exit and observe the real exit code and signal through IPC. Keep leaf readiness parsing separate from stderr while preserving live/dead ancestry, generation exclusion, lease-row preservation, and descendant effect assertions. No executor behavior changes. Observed in CI run 35997175601, job 107629770649 (checks-node-compact-small-27) on unrelated PR #157265.
* commit '9a1a6f7db9783d0b8abaf918bfe12978ea745b57': (26 commits) fix(maintainer): restore cold PR worktree provisioning (#157394) feat(ios): establish native Cloudflare Access sign-in sessions (#146996) fix: restore the Gateway after interrupted Doctor maintenance (#156854) refactor(line): retire the Express webhook adapter (#157369) refactor(cron): consolidate unavailable delivery targets (#157393) ci: apply Go memory defaults to architecture checks fix(cli): preserve the first PowerShell completion test failure (#157267) refactor(agents): consolidate transcript-tail model selection (#157382) fix(release): honor frozen validation contracts (#157034) fix(perf): use settled Kova terminal CPU accounting (#157029) chore(windows): verify packaged repair worker lifecycle (#157047) refactor(logging): share memory pressure threshold selection (#157164) fix(release): verify bundled fs-safe native bindings (#157027) perf(skills): skip warm prompt search when minimum cannot fit (#157343) fix(ui): avoid retaining detached tooltip anchors (#157226) perf(ci): reuse compiler state and shorten guard and UI tests (#157265) perf(ui): preserve model caches on unrelated metadata updates (#157254) chore: remove the tracked PR-body artifact and ignore .artifacts (#157296) refactor: consolidate duplicate MCP lifecycle tests (#157360) test(qa): consolidate CLI runtime fixtures (#118496) ...
The legacy executor fixture resolved its second-probe exit promise from stdout, then immediately expected the rejection on a separate stderr pipe. Process exit does not order those deliveries, and the stdout prefix could also arrive before the complete exit code. Record the actual rejection before exit and observe the real exit code and signal through IPC. Keep leaf readiness parsing separate from stderr while preserving live/dead ancestry, generation exclusion, lease-row preservation, and descendant effect assertions. No executor behavior changes. Observed in CI run 35997175601, job 107629770649 (checks-node-compact-small-27) on unrelated PR openclaw#157265.
…aw#157265) * ci: restore compiler state for narrowed type checks * perf(tooling): batch native syntax snapshots in guards * test(ui): reuse prepared native fixture transforms * test(ui): advance refresh clocks and consolidate placement tours
What Problem This Solves
Repeated pull-request checks discard reusable compiler state, rebuild native parser snapshots one file at a time, and pay avoidable UI fixture and refresh-window costs.
User Impact
CI-only changes. Every selected type graph and guard still runs. UI assertions, native process isolation, and distinct browser scenarios stay in the PR tier.
Why This Change Was Made
No file changes tiers. No assertions, deadlines, runner budgets or retries are weakened. Compiler selection and CI shard membership stay unchanged.
Evidence
Linux proof: compiler-state comparison, guard proof, UI harness tests, combined required checks, cache invalidation controls, and browser file/endurance proof. The native Crabbox exit results establish proof; successful one-shot teardown may cancel the backing Testbox keepalive job.
Paired Linux measurements use Blacksmith Testbox, reporting 4 CPUs and about 15.4 GiB RAM. The table reports command-wall medians of three runs; native CI job and step walls are reported separately below.
scripts/check-no-pairing-store-group-auth.mtsviats-guard-utils.mtsscripts/check-pairing-account-scope.mtsviats-guard-utils.mtsscripts/check-import-cycles.tsui/src/test-helpers/control-ui-e2e-suite.test.tsui/src/e2e/sidebar-session-stability.e2e.test.tsui/src/e2e/session-management.mutation-scope.e2e.test.tsui/src/e2e/session-placement.move.e2e.test.tsThe three guard medians total 69.02 → 31.39 seconds (37.63 seconds saved, 54.5%). All 30 repeated CLI invocations, six deliberate violation/allowed-source controls, the 70-file batch/order fixture, and 56 sibling tests passed.
The UI harness passed all 17 cases in ten additional runs (170 case passes), plus 26 sibling tests. Its complete UI shard did not establish an aggregate improvement: 166.34 → 210.55 seconds, with the same 499 files / 8,503 passing tests / one existing skip. Process CPU rose across the complete replay; the exact-head CI result below is the primary job comparison.
Compiler cache invalidation passed 50 cells: ten each for changed source, added roots, changed dependency declarations, compiler options, and incompatible compiler state. The first probe expected exit 2; the installed no-emit compiler correctly rejected the source with TS2322 and exit 1. The corrected probe requires that exact exit and diagnostic. The three browser files passed ten additional repetitions and their browser/unit siblings at three workers. Native file medians total 119.352 → 31.296 seconds (88.056 file-seconds removed). Matched three-worker owning-shard comparisons are recorded below. These are complete command walls on identical per-pair inventories; they do not establish a whole-shard speedup. Shards 3 and 7 were also replayed successfully as supplemental coverage before canonical discovery identified the clock files in shards 1 and 5.
The owning-shard clock proof is run 35994547249. Broader unchanged-test slowdown is observed; its cause is not established.
Exact-head PR CI: run 35997175601. Every target type, guard and UI row passed. The broader test jobs finished with 129 successes, 12 intentional skips and one CLI failure; the aggregate gate has remained queued without a hosted runner since 12:35:01 UTC (last verified 12:46 UTC). No rerun was requested.
check-guardscheck-test-typeschecks-ui (1/3)checks-ui (2/3)checks-ui (3/3)checks-ui-e2e (1/9)checks-ui-e2e (2/9)checks-ui-e2e (3/9)checks-ui-e2e (4/9)checks-ui-e2e (5/9)checks-ui-e2e (6/9)checks-ui-e2e (7/9)checks-ui-e2e (8/9)checks-ui-e2e (9/9)Baseline head:
1712c7a34c948aa1105ec5c94847770d67bc83e8. Candidate head:5a5b0a90020f8a838ffe7ff1e3888dfd0bd89f32. These heads select different overall workloads; do not treat the total workflow duration as a controlled comparison.The candidate run selects the existing full type layout: all 25 core graphs run in five separate rows, while the central row checks extensions, scripts and root tests. The baseline kept 11 selected core graphs in the central row. The central 785 → 454 s comparison therefore does not isolate this patch. All six candidate type rows restored real Actions archives through the new broader fallback (from the same earlier main producer); the central archive was 3.3 MB. A successful archive restore does not guarantee every graph remains incrementally reusable after input changes. This run still exceeds the 420 s central-job target.
check-test-types-core-1check-test-types-core-2check-test-types-core-3check-test-types-core-4check-test-types-core-5gateway-other41.9,agents-root78.6,config-cli68.6,ui-e2e48.6,cli-update27.8infra62.5,agents-other64.7,ui-other47.7,messaging53.0,gateway-methods92.2agents-tools37.6,state-logging67.5,services69.5,packages70.5,ui-chat130.4commands86.3,gateway-root148.5,other85.1,plugin-sdk35.5,agents-sessions30.3gateway-server44.5,plugins-platform82.9,commands-doctor70.3,ui-pages130.0,services-cron35.3The existing budget routing placed these five rows on
blacksmith-16vcpu-ubuntu-2404in this run. This patch changes no routing. The central commands took approximately 187.2 s for extension tests, 86.4 s for scripts and 136.4 s for root tests, from timestamped command boundaries.All three UI unit execution steps improved. Row 1's higher job wall includes 38 seconds between the job's API start timestamp and its first setup step; execution itself improved 284 → 273 seconds. Job timing includes this delay; the table does not silently subtract it.
No plan membership or committed timing weights changed: zero seconds were removed through tier reassignment. The controlled guard commands saved 37.63 seconds, the native unit command saved 9.18 seconds, and browser native files saved 88.056 file-seconds when selected in either PR or full-main validation. These distinct measures and parallel compiler graph walls are not added into an unsupported workflow-wall savings claim.
The compiler-state comparison saved 541.11 command-wall seconds (78.7%) with identical selected graphs. Cold totals were [663.42, 687.69, 821.15] seconds; restored totals were [146.58, 143.0, 149.53] seconds. Cache misses still require compilation; this does not prove the 420-second bound for a wholly cold narrowed queue.
Validation: all five required planner/guard files passed (2,795 tests; 430.73 s). The changed-file gate passed in 1,753.20 s, including all 25 core-test type graphs, script types, guards, deadcode and normal type-aware lint. Targeted docs MDX, formatting and diff checks passed. The later clock-only refinement passed focused validation and exact-head CI. Independent P2 review: scoped-clean on the final rebased branch; no actionable P0–P2 findings. The final clock refinement passed targeted type-aware Oxlint with a rejecting no-floating-promises canary.
Compiler breakdown (three-run Linux medians)
The core command includes the complete boundary inventory and a two-process compiler queue; graph walls overlap and should not be summed as job wall.
Scope limits and retained coverage
The browser row-count target is not yet established. The baseline emitted three workers per Control UI shard. The baseline 630-spec inventory totals 7,536.954 native file-seconds; five three-worker Control UI shards have a 502-second idealized floor before setup and serial work at those observed costs. The measured source snapshot discovers 639 Control UI files. No unsupported five-row matrix reduction is included.
The coercion guard remains unchanged: its ordered parse-versus-read error behavior needs a separate preservation proof. Session-owner-chip keeps distinct pixel/layout coverage; activity-icon-loader already received concurrency optimization in #156042; sidebar unit fixtures overlap active fixture-repair work.
Top 25 browser specifications and bounded failure-history audit
Failure history is bounded to all 19 failed main workflow_dispatch CI runs created since 2026-09-20 through this investigation; 15 failed ordinary UI e2e jobs, 15 annotation responses. PR-only failures and successful runs are not part of this sample. Zero annotations is not proof of absent defects.
ui/src/e2e/chat-async-questions.e2e.test.tsui/src/e2e/chat-scroll-dock.e2e.test.tsui/src/e2e/chat-run-lifecycle.e2e.test.tsui/src/e2e/chat-position-rail-layout.e2e.test.tsui/src/e2e/chat-outbox-payloads.e2e.test.tsui/src/e2e/new-session-page.transition.e2e.test.tsui/src/e2e/new-session-page.workspace-validation.e2e.test.tsui/src/e2e/chat-model-controls.e2e.test.tsui/src/e2e/sidebar-session-stability.e2e.test.tsui/src/e2e/chat-rail-columns.e2e.test.tsui/src/e2e/session-management.mutation-scope.e2e.test.tsui/src/e2e/chat-sidebar-panel-contract.e2e.test.tsui/src/e2e/lazy-custom-element-recovery.e2e.test.tsui/src/e2e/chat-position-rail.e2e.test.tsui/src/e2e/chat-attachment-read-lifecycle.e2e.test.tsui/src/e2e/chat-queue-update-reload.e2e.test.tsui/src/e2e/session-placement.move.e2e.test.tsui/src/e2e/chat-user-bubble-disclosure.e2e.test.tsui/src/e2e/new-session-page.instant-thread.e2e.test.tsui/src/e2e/session-progress-motion.e2e.test.tsui/src/e2e/chat-session-companion-focus.e2e.test.tsui/src/e2e/chat-attributed-identity.e2e.test.tsui/src/e2e/chat-flow.active-run-follow-ups.e2e.test.tsui/src/e2e/native-nav-sidebar-toggle.e2e.test.tsui/src/e2e/chat-markdown-table-interactions.e2e.test.tsRanked guard and UI unit follow-up candidates
Baseline run 35973580579; these are CI file/command walls, separate from the controlled Linux medians above. Unchanged files remain in their existing PR tier.
scripts/check-import-cycles.tscheck-no-pairing-store-group-auth.mtscheck-pairing-account-scope.mtscheck-coercion-helper-declarations.mtscheck-duplicates.mjscheck-temp-path-guardrails.tscheck-package-patches.mtsUI paths are relative to
ui/except the plugin path.src/components/session-owner-chip.browser.test.tssrc/test-helpers/control-ui-e2e-suite.test.tssrc/pages/chat/chat-responsive.browser.test.tssrc/pages/plugins/activity-icon-loader.browser.test.tssrc/components/app-sidebar.people.test.tssrc/components/app-sidebar.sessions.test.tssrc/app/vite-build.node.test.tssrc/pages/chat/components/chat-image-loading.browser.test.tssrc/pages/chat/chat-view.test.tsextensions/workboard/browser/pages/workboard/view.test.tsRemaining CI failure outside this lane
CLI job 107629770649 failed
src/cli/update-cli/update-command-executor-legacy.test.ts:209, casenative Doctor descendants retain the legacy parent's live lifetime (managed=true, generation=true). It receivedSECOND_READY,LEAF_READY, andSECOND_EXIT:1, but had not receivedLegacy finalizer lifetime could not be acquired.The full envelope ran 395 files with eight workers on Linux/Node 24.19.0; 393 files passed and one was skipped.The unchanged fixture waits for a stdout exit marker and then immediately asserts an independently collected stderr diagnostic. Cross-stream arrival ordering is a plausible race, not a reproduced root cause. The assertion/readiness logic predates SP1; no changed SP1 production path is reachable through this test. A single targeted Mac/Node 26.9.0 check passed (one selected case, 32.05 s including native preparation). That pass does not reproduce Linux shard order and does not prove a fix. No Linux replay, timeout change, assertion change or CI rerun was performed. The active CLI owner should synchronize both observations while retaining the assertions and existing deadline if the race is confirmed.
Automatic merge is not enabled.