Skip to content

ci: add shadow Codex test selection - #159576

Closed
steipete wants to merge 9 commits into
mainfrom
steipete/codex-ci-test-selection-9200af
Closed

steipete wants to merge 9 commits into
mainfrom
steipete/codex-ci-test-selection-9200af

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

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=off to 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-fast cancellation and remains outside the required gate.

Evidence

Earlier validation: The reviewed three-commit stack rebased cleanly onto 474dc991b269; git range-diff confirms 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 --check passed. The existing review has no accepted actionable findings; the reported createVitest argument-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.

PR Version Node rows Candidates Floor C1 C2 C3 C4 C5 Prunable
#159260 Before 98 9,641 9,627 1 2 303 9,321 0 14
#159260 After 98 9,641 366 1 2 303 60 0 9,275
#159277 Before 5 41 29 2 1 13 13 0 12
#159277 After 5 41 29 2 1 13 13 0 12
#159291 Before 98 9,623 9,623 5 8 1,100 8,510 0 0
#159291 After 98 9,623 1,171 5 8 1,100 58 0 8,452

These replays use merged commits 52d1a0bb696e, 26497820f8b9, and d2d35727af79 against 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 by 0553331f1c77 with 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-docs failed on MD033 because the new offline command example split an inline code span across lines; pr-fail-fast canceled 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 was shadow: 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 was partial: 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 was cancelled, with the originating docs failure and failed aggregate recorded.

Artifact codex-test-selection-1 contains prepared.json, prompt.md, codex-output.json, selection.json, summary.md, report.json, and report-summary.md. The prepared merge-tree head was 0d947644b6181b6185283915778ce3a745ab220a, against 6e5577f6f3d1a92cef805f299df68253af77470c.

At e7be2ad4e8cf, run 36313470993 passed check-docs; it again selected 17 Node rows. It failed dependency analysis on the offline codex executable 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, selection shadow, 118 / 117 / 117 / 1 candidates/floor/selected/pruned; Codex succeeded in 36.85 s, high confidence, zero invalid entries, empty keep list. The report is partial, classified test/scripts/ci-hourly.test.ts as 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 ea375fe4e2cb renamed a local phone-normalization variable. Local prepare was 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-dependencies repeated the unlisted codex binary failure and pr-fail-fast canceled the run. The selector job was admitted after cancellation but failed before checkout: its job-level OPENCLAW_CI_SELECTION_MATRIX value 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 is startup-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 + made src/config/sessions.test.ts fail its normalized per-sender key assertion (1555 received vs +1555 expected), 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 external codex binary and its proposed ignoreBinaries exception are no longer part of this change. Both dependency scans stay enabled.

80d76b509361 removes the full matrix environment transport. Only bounded planner options and fallbackReason cross 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. 18d3dde9a027 applies 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 32dcd02906ef4b2d7fbc5479d57dfb90a2ccdea9 unchanged according to git range-diff. Final ci.yml is 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):

Test file Result Wall time
ci-codex-test-selection.test.ts 19 passed 2.59 s; 5.95 s after rebase
ci-workflow-guards.test.ts 309 passed, 10 skipped 168.58 s
ci-workflow-planning.test.ts 446 passed 223.57 s
ci-hourly.test.ts 22 passed 3.81 s
ci-pr-fail-fast.test.ts 33 passed 3.10 s
release-runner-routing.test.ts Original: 1 failed, 45 passed; repaired: 46 passed 3.22 s; 3.34 s

The 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 --check passed. 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-1 artifact. Both runs prepared successfully and produced shadow selections with zero invalid entries; neither cancelled workflow establishes complete test coverage.

CI run Nondist rows Candidates / floor / selected / pruned Codex time Report
36318199645 17 118 / 117 / 117 / 1 48.078 s Partial; 1 inspected failure, 13 unknown jobs, 0 misses, 0 errors
36319248157 18 119 / 118 / 118 / 1 41.021 s Partial; 0 inspected failures, 12 unknown jobs, 0 misses, 0 errors

