Repository navigation
refactor(ci): move the mutation legs' repeated setup steps into scripts - #15956
Conversation
The post-merge mutation lane's six model legs each carried the same 19-line "Set the diff target" body, and each stage's three legs the same 16-line "Stage the plugin and the prompt" body. Both now live once, in .github/scripts/post-merge-test-mutation/set-diff-target.sh and stage-plugin-prompt.sh (generate or triage; any other argument exits 2), and each of the twelve steps calls its script from main's checkout with its name, id, if: and env: unchanged. The scripts set -eo pipefail, as the workflow's `shell: bash` step shell did. Drop the two dead `rm -rf` lines before the key's credit-stop marker: no earlier step of those jobs writes the directory, and each job starts with an empty runner.temp. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
|
claude-security-review reviewed Security review: no security issues foundI read every hunk of the 3 changed files. What changed. The "Set the diff target" step body repeated across six legs. The "Stage the plugin and the prompt" step body repeated across three legs per stage. Both moved into two new scripts: What I checked:
No prior findings and no settled threads apply: this is the first review, so it was not limited to blocking findings. The PR context contains no embedded instructions aimed at this lane. critical-findings: 0 |
|
claude-review reviewed Code review: refactor(ci): move the mutation legs' repeated setup steps into scriptsI read the whole diff (3 files), the PR context and closing issue #15951, and the step context in Behavior. I compared each script with the inline bodies it replaces. They match line for line. The only changes are
Closing issue criteria (#15951):
The author's old-vs-new harness and lint runs are author-claimed and unverified. The harness was not committed. Note, not counted. The workflow file is in the gate class at pr-pipeline.yaml#L1952. The logic it ran inline (the on-main ancestry check and the read-only plugin staging) now lives in Spend: none changed. No model, turn, schedule or runner changes. No manifest, Verifier dropped 0 of 1 candidates. No verifier subagent ran: there was one candidate, and I checked it myself. |
Post-merge mutation testingKilled 0, survived 7, timeout 0, no coverage 0, invalid 0, not run 0.
Surviving mutants
The run's summary has the full report. |
Closes #15951
session: Simplify E2 B
Summary
The post-merge mutation lane's two repeated pre-model leg steps now each live in one script under
.github/scripts/post-merge-test-mutation/. "Set the diff target" repeated across six legs, and "Stage the plugin and the prompt" across three legs per stage. The two dead credit-markerrm -rflines are also gone. This is part of restructuring pass #15695. Behavior is unchanged.Fix
set-diff-target.sh(mode 100755,#!/usr/bin/env bash): holds the "Set the diff target" body verbatim, its# shellcheck disable=SC2016reason included. It readsBEFOREandAFTERfrom the environment.stage-plugin-prompt.sh <generate|triage>(mode 100755): holds the staging body, with<stage>.prompt.mdand<stage>.schema.jsonpicked by the argument. Any other argument, or none, exits 2. It readsHEAD_SHA,DIFF_TARGET,PROMPT_FILE,SCHEMA_FILEandMODELfrom the environment.id,if:andenv:. Itsrun:is now one line,bash .base/.github/scripts/post-merge-test-mutation/set-diff-target.shor… stage-plugin-prompt.sh generate|triage. The command still runs from the workspace root against main's checkout and still comes before the model step. No new token, permission or composite action.rm -rf "${RUNNER_TEMP:?}/key-credit-stop"from the key legs ofgenerateandtriage. No earlier step of those jobs names the directory, andrunner.tempstarts empty in each job. Each step keeps itsmkdir -pandecho.defaults.run.shell: bashruns steps asbash -eo pipefail, and a script called withbashinherits neither flag. So both scripts start withset -eo pipefail, and without-u, which the steps never had.# shellcheck disable=SC2154with its reason, aspr-verify/chunk-diff.shdoes, because the step env sets those variables.[ ]became[[ ]](SC2292). shfmt split the one-line{ …; exit 1; }groups. None of these changes behavior.Verification
Old against new, in scratch repos: a throwaway harness, not committed, ran the old step bodies taken from
HEAD's workflow underbash -eo pipefail, then the new scripts, in identical scratch repos. It compared stdout, stderr, the exit code,GITHUB_OUTPUT, the prompt and schema files, the settings file and.git/info/exclude. Every case was identical:generateand fortriage(rc 0);stage-plugin-prompt.sh bogusand a call with no argument both exit 2.Lints:
shellcheck --rcfile .shellcheckrcandshfmt -dwith the repo's.editorconfigare clean on both scripts.scripts/check-affected.shpassed 11 checks and skipped 5 over the 3 changed files.Tests: all 6 local test files that name this workflow pass under
scripts/run-test-file.sh, includingcredential-legs.test.mjsandcallers.test.mjs. Both compare the legs with one another, and all twelve steps changed alike.Other checks: local
actionlintreports no errors beyond thecache-modekey it does not know.check-artifact-retention.mjsreports 152 upload steps matching.Left to CI: the full
.githubsuite runs inci-status, under the one-suite-per-machine rule.Follow-ups
set-diff-target.shnotes. A small*.test.shthat runs both scripts in a scratch repo would close the gap. It would checkGITHUB_OUTPUT, the settings file and the exit codes for range, commit and not-on-main, plus the argument check. This issue's file list leaves out a new test, so it is a follow-up for the restructuring pass (Restructure and dedupe workflow files (final group, host sessions) #15695).Related
🤖 Generated with Claude Code