Repository navigation
ci(pr-require-checks): gate tests that cannot fail in ci-status - #9400
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…re ready)" This reverts commit 3017572.
A pull request or merge group scans its changed test files with /testing:audit's cant-fail-scan.sh in check-plugins and reports the gate not applicable when it changes none. The whole-tree scan runs in a new check-tests job on the schedule and on dispatch, sized from hosted-runner timing; ci-status counts its skip on a pull request or merge group as success. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3fb50c8c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review reviewed Incremental review of 4519d05 (since 8f0d9f7)No findings. I read the incremental diff and the four changed files, and used the full diff and the PR context only for background. I did not run any code or the test suites. What changed.
The Checked, and consistent:
Note, not a finding. The PR description is now out of date on two points. It says Cost. Every non-draft, non-contract-only run now starts one extra |
|
claude-security-review reviewed Incremental security review of the four files changed since 8f0d9f7. I found no security issues.
No plugin manifests changed and no standing instructions were removed, so there are no critical-findings: 0 |
…s skip The gate's own suite runs it against the real scanner in throwaway repositories: not applicable, a clean changed test, a hollow one, a deletion, pruned directories, an unreadable test and the whole tree. ci-ordered-skips pins that check-tests' skip passes only on a pull request or merge group. The gate joins the check-script registry and suite-seconds. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… next) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…reverted next)" This reverts commit 5764a8c.
… base A merge group that select-tests resolves to the whole tree (a manifest change, or no usable base) had an empty lane_base: the check-plugins gate returned at once, and check-tests, gated to the schedule and dispatch, skipped and was counted as success, so nothing scanned it. check-tests now runs under the standard contract-only and draft gates and branches in the shell: with no diff base it scans the whole tree, with one it returns at once. The ci-status skip rule for it is gone; the suite runs the job's step for both cases. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #9184
Summary
This is Part A of #9184: a scoped can't-fail scan in the required check. Part B (mutation testing) is split out to #9195. Automation Lanes owns
pr-require-checks.ymland reviews the head of this PR.Fix
scripts/check-cant-fail-scan.shruns/testing:audit'scant-fail-scan.sh --checkin one of two modes.--check --fileon each added, copied, modified or renamed file.adapter: none(no adapter claims the file, the adapter is off, orpaths.excludedrops it), the file is skipped. Any other exit 2 fails the gate. So "not a test file" is told apart from an unreadable test file.--filedoes not apply the whole-tree walk's directory prunes (evals/fixtures,build,vendorand others), so the script skips those paths itself. Its suite fails if this list drifts from the scanner'scollect_files().Not applicable.check-pluginsadds a gate stepcant_fail_scanthroughrun-hygiene-gate.sh, with acant-fail-scanrow inCHECK_RESULTS. It readslane_base.check-tests, runs the whole-tree scan wheneverlane_baseis empty. That covers the schedule, a dispatch, and a pull request or merge group thatselect-testsresolves to the whole tree (no usable base, or a manifest change). With a base it returns at once.ci-statusneeds it, with no special skip rule.pr-require-checks.yml). A job-levelif:onlane_basealso failscheck-docs-only-gate.sh. So the job now runs on every non-draft event and costs its setup and checkout when a base exists. It stays off the critical path.check-plugins, and the whole tree goes incheck-tests.check-testsmeasures about 140 s with checkout:ceil(max(1.5 x 140, 1.1 x 140) / 60) = 4minutes.check-plugins' own schedule wall is now 136-142 s (runs 39401228774 through 39814885238). 1.5 x 142 = 213 s already exceeds its 3-minute cap without this step.Verification
bash plugins/testing/skills/audit/scripts/cant-fail-scan.sh --checkon the merged head exits 0 (PASS, 1301 test files).git grep -n 'cant-fail-scan.sh' -- .github/workflows/pr-require-checks.ymlmatches lines.bash scripts/check-cant-fail-scan.test.sh(20 cases, among them the stay-quiet cases for no changed test file and for a clean changed test file, andcheck-tests' own step run with and without a diff base);bash scripts/ci-ordered-skips.test.sh(13, unchanged from main);bash scripts/check-affected-gates.test.sh;scripts/check-docs-only-gate.sh --check;scripts/check-lane-coverage.sh --check;actionlint;shellcheck;shfmt -d.::notice::Not applicable: no test file changed since origin/main,cant-fail-scan=successdef test_x(self): passtest: run 39959422215, check-plugins failed onrule-zero-assertionatscripts/test_cant_fail_demo.py:5, withcant-fail-scan=failurethe only failed gatePASS: 3 changed test file(s)(the three changed suites, clean),cant-fail-scan=success. The first attempt's lint-repo hung 7 minutes in its checkout step and was re-runcheck-teststook 12 s and printedcheck-plugins scans the test files changed since origin/main.Related
🤖 Generated with Claude Code