The first run was cancelled after release-runner-routing.test.ts failed 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 67300b9e13164ddddde880879ce03f2ec6ecf2df was cancelled after an unrelated moving-main type failure. Its merge tree 5ad57f59 used base 8b16e5328ecde96f7fe48aa637fec18cfde3fd47, which already combined the test added by #159084 with the helper change from #157413: src/tasks/task-registry-acp-cleanup.sqlite.test.ts:200 passes state.env to observeHostDataSql, whose first argument is now an optional SQL callback. This causes TS2345 in check-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 4b4bf6a508ca completed successfully in run 36319869256. Preflight and prepare agree on 104 nondist Node rows. The selector ran successfully: prepare ready, selection shadow, 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.ts is a candidate outside the floor and was pruned for this harmless rename. Codex's only keep entry was src/utils.test.ts, already protected by the floor; its reason was direct normalizeE164 coverage. This passing behavior-preserving run does not establish recall for behavior changes.

The mutation at 2a33ef702382 completed as cancelled in run 36321099893. The selector ran successfully after fail-fast cancellation, from 13:10:05 to 13:15:39 UTC on 2026-09-27. Prepare was ready with 104 nondist Node rows; selection was shadow: 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, where src/utils.test.ts observed 1234567 instead of +1234567 and 12345678900 instead 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 identifies src/utils.test.ts as 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 sibling src/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 kept extensions/signal/, extensions/whatsapp/, extensions/imessage/, and seven WhatsApp QA tests. No exact or prefix keep entry covers src/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 (job 108625722585), whose Run Node test shard step 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.

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: XL labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 9:56 AM ET / 13:56 UTC (Revision 8).

ClawSweeper review

What this changes

Adds 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
Reviewed head: 53a0fca17dd5326286b755287c3e236513a0e9d6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Hosted proof is strong for the observational CI flow; a factual docs error and the default-on budget decision remain before merge.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed CI owner runs the selector after deterministic Node jobs. The hash-matched PR body links hosted runs showing a complete 104-row selection with artifact upload and a later selection/report after fail-fast cancellation. That canceled run did not execute the pruned negative-control test, so it proves the observer path, not pruning recall. The artifacts are run output, with no existing stored-data contract changed.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed CI owner runs the selector after deterministic Node jobs. The hash-matched PR body links hosted runs showing a complete 104-row selection with artifact upload and a later selection/report after fail-fast cancellation. That canceled run did not execute the pruned negative-control test, so it proves the observer path, not pruning recall. The artifacts are run output, with no existing stored-data contract changed.
Evidence reviewed 11 items Current main still uses the deterministic plan: Preflight builds the existing Node shards; a search of the fetched main revision found no shadow-selector entrypoint.
Current-main search: No codex-test-selection path is present on fetched main, so the PR still supplies a distinct capability.
Introduced CI admission: The job is limited to same-repository first-attempt pull requests and is enabled when the new repository variable is unset.
Findings 1 actionable finding [P3] Disclose Codex's full checkout read access
Security None None.

How this fits together

OpenClaw 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]
Loading

Decision needed

Question Recommendation
Should this shadow selector run by default on eligible same-repository pull requests, or require explicit opt-in while its cost and outside-floor recall are measured? Start with opt-in: Require an explicit repository variable to enable the job while collecting representative cost and recall evidence.

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

  • Disclose Codex's full checkout read access (P3) - The new prompt lets Codex inspect repository files and the action runs from the checked-out workspace, so the statement that it sees only the diff and candidate inventory is inaccurate. Correct the operator-facing access description before merge; this remains from the prior review.
  • Resolve merge risk (P1) - The unset repository variable enables an additional hosted job and OpenAI usage on every eligible first-attempt pull request; no CI owner decision accepting that recurring budget is visible.
  • Complete next step (P2) - Correct the checkout-read disclosure and obtain the CI owner's default-on versus opt-in decision before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P3] Disclose Codex's full checkout read access — docs/ci/scope-and-routing/selection.md:130-131
Agent review details

Security

None.

PR surface

Tests +839, Docs +99, Config +131, Other +1161. Total +2230 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 10 870 31 +839
Docs 3 99 0 +99
Config 2 141 10 +131
Generated 0 0 0 0
Other 6 1200 39 +1161
Total 21 2310 80 +2230

