Repository navigation
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 27, 2026, 9:56 AM ET / 13:56 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds a CI job that asks Codex which indirectly selected Node tests it would keep, then records the proposal against test results while the full deterministic test plan still runs. Merge readiness⛔ Blocked before merge - 5 items remain Current main does not provide this shadow measurement, and hosted runs demonstrate useful observational behavior. The earlier checkout-access disclosure finding remains, and the CI owner has not confirmed the recurring default-on budget. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw CI turns pull request changes into Node test jobs. The new observer reads that plan and the checked-out source, then writes selection and failure reports without changing the tests or required merge gate. flowchart LR
A[Pull request changes] --> B[CI test planner]
B --> C[Full Node test jobs]
B --> D[Shadow Codex selector]
A --> D
C --> E[Failure monitor]
D --> F[Selection report artifact]
E --> F
C --> G[Required CI gate]
Decision needed
Why: The branch proves the observer runs, but recurring hosted and OpenAI spend is a CI policy choice, and the recorded negative control does not establish safe future pruning. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +839, Docs +99, Config +131, Other +1161. Total +2230 across 21 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep deterministic tests authoritative, correct the checkout-access disclosure, and run the observer under an explicitly approved budget policy; require representative complete failure observations before considering enforcement. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: the current docs claim diff-only access, while the introduced prompt and pinned action permit read-only checkout inspection. Hosted runs also show the observer executing. Is this the best way to solve the issue? Unclear pending the CI budget choice. Shadow observation preserves existing coverage, but opt-in admission is the safer default until the owner accepts recurring cost. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b1935b05e881. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What 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 (7 earlier review cycles)
|
e7be2ad to
18d3dde
Compare
Record read-only Codex proposals for the deterministic nondist Node plan, without changing test execution, runner placement, required gates, or PR fail-fast. Preserve changed/direct/same-directory and all non-import owners through opt-in evidence from the existing graph. Report current-attempt failing files, including proposals that would have missed a failure. Account for two hosted observational jobs outside existing 40/45-row check admission; add no Blacksmith registrations or required secrets. Validation (single-file pnpm test --maxWorkers=1 wall times): - ci-codex-test-selection: 13 passed, 2.28s - ci-workflow-guards: 308 passed, 10 skipped, 169.63s - ci-workflow-planning: 443 passed, 226.20s - ci-workflow-evidence: 23 passed, 2 skipped, 20.62s - ci-changed-node-test-plan: 288 passed, 264.72s - test-projects: 1762 passed, 237.11s - ci-pr-fail-fast: 33 passed, 2.76s - Final shadow workflow guard: passed, 2.76s Workflow lint (pinned actionlint and zizmor), scripts and root-test types, scoped lint, formatting, script erasability, and line-cap ratchet passed. PR #159260 prepare and CI-context replay: 9641 candidates, 9627 floor, 14 prunable. Missing preparation recovery and report error exit checked. No real selector backtest or CI run was invoked; CI timings are unavailable. Independent review completed. Its one floor finding was rejected after an executable probe confirmed that the completed reachability queue keeps a reader of an intermediate module in the floor at import depth two.
Classify the complete candidate universe with the existing aliased runtime import graph. Preserve actual non-import file and row reasons without flooring import-triggered compact/configuration/plugin bundles. Record the first matching floor category in the prepared artifact. Parser uncertainty previously mislabeled every extracted import as a non-import edge. Retain conservative import discovery while recording only explicit reader references as non-import provenance. Opt-in evidence leaves the planner's ordinary output unchanged; CI remains shadow-only. Before/after replay (categories are counted by first match): 1 changed test; 2 direct importer; 3 same directory; 4 non-import file evidence; 5 non-import row/ownership. The before category 4 includes the erroneous non-import evidence corrected here. Candidate arrays and emitted job-name arrays are identical in all three comparisons. PR version candidates floor C1 C2 C3 C4 C5 prunable 159260 before 9641 9627 1 2 303 9321 0 14 159260 after 9641 366 1 2 303 60 0 9275 159277 before 41 29 2 1 13 13 0 12 159277 after 41 29 2 1 13 13 0 12 159291 before 9623 9623 5 8 1100 8510 0 0 159291 after 9623 1171 5 8 1100 58 0 8452 Replays use each merged commit and its first parent: 159260: 52d1a0b (98 rows, 96.20% prunable) 159277: 2649782 (5 rows, 29.27% prunable) 159291: d2d3572 (98 rows, 87.83% prunable) The scheduler replay clears the 20% escape threshold. Validation: single-file pnpm test --maxWorkers=1 wall times: - ci-codex-test-selection: 14 passed, 3.72s - ci-changed-node-test-plan: 289 passed, 388.36s - test-projects: 1764 passed, 471.98s - Focused planner evidence cases: 3 passed, 6.53s New parser provenance cases took 192ms and 174ms; the packed extension ownership case took 930ms in the focused run. CI seconds are unavailable. Scripts and root-test typechecks, scoped lint, formatting, line-cap ratchet, and diff checks passed. Independent review found no actionable P2+ findings. No real selector backtest or hosted CI run was invoked.
Combine selection and reporting into one observational job after the Node shards and PR failure monitor. Use the gate's current-attempt failure cause to survive fail-fast cancellation, while skipping user and supersession cancellation without that cause. Keep test results and the report token outside the model step, then upload one combined 14-day artifact. Reserve one hosted shadow row instead of two, without changing existing Node matrices, runner placement, required gates, or monitor counts. Add a local summarize command for the latest 200 pull_request CI runs. Use bare gh with at most four calls in flight, cache immutable archives by ID, and report status/pruning/duration/timing coverage plus failures and MISS URLs. Preserve unknown-job reason counts and missing report coverage. Validation, one test file per invocation with --maxWorkers=1: - ci-codex-test-selection: 16 passed, 3.36s wall - ci-workflow-guards: 308 passed, 10 skipped, 218.94s wall - ci-workflow-planning: 443 passed, 247.84s wall - ci-pr-fail-fast: 33 passed, 3.41s wall - check:workflows (pinned actionlint/zizmor): passed, 40.80s wall - scripts typecheck: passed, 23.24s wall Root-test types, scoped lint, formatting, line-cap and diff checks passed. Pure aggregation tests cover distributions, status counts, timing coverage, per-run MISS deduplication, missing selections, and unknown-job reasons. The workflow guard proves success/failure/current-attempt fail-fast cancellation admission and user/supersession/wrong-attempt rejection, including cancellation after completed Node shards. A live summarize --limit 1 read completed with no API errors; that run had no selection artifact. No hosted workflow or real selector backtest was invoked. Independent review completed with no actionable P0-P2 findings.
GitHub rejected the selector workflow at 516,636 bytes before creating jobs. Share eight identical runner expressions with one YAML anchor, preserving the entire parsed workflow while reducing the file to 499,408 bytes. Guard the external 500 KB limit so this fails locally before publication. Proof: size regression fails on the previous workflow; parsed before/after objects are deeply identical. Workflow guards: 309 passed, 10 skipped in 176.74 s wall; new size assertion 0 ms. Workflow lint: passed in 19.91 s. Observed rejection: https://github.com/openclaw/openclaw/actions/runs/36310297627
Fix the MD033 failure observed in run 36312195775 by keeping the offline command example on one line. Markdownlint passes across 1308 files in 24.53 s; formatting and independent review pass.
67300b9 to
53a0fca
Compare
|
Closing without merging per maintainer decision; this work is paused indefinitely. The branch stays in place, so the PR can be reopened. The findings and live test results remain in the PR body for reference. In short: the shadow selector's live mutation test showed Codex pruning a test that actually caught the planted regression, so selection must not become enforcing without shadow miss data. The repair agent's read-only Codex flow produced a guard-passing, proven fix in a live dry-run. |
What Problem This Solves
Narrow PRs still select about 98 Node rows because barrel and SDK imports make their transitive test closures broad.
User Impact
No user-visible behavior changes and nothing gates on the shadow result: the complete deterministic test plan still runs. Eligible trusted same-repository PR runs with a Node plan add OpenAI spend and one GitHub-hosted job, with no Blacksmith registrations. Set the repository variable
OPENCLAW_CI_CODEX_SELECTION=offto disable it.Why This Change Was Made
Codex proposes pruning import-only candidates above a deterministic floor: changed tests, direct importers, tests beside changed source, and files or rows selected for non-import reasons remain protected. It fails open on broad fallback, unavailable/invalid output, or model failure. Selection and failure reporting share one hosted job after the Node shards; the job survives a current-attempt
pr-fail-fastcancellation and remains outside the required gate.Evidence
Earlier validation: The reviewed three-commit stack rebased cleanly onto
474dc991b269;git range-diffconfirms all three patches are unchanged. Post-rebase selector unit file: 16 passed, 3.97 s wall (--maxWorkers=1). Scripts typecheck: passed, 9.69 s wall. Workflow guards: 308 passed, 10 skipped, 260.73 s wall (--maxWorkers=1).git diff --checkpassed. The existing review has no accepted actionable findings; the reportedcreateVitestargument-order finding was rejected against the Vitest 5.0.1 overload and passing scripts typecheck.Historical floor replay, counted by first matching reason: C1 changed test; C2 direct importer; C3 same directory; C4 non-import file evidence; C5 non-import row/ownership. “Before” refers to the initial blanket classification; candidate inventories and job names are identical before/after.
These replays use merged commits
52d1a0bb696e,26497820f8b9, andd2d35727af79against their first parents.Backtest
Five diff-caused PR failures from recent CI were replayed. All five failing tests were in the deterministic floor; two runs were skipped as broad fallback. On the three eligible runs Codex proposed pruning 3,000–8,611 of about 9,600 candidates, took 231–332 s at medium effort, reported medium confidence, and produced no invalid entries. The same PR at two nearby commits kept 954 versus 6,565 files, so variance is high. These cases do not establish recall for failures outside the floor.
The first hosted attempt exposed GitHub's workflow-file size limit: 516,636 bytes exceeded 512,000. Eight identical runner expressions now share a YAML anchor, reducing the file to 499,408 bytes with deeply identical parsed workflow data. A new size regression failed on the original file and passes after the fix (0 ms test body); the complete guard file passes with 309 passed / 10 skipped in 176.74 s wall. Actionlint/zizmor and the workflow checks pass in 19.91 s wall.
Live test
Initial head
1665aa593747: run 36310297627 failed before creating jobs because the workflow exceeded GitHub's 500 KB limit. No selector job, Node plan, or artifact existed. Fixed by0553331f1c77with the equivalent YAML anchor and regression guard described above.At
0553331f1c77, run 36312195775 selected 17 Node rows (a narrow plan, not the anticipated broad fallback).check-docsfailed on MD033 because the new offline command example split an inline code span across lines;pr-fail-fastcanceled the Node rows. The selector still ran successfully after cancellation, from 10:26:01 to 10:29:11 UTC on 2026-09-27. No finalization stall occurred.Prepare was
ready; selection wasshadow: 118 candidates / 117 floor / 117 selected / 1 pruned. Codex succeeded in 49.55 s, with high confidence and zero invalid entries; its keep list was empty. The report waspartial: 17 unknown canceled jobs, zero inspected failures, zero MISS files, zero errors. Canceled coverage is not proof of safe selection. The workflow's terminal conclusion wascancelled, with the originating docs failure and failed aggregate recorded.Artifact
codex-test-selection-1containsprepared.json,prompt.md,codex-output.json,selection.json,summary.md,report.json, andreport-summary.md. The prepared merge-tree head was0d947644b6181b6185283915778ce3a745ab220a, against6e5577f6f3d1a92cef805f299df68253af77470c.At
e7be2ad4e8cf, run 36313470993 passedcheck-docs; it again selected 17 Node rows. It failed dependency analysis on the offlinecodexexecutable and five hourly-runner parity assertions that evaluated the selector's literal Ubuntu label as JavaScript. The latter reproduced locally (5 failed / 17 passed in 5.85 s) and is corrected by asserting the shadow job is excluded from scheduled/push admission, alongside the existing PR-only monitor (22 passed in 3.16 s). The CI failing file took about 1.44 s before the fix. The proposed external CLI declaration passes both complete dependency scans in 150.35 s; integration review is clean.The selector again survived cancellation and succeeded: prepare
ready, selectionshadow, 118 / 117 / 117 / 1 candidates/floor/selected/pruned; Codex succeeded in 36.85 s, high confidence, zero invalid entries, empty keep list. The report ispartial, classifiedtest/scripts/ci-hourly.test.tsas floor, inspected one failed job, and records 13 unknown jobs, zero MISS files, and zero errors. Its artifact contains the same seven files. Workflow conclusion:cancelled.Temporary stacked probe
Temporary PR #159608 is closed without merging, and its remote/local branch is deleted. Its harmless commit
ea375fe4e2cbrenamed a local phone-normalization variable. Localpreparewas ready with 109 Node rows / 14,938 candidates / 3,055 floor / 11,883 prunable. The existing session test was a candidate outside the floor. All 20 session tests passed (59.22 s wall including compiler preparation); independent review was clean.Live run 36314985952 selected 103 Node rows using the actual preflight context.
check-dependenciesrepeated the unlistedcodexbinary failure andpr-fail-fastcanceled the run. The selector job was admitted after cancellation but failed before checkout: its job-levelOPENCLAW_CI_SELECTION_MATRIXvalue was 275,546 bytes (context 7,790 bytes), exceeding Linux's per-argument/environment-string limit. Bash and Node process startup returned Argument list too long. Prepare and Codex were skipped; finalization, report, and upload failed at process startup. There are no hosted selection counts, no report, and no selector artifact for this large-plan run; the only run artifact isstartup-memory. The last step finished at 11:20:23 UTC and the job finalized at 11:20:26 UTC on 2026-09-27, so the previously reported finalization stall did not recur.The campaign stopped under the requested repeated-failure rule. The mutation commit/run was not published. Local negative-control proof succeeded: removing the leading
+madesrc/config/sessions.test.tsfail its normalized per-sender key assertion (1555received vs+1555expected), with 1 failed / 19 passed in 43.14 s wall. The runtime import chain is test →config/sessions.ts→config/sessions/session-key.ts→utils.ts(depth 3), outside the changed file's directory and without a direct import. The local mutation was removed. No hosted floor/kept/MISS classification or keep list exists for the intended mutation.Completed repairs and current validation
The offline backtest/worktree machinery was deleted in
ad0c0f51bd91, and the Knip configuration was restored. Historical backtest results above remain evidence from the experiment; the externalcodexbinary and its proposedignoreBinariesexception are no longer part of this change. Both dependency scans stay enabled.80d76b509361removes the full matrix environment transport. Only bounded planner options andfallbackReasoncross the job boundary, with a 32 KiB overflow marker; the selector recomputes the plan, compares sorted check names, and falls back without pruning when the plans disagree. The selector regressions fail against the original implementation; the workflow guard rejects matrix references in selector environment blocks.18d3dde9a027applies the accepted hourly admission correction. The one subsequent live repair,67300b9e1316, makes the release-runner reservation test assert PR-only selector exclusion and normalize workflow expressions before evaluation.All eight patches survived the clean rebase onto
32dcd02906ef4b2d7fbc5479d57dfb90a2ccdea9unchanged according togit range-diff. Finalci.ymlis 500,074 bytes, versus 511,380 bytes on that main base, below GitHub's 512,000-byte limit.Requested single-file local test wall times (
pnpm test <file> --maxWorkers=1):ci-codex-test-selection.test.tsci-workflow-guards.test.tsci-workflow-planning.test.tsci-hourly.test.tsci-pr-fail-fast.test.tsrelease-runner-routing.test.tsThe existing guard/planning files exercise real workflow and process fixtures; the added preflight context-cap case took about 182 ms locally. Workflow checks passed in 16.05 s (25.52 s after rebase); scripts typecheck in 2.90 s (16.94 s after rebase); both Knip scans in 105.39 s; root test types in 36.78 s. Focused lint, formatting, and
git diff --checkpassed. Independent Codex review found no actionable P0–P2 issues in the repairs and routing correction.Parent CI after repairs
Both selector jobs succeeded and uploaded the seven-file
codex-test-selection-1artifact. Both runs prepared successfully and produced shadow selections with zero invalid entries; neither cancelled workflow establishes complete test coverage.The first run was cancelled after
release-runner-routing.test.tsfailed in CI (306 ms file time). The selector classified that failure as floor. The local reproduction and repair are recorded above; this was the single live routing-test repair.The repaired-head run at
67300b9e13164ddddde880879ce03f2ec6ecf2dfwas cancelled after an unrelated moving-main type failure. Its merge tree5ad57f59used base8b16e5328ecde96f7fe48aa637fec18cfde3fd47, which already combined the test added by #159084 with the helper change from #157413:src/tasks/task-registry-acp-cleanup.sqlite.test.ts:200passesstate.envtoobserveHostDataSql, whose first argument is now an optional SQL callback. This causes TS2345 incheck-test-types-core-3; the aggregate gate then fails. The pushed selector head lacks that new test and retains the prior helper signature. Of its 18 nondist rows, six passed and twelve were cancelled. No routing-test recurrence was observed, but cancellation prevents claiming a complete passing replay. New passing CI file times were unavailable in the relevant retrieved logs. No parent rerun or rebase was used to bypass this unrelated failure.Completed stacked live probe
Temporary PR #159649 is based on the pushed selector head
67300b9e1316, so it does not inherit the unrelated moving-main type failure described above.The harmless rename at
4b4bf6a508cacompleted successfully in run 36319869256. Preflight and prepare agree on 104 nondist Node rows. The selector ran successfully: prepareready, selectionshadow, 14,876 candidates / 3,057 floor / 3,057 selected / 11,819 pruned. Codex took 39.594 s, with high confidence and zero invalid entries. The report is complete: zero unknown jobs, inspected failures, misses, and errors. All deterministic jobs, including dependency analysis, passed.The large-plan selector's environment now contains 7,758 bytes of planner context and 4,605 bytes of sorted check names; no full matrix is transported. Checkout, preparation, Codex, finalization, reporting, and upload all completed. Its seven-file artifact has the same shape listed above.
src/config/sessions.test.tsis a candidate outside the floor and was pruned for this harmless rename. Codex's only keep entry wassrc/utils.test.ts, already protected by the floor; its reason was directnormalizeE164coverage. This passing behavior-preserving run does not establish recall for behavior changes.The mutation at
2a33ef702382completed ascancelledin run 36321099893. The selector ran successfully after fail-fast cancellation, from 13:10:05 to 13:15:39 UTC on 2026-09-27. Prepare wasreadywith 104 nondist Node rows; selection wasshadow: 14,876 candidates / 3,057 floor / 3,275 selected / 11,601 pruned. Codex took 94.968 s, with medium confidence and zero invalid entries. Finalization, report, and upload succeeded with the same seven-file artifact.The first failure was
checks-windows-node-test-3, wheresrc/utils.test.tsobserved1234567instead of+1234567and12345678900instead of+12345678900. Fail-fast cancelled all 104 nondist rows. The hosted report is therefore partial, with 104 unknown jobs, zero inspected jobs, zero classified failures, zero MISS entries, and zero errors. Its job scope excludes Windows. Applying the same classifier separately to the captured Windows failure identifiessrc/utils.test.tsas floor; that supplemental classification is not an entry in the hosted report.The intended depth-three negative control,
src/config/sessions.test.ts, remained a candidate outside the floor and was pruned. Codex explicitly kept the different siblingsrc/config/sessions/session-key.test.ts, with the reason: “Session key derivation consumes normalizeE164 for direct From values, so it reaches the changed runtime helper.” It also keptextensions/signal/,extensions/whatsapp/,extensions/imessage/, and seven WhatsApp QA tests. No exact or prefix keep entry coverssrc/config/sessions.test.ts.This is a missed locally proven negative control in the proposal, but not an observed hosted MISS: the intended test belongs to
checks-node-changed-config-compact-small-7(job108625722585), whoseRun Node test shardstep was skipped after cancellation. Zero hosted MISS entries must not be read as recall evidence. The large-plan transport and post-cancellation selector/report flow are proven; live outside-floor failure classification remains unproven.Temporary PR #159649 is closed without merging. Its remote and local branch and its task-owned worktree were deleted. The selector PR remains open, with no auto-merge.
No merge, auto-merge, or workflow dispatch was requested or performed.