Repository navigation
ci: scope UI fallback to its consumers - #154162
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 21, 2026, 4:52 PM ET / 20:52 UTC (Revision 14). ClawSweeper reviewWhat this changesThe PR narrows UI-triggered CI to existing UI and host-consumer test groups, improves selection diagnostics, and corrects Tool Search QA evidence. Merge readiness⛔ Blocked before merge - 4 items remain Keep open: the optimization remains useful and absent from current main, but the previously reported consumer-selection defect remains unfixed. The historical coverage criterion also needs an explicit CI-owner decision. Priority: P2 Review scores
Verification
How this fits togetherCI preflight converts changed files into test jobs using dependency discovery and canonical test inventories. This change narrows the Node job selection while retaining dedicated browser and E2E coverage. flowchart TD
A[Changed files] --> B[CI preflight]
B --> C{Owners resolved?}
C -->|UI source| D[UI suites and host consumers]
C -->|Other known source| E[Focused test owners]
C -->|Unknown or broad impact| F[Full fallback plan]
D --> G[Canonical Node jobs]
E --> G
F --> G
Decision needed
Why: The related replay distinguishes incidental failures from affected-source regressions, but neither code inspection nor passing CI can choose the intended coverage guarantee. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +173, Docs +4, Config +3, Other +105. Total +286 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Select complete canonical rows by file ownership, preserve existing execution policies, and document the CI owner's accepted coverage criterion. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: a UI source change with dedicated E2E enabled discovers Gateway consumers whose aggregate local config cannot match their canonical child configs. No target code or tests were executed during this read-only review. Is this the best way to solve the issue? Not yet: retaining existing canonical rows is appropriate, but file ownership must drive selection and duplicate suppression instead of local config-name equality. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 07435fa8ee22. LabelsLabel 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 (13 earlier review cycles; latest 8 shown)
|
965b4cd to
447f769
Compare
447f769 to
5c5bee9
Compare
5c5bee9 to
d17b272
Compare
d17b272 to
01b200a
Compare
01b200a to
317bd89
Compare
4c021db to
3d70784
Compare
Retain canonical UI and host-consumer rows instead of unrelated core suites, map generated boot metadata to its owners, and keep instruction docs from widening precise plans. Batch source-reader discovery and log changed-set selection or the broad fallback reason.
Read the recorded dispatcher name separately from its logical capability so the Tool Search fixture preserves the observed search/call sequence.
3d70784 to
88330f9
Compare
* ci: scope UI fallback to its consumers Retain canonical UI and host-consumer rows instead of unrelated core suites, map generated boot metadata to its owners, and keep instruction docs from widening precise plans. Batch source-reader discovery and log changed-set selection or the broad fallback reason. * test(ci): align Code Mode mocks and virtual import fixtures * fix(qa-lab): retain wire stages in Tool Search evidence Read the recorded dispatcher name separately from its logical capability so the Tool Search fixture preserves the observed search/call sequence.
What Problem This Solves
PR CI falls back to the complete core plan when a Control UI source path names an area rather than a test file, and instruction Markdown beside a precise code change can force the same fallback.
User Impact
This changes developer test selection. UI fallback retains the complete canonical Node UI rows and host-side consumers, with the existing dedicated browser and E2E lanes. Other code changes keep their independently resolved targets. Selection preserves test inventory, timeouts, worker limits, runner budgets, caps, release tiers, and repository settings. The verification fixes below adapt deterministic QA fixtures to the current tool contracts.
Why This Change Was Made
The newest 40 completed PR runs contain 22 broad plans, 3 changed-set plans, 2 docs-only plans, and 13 runs skipped before planning. Broad selection is 88% of the 25 runs that emitted Node work. Most broad cases really reach shared runtime/public SDK consumers; the actionable bounded owner gap is UI source routing.
The generated Control UI boot manifest now maps to its chunking and Vite consumers. The existing performance lane still builds and checks its generated chunks. The partial fallback retains entire existing compact rows, including co-located tests, setup, isolation, environment, and conservative timing floors. It also includes host tests that import any UI-area source through the tooling graph and tests that read the changed UI paths, so dynamically loaded UI data does not strand external consumers. Only consumers present in the original automatic compact plan affect this subset; dedicated and release-only owners stay in their existing tiers. Covered precise targets are credited once. Unknown non-UI paths, deleted sources, workspace aliases and SDK impact retain broad coverage.
Independently checked AGENTS.md and skill Markdown no longer expand mixed changes or trigger artifact builds. Packaged templates and Markdown fixtures retain their runtime ownership. Existing docs-only routing is verified in two sampled runs. Preflight now logs the selected mode/row count or the first broad-fallback reason, making future measurement attributable without guessing from compact job names.
Coordinated by reading #153962 (A-release-tier), including its latest open head
73725554a2933698b53acb816efb38bf9c882a47: this change does not implement its tooling-family path gate. When combining with that still-open change, forward its includeReleaseOnlyToolingShards option into the UI-area factory and retain both target filters; its shared .agents tooling predicate also needs to preserve skill-Markdown docs-only routing. These integration points belong to that single tooling owner, not a second C2 classification. No package.json or lockfile changes appear in this sample. The current pre-install test graph excludes package specifiers; the existing lock reporting graph omits development/workspace edges. Those inputs remain broad until their complete consumers can be proven. Removing type-only edges alone still leaves more than 6,390 reachable test candidates and demonstrable runtime SDK paths for sampled core changes, with no row savings, so that scanner change is excluded.Evidence
Current status: the controlled replay saves 90 rows. The fourth native run was blocked by an upstream duplicate catalog entry; its owner has now fixed main in
f76d38a4ac5, and the composed head is pushed after a clean P2 review. Its native run completed with 113/114 Node rows passing and one Crabbox fixture timeout; all four QA profiles, artifact checks and Docker passed. The PR remains open and CI is not green.CI selection census
22 of 25 runs that emitted Node work used the broad plan (88%). Across all 40 completed runs, 22 were broad, 3 changed-set, 2 docs-only, and 13 skipped before planning. These are baseline observations, not measured savings from this PR.
The census queried
repos/openclaw/openclaw/actions/workflows/ci.yml/runs?event=pull_request&per_page=40, verified the same cohort withstatus=completed, and fetched every jobs page (per_page=100) plus each executed preflight log. GitHub returnedDate: Sun, 20 Sep 2026 21:35:23 GMTand a 60-second cache policy; the newest listed run was created September 19 at 17:24:02 UTC. This is the exact returned cohort, including skipped and cancelled runs; it is not a replacement sample of 40 successful runs.Node rows count expanded, non-skipped
checks-node-*jobs, including an admitted compatibility row when present. Skipped matrix placeholders do not count. Cancelled expanded rows remain planned rows. Workflow wall isrun_started_at→updated_at, including queue time; cancelled walls are truncated observations. Job and step durations below come from their own start/completion timestamps.Preflight logs provide exact changed paths and routing flags, but no explicit planner-mode or fallback-reason output. Mode classification combines the emitted matrix with the preflight scope. The trigger categories below are inferred from those paths and the current source; they are not claimed as historical reason strings. Skipped runs have no observed scope or matrix to replay. For the two docs-only runs, changed paths were recovered by comparing the base and checkout SHAs recorded by preflight.
Docs-only routing fired twice: preflight recorded
DOCS_ONLY=trueandRUN_NODE=false, with zero Node rows. This cohort contains nopackage.json/lockfile changed set and no AGENTS/skills-only changed set; it cannot establish their observed frequency. Current-source before/after replays must remain separate from these historical rows because the inventory changed and some PR-only paths do not exist in the current tree.All 40 completed runs
Job and step baseline
Two successful hybrid runs with broad core/plugin selection are compared below with the successful UI-only run
35450634079(three changed UI files). These are different workloads, not causal before/after measurements. The UI run itself still selected the broad core plan. Row identifiers are comparable for baseline inspection, but their test payloads and queue conditions can differ. The matched planner replay and this PR’s live run provide the change-specific comparison.compact-large-1jobcompact-large-19jobchanged-extensions-bundle-23jobchecks-ui-e2e-real-gatewayjobFor example, a three-file UI change admitted 71 Node rows and spent 12m48s in the test step of
compact-large-1, while its real-Gateway UI test step took 7m54s. That establishes the baseline cost and ownership mismatch; it does not predict the final PR wall time.Matched planner replay
The same observed changed sets were evaluated against base
007f648e356e9caaf0da39beb0a7091fca13e561and the C2 selection patch on that same frozen inventory, using identical recorded path sets and runner inputs. Across 27 scopes with observable inputs (including two docs-only routes), the controlled Node matrix changes from 2,748 to 2,658 rows: 90 fewer (3.3%). The 13 runs skipped before preflight have no recorded changed set and remain N/A; they contribute no invented savings.Historical rows below are observations from the original runs. Matched rows are current-inventory planner outputs and exclude compatibility rows and dist-only jobs. They need not equal historical rows: inventories moved, historical added paths can be absent, and missing paths retain the conservative fallback. The observed classification and the replay classification are reported separately.
Modeled Node wall schedules the known row
predicted_secondsvalues in descending order onto the least-loaded of 96 slots (LPT), then takes the final makespan. It adds no checkout/setup, queue, preflight, or other workflow-lane time, and is not a prediction of total PR wall. Untimed rows are omitted from that calculation and counted explicitly;≥marks a lower-bound estimate that omits such work. Row reductions do not imply an equal reduction in wall time. The candidate also batches UI reverse-consumer scans; this Node-row model does not quantify that preflight scan optimization.Untimed matrix rows: 0 before → 1 after across the controlled scopes. The matched results show selection changes only; the live PR run supplies execution proof.
Changed row counts or modeled makespans:
35450634079: 69→24 rows, 8m38s→≥6m00s;35450353778: 69→24 rows, 8m38s→6m00s.Matched replay for all 40 observed runs
Verification fixes
The first native run exposed a virtual-repository import string that the boundary scanner interpreted as a real private-plugin import. Computing that same fixture path preserves its bytes without a boundary exception. It also exposed stale Code Mode mock arguments; main independently landed that JavaScript-only fixture repair in
f5aeb9e3671, so the final rebase retains upstream coverage and removes duplicate edits from this branch.The structured Tool Search default in #154068 exposed a QA adapter gap: the provider saw
tool_calland deferredsessions_spawn, but emitted an acknowledgment instead of spawning. A later native run exposed a private-continuation observer that still required a directsessions_spawncounter despite two valid committed structured receipts. Main independently landed both repairs and their executable coverage inb86dc712079(#154131) before final publication. The final rebase retains that single routing owner and its stricter exact-receipt observer; C2 drops its duplicate mock implementation, tests, baseline edit and pending observer patch. The remaining C2 QA fix makes the existing Tool Search evidence consumer readplannedWireToolName ?? plannedToolNameso logical capability names do not replace the observed wire stages. Runtime defaults, tool schemas, permissions, and execution policy are unchanged.The second native run also timed out in the sparse release worker-contract test. Its code and observed file order were unchanged from the first run, where it passed in 14.357s. A corrected, instrumented Linux replay preserved both original groups, two workers, one plan, and the existing deadline; the case passed in 11.380s and all 18 top-level child commands exited and drained normally. The lease had four CPUs/16 GB versus CI’s two CPUs/8 GB, and it did not capture nested npm/Node termination state. The timeout did not reproduce and its original cause remains unproven; it is not claimed fixed. The first reproduction stopped before that case because a detached checkout lacked package-local dependencies; a frozen workspace install corrected that setup. No CI job was rerun to obtain green.
Validation
The original four required guard files passed: 237 changed-plan cases locally (142.05s wall), and 101 canonical-planner cases (59.35s), 1,181 test-target cases (47.16s), and 636 workflow guards (129.04s) on Linux Testbox proof. The native PR runs also executed all four files. Focused generated-manifest, whole-area consumer, instruction-page and source-reader regressions passed, including failures demonstrated before their fixes.
The QA adapter regression failed on the old server with
Expected tool_call tool call(15.52s command wall), then its three-case HTTP file passed (12.26s). All 310 existing mock-server cases passed (16.25s). The wire-stage consumer regression failed on the old consumer (25.59s), then its complete 34-case file passed (14.49s); the final HTTP file passed again (12.49s). The final rebase keeps main’s routing and MCP coverage and removes the duplicate C2 HTTP cases; these timings document the earlier diagnostic repair, not extra tests retained by this PR.The pre-rebase Linux proof completed the original 49-file Node row in 350.69s and the complete changed-file gate in 560.01s, with overall exit 0. Testbox
tbx_01m30vrgpacmnfey1hc9ze9x22stopped successfully; the backing Actions lifecycle may show cancellation after external cleanup. Script and extension types, type-aware lint and its negative canary, all three unused-export scans, workflow validation, formatting, Markdown/MDX sanity, 14,232 internal links, import-cycle and source-policy guards, and diff checks passed. No product suite, shard, or benchmark ran on the Mac. Two local single-file attempts were stopped during startup and are not counted as proof.P2 autoreviews for the original selection change and both CI repairs are scoped-clean with zero findings. The published conflict resolution also received a clean P2 review. The superseded private-receipt observer correction also received a clean P2 review. The upstream cutover received a fresh clean P2 review against its immutable merge base; the exact rebased branch review is also scoped-clean with zero P0–P2 findings. Exact CI per-file walls were not emitted by the saved verbose logs; containing-process and job/step durations are reported separately, never as sums of case timings.
QA diagnostic setup
The third native run completed all 116 Node rows, artifact and Docker checks, and QA profiles 1–3. Profile 4 reached private continuation and rejected the direct-name counter, now repaired on main as described above. Before that rebase, C2’s equivalent observer regression failed on the old YAML and passed all 13 cases on Linux; that duplicate patch is excluded from the final diff.
The complete Linux profile then printed success for all six primary and three Matrix scenarios but returned exit 1 during artifact publication. Retained summaries identified all nine post-scenario failures as
Private mutation boundary is writable by another POSIX principal. The Testbox’s umask was0002, and its task-created.artifactsroot was mode775. The proof setup now uses a private umask and a fresh private repo-relative output directory; the guard, scenarios, assertions and deadlines are unchanged. An initial/tmpoutput attempt was correctly rejected by the CLI’s repo-relative output contract before any scenario ran. With the task-owned.artifactsroot corrected to0755and a fresh0700child under umask077, the same complete profile passed: six primary plus three Matrix scenarios, zero failures/skips, CLI exit 0, 174.80s including the build. The supplemental all-lanes changed-file gate returned exit 1 after 2,238.11s, but the long SSH connection stopped delivering output before its error reached the local log. It is not counted as green. A captured lint invocation then refused a stale artifact lock. After verifying all build/check processes had stopped and preserving the lock, a captured diagnostic reached extension lint, but the retained Testbox shut down before a terminal result could be recovered. This supplemental gate remains incomplete; neither the stale lock nor a passing diagnostic is claimed as the original failure’s cause. The earlier complete changed-file gate passed in 560.01s. These supplemental diagnostics used the retained pre-rebase source. The final native run separately passed all four QA profiles, type/lint lanes, artifact checks and Docker; it still failed the Crabbox fixture described below.Publication state and follow-ups
The fourth head
d17b2721fa81fc666e4de71af093432579ff2ba6was watched once and failed preflight before emitting Node jobs. The failure came from #154244 duplicatingsrc/worker/worker.runtime.test.tsat lines 31 and 481 intest/vitest/vitest.database-worker-core-paths.mjs. Its parent catalog had 456 entries/456 unique paths; the introducing commit and fourth C2 head had identical catalog bytes with 484 entries/483 unique paths. The canonical storage/state planner consumed that catalog, and its unchanged uniqueness guard correctly refused it.The owning correction,
f76d38a4ac5(fix(ci): remove duplicate database worker test entry), subsequently landed on main. C2 rebased onto the fix without changing the catalog or planner guard. Head01b200a2f4e8f76b2997f374a7e5ef0b00029d88is pushed after fresh P2 review (zero findings). Its canonical planner passes. Native run35564059419completed in 21m25s: 113/114 Node rows passed, all four QA profiles, build-artifacts and Docker passed, and one Crabbox staging fixture timed out. The aggregate gate correctly failed. No native job was rerun. This is changed-source validation; no failed job was rerun to obtain green.The PR remains open and unmerged. No timeout, cap, retry, assertion, variable or ruleset was relaxed. The earlier release-fixture timeout remains separately unproven. Package/lock graph completeness, broad runtime SDK fan-out, and A-release-tier integration remain the selection follow-ups described above.
Remaining native fixture failure
checks-node-compact-small-43failed intest/scripts/crabbox-staging.test.ts, “keeps preparation callbacks and additional Git workspaces held without disabling them.” At thefsmonitor-disabledstage, the outer wrapper reached its unchanged 30,000ms managed-command deadline. The lifecycle trace records SIGTERM and closed stdout/stderr at 30,037ms, then settled cleanup at 30,054ms; it also records 195 stdout bytes, so this is not established as a startup or no-output stall. That length matches the fixture’s expected refusal JSON, but the raw bytes, first-output timestamp, inner process identity and exit were not retained. The precise termination cause remains unproven.The next proof belongs at the wrapper/fixture lifecycle boundary: preserve the original file order and command, capture the inner wrapper’s report and termination, and repair the observed cause. A Node runtime flag, larger timeout, retry or passing rerun is not established as a fix. C2 leaves the fixture and its deadline unchanged and does not claim this final CI run is green.
Focused final-head guard completion
The final native logs verify 643 workflow-guard cases, 115 canonical-planner cases, and 238 changed-planner cases passing in their actual owner jobs.
The failed compact row registered
test-projects.test.tsin its second serial group, but the Crabbox failure in its first group prevented that later group from starting. It was not a failure in the test-target planner. At the final head, the permitted macOS planner-guard commandnode scripts/run-vitest.mjs test/scripts/test-projects.test.ts --maxWorkers=1passed 1,243 cases in 227.81s command wall (225.58s Vitest duration). This is focused guard proof; it does not turn the native aggregate green. No product suite, shard campaign, endurance test or benchmark ran on the Mac.The retained Testbox is confirmed completed and shut down. Its full nine-scenario passing summaries were downloaded before shutdown; the interrupted supplemental lint diagnostic has no recovered terminal verdict. Earlier task-owned leases were stopped. The worktree is clean.
Live PR execution
The first run 35545332869 tested
965b4cd25902d7dcfbc0cfb9049c56cb42c6c3eband concluded failure. The final-head run 35564059419 tests01b200a2f4e8f76b2997f374a7e5ef0b00029d88and is failure. Regular Node work: first 118 rows (118 success); final 114 rows (1 failure, 113 success).The preserved third run 35555238443 tested
5c5bee98b4625c35924b9ed13e2894e649aec0f6and concluded failure, with 116 rows (116 success). That remains prior-head proof; it does not validate the final head. Its QA/build/Docker measurements below retain the intervening failure evidence.Workflow wall: first 17m29s, final 21m25s. Gate results: first
openclaw/ci-gate: failure; thirdopenclaw/ci-gate: failure; finalopenclaw/ci-gate: failure.Slowest completed final-head job:
docker-seed-e2e— 17m19s (success). Slowest completed regular Node row:checks-node-compact-large-1— 15m06s (success).These measurements do not establish a live changed-set wall saving. The planner edit selects broad validation by design. Historical, first-head, and repaired-head changes and inventories differ, as can row payloads, runner availability, and queue time. The table is measured execution evidence; the controlled changed-set replay supplies the selection comparison.
checks-node-changed-extensions-bundle-23— 17m23s (success)checks-node-changed-extensions-bundle-23— 17m22s (success)checks-node-compact-large-1— 13m20s (success)checks-node-compact-large-1— 15m06s (success)The fourth run
35562147109failed before matrix emission becausetest/vitest/vitest.database-worker-core-paths.mjslistedsrc/worker/worker.runtime.test.tstwice. The owning lane removed the duplicate inf76d38a4ac5. This candidate rebased onto the corrected main and passed its canonical locator planner; this new-head CI follows that source correction rather than retrying the unchanged fourth-run failure.Planner/guard owner jobs and test steps
First-job mappings follow saved planner locators; final mappings are verified from the decoded native job group metadata and execution logs. They follow test files, not numeric matrix suffixes; no final mapping is inferred when preflight fails. Gateway scheduling changes on main renumbered compact rows. Historical rows with the same numeric suffix are not asserted to contain these files. Each measured job and test step also includes other tests; these are owner-job costs, not isolated per-file costs or a causal C2 wall comparison.
test/scripts/Run Node test shardfirst→finalci-workflow-guards.test.tschecks-node-compact-small-42checks-node-compact-small-39ci-node-test-plan.test.tschecks-node-compact-small-44checks-node-compact-small-41test-projects.test.tschecks-node-compact-small-46checks-node-compact-small-43ci-changed-node-test-plan.test.tschecks-node-compact-small-47checks-node-compact-small-42Registered does not mean executed:
test/scripts/test-projects.test.tsbelongs tochecks-node-compact-small-43but its serial groupcore-tooling-9-hosted-2was not admitted after an earlier group failed. That file is not the failing test, and this native run does not supply passing execution proof for it.QA, build-artifact, and Docker execution
These stable job names identify the same CI responsibility across the saved runs, but their selected scenarios, inputs, dependencies, and mainline repairs can differ. A failed step's duration is time to failure, not the cost of completing passing work. No duration delta in this table is attributed causally to C2. All numbers come from recorded completion timestamps; incomplete or unselected work has no estimated value.
QA Smoke CI (profile 4/4)resultbuild-artifactsresultdocker-seed-e2eresultFailed or otherwise unsuccessful jobs
build-artifactsdocker-seed-e2eopenclaw/ci-gateQA Smoke CI (profile 4/4)openclaw/ci-gatechecks-node-compact-small-43openclaw/ci-gateAll values come from saved GitHub run/job/step records. Workflow wall uses
run_started_at→updated_at; individual durations use their own start/completion timestamps. Incomplete work has no final duration. Regular Node rows exclude compatibility rows and skipped matrix placeholders; admitted compatibility rows are shown separately. Cancelled rows remain admitted rows. No verbose test-case durations were summed or presented as per-file wall time.