Review metrics

Metric Value Why it matters
Implementation and test growth tooling/workflow net +1346 lines; tests net +764 lines The observer and summarizer justify substantial new tooling, making upkeep part of the CI owner's budget decision.
New CI control 1 repository variable; unset enables the job The default determines whether every eligible first-attempt pull request incurs hosted and model usage.

Stored data model

Persistent data-model change detected: database schema: scripts/ci-codex-test-selection.mts, database schema: scripts/lib/ci-codex-test-selection-summary.mts, serialized state: scripts/ci-codex-test-selection.mts, serialized state: scripts/lib/ci-codex-test-selection-summary.mts, unknown-data-model-change: scripts/ci-codex-test-selection.mts, unknown-data-model-change: scripts/lib/ci-codex-test-selection-summary.mts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Make observation opt-in (recommended)
    Change the admission condition after CI-owner approval so ordinary pull requests incur no new hosted or model cost.
  2. Accept the default-on budget
    Record the CI owner's acceptance of the recurring cost and keep the selector strictly observational.

Technical review

Best 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:

  • [P3] Disclose Codex's full checkout read access — docs/ci/scope-and-routing/selection.md:130-131
    The new prompt lets Codex inspect repository files and the action runs from the checked-out workspace, so the statement that it sees only the diff and candidate inventory is inaccurate. Correct the operator-facing access description before merge; this remains from the prior review.
    Confidence: 0.98

Overall correctness: patch is correct
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b1935b05e881.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a non-gating CI measurement improvement with no current user-facing test reduction.
  • merge-risk: 🚨 automation: Merging starts an additional secret-backed hosted CI job by default, creating recurring cost and an observational failure surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed CI owner runs the selector after deterministic Node jobs. The hash-matched PR body links hosted runs showing a complete 104-row selection with artifact upload and a later selection/report after fail-fast cancellation. That canceled run did not execute the pruned negative-control test, so it proves the observer path, not pruning recall. The artifacts are run output, with no existing stored-data contract changed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed CI owner runs the selector after deterministic Node jobs. The hash-matched PR body links hosted runs showing a complete 104-row selection with artifact upload and a later selection/report after fail-fast cancellation. That canceled run did not execute the pruned negative-control test, so it proves the observer path, not pruning recall. The artifacts are run output, with no existing stored-data contract changed.

Evidence

Acceptance criteria:

  • [P1] pnpm check:docs.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Correct the checkout-read disclosure in the CI documentation.
  • Record the CI owner's default-on or opt-in budget decision.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-27T09:51:40.448Z sha 1665aa5 :: blocked before merge. :: [P3] Describe Codex’s full checkout read scope
  • reviewed 2026-09-27T10:28:05.388Z sha 0553331 :: blocked before merge. :: [P3] Describe Codex’s full checkout read scope
  • reviewed 2026-09-27T10:51:23.932Z sha e7be2ad :: blocked before merge. :: [P3] Describe Codex’s checkout read scope
  • reviewed 2026-09-27T11:39:36.549Z sha e7be2ad :: blocked before merge. :: [P1] Declare the Codex binary used by backtest | [P2] Keep the PR-only job out of hourly runner parity | [P2] Move the full matrix out of one environment value | [P3] Describe Codex’s checkout read scope
  • reviewed 2026-09-27T12:27:04.341Z sha 18d3dde :: blocked before merge. :: [P2] Exclude the shadow job from release runner reservation | [P3] Disclose Codex checkout read access
  • reviewed 2026-09-27T12:38:17.900Z sha 67300b9 :: blocked before merge. :: [P2] Declare the selector's external Codex binary | [P3] Describe Codex's full checkout read scope
  • reviewed 2026-09-27T13:36:20.417Z sha 67300b9 :: blocked before merge. :: [P3] Disclose Codex's full checkout read access

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@steipete
steipete force-pushed the steipete/codex-ci-test-selection-9200af branch from e7be2ad to 18d3dde Compare September 27, 2026 12:12
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
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.
@steipete

steipete commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant