Repository navigation
refactor(ci): run the demotion filing step from a tested script - #18450
Conversation
post-merge-file-demotion-issues.yml's "File or comment on the demotion issue" step now runs .github/scripts/post-merge-demotion-alert/ file-demotion-issue.sh from main's checkout (.base), with the same id, env and outputs. The body moved verbatim, shfmt-formatted; its api-budget wrap now sources the library relative to the script, as the repo's other self-wrapping scripts do. The script joins the hold floor as a gate row, like the workflow that runs it. The shell suite, workflow.test.mjs, demotion-record.test.mjs, label-unblocked and the api-budget tests read the script; the coverage detector follows a bash-run script to the Node scripts it runs. Reasons kept from deleted comments: - A failed intake hand-off (retry step or this one) fails the job at the step's end and takes no needs-human; the next run retries it. - A cancel counts as a failure: pr-require-checks.yml cancels no running full run, so a cancel came from an actor with actions: write or a time-budget overrun. A dispatch replaced in the main-dispatch group before it started is no signal and files nothing. A passing re-run is recorded, never cleared. A dispatched run files on action_required too, matching babysit_postmerge.py's FAILED_CONCLUSIONS. - A full run's failed jobs are re-run once and waited on here, since a re-run this token starts raises no workflow_run event. babysit_postmerge credits it only on a run the bot did not start, so pr-merge dispatches are left to the wrapper's re-run; if the wrapper re-ran first the POST fails and the wait reads its attempt. The wait is 20 minutes, or red-main.confirm-wait-minutes (default 55, at most 60, 40 when unread) for a bot-started dispatch. A dispatched red files nothing once a newer full run on main passed (newer-green.bash), checked during and after the wait; a failed lookup keeps waiting, then files. - Failing checks follow red-main.mjs's rule (failing-checks.mjs on the runner's node). Judge exit 0 files only quarantine issues; 1 demotes (a baseline-red check whose quarantine expired); any other exit warns and files as before. Quarantine issues are locked and sent to intake, since github-actions[bot] issues start no issues run. - Each sighting names its attempt, so a later failing attempt is a new sighting. A full run is charged to every first-parent commit since main's last green full run; compare pages past the first are read only for at most 300 commits, since GitHub lists at most 250 unpaged. - Only a merge the lanes App enqueued demotes the lane: the agent identity as actor or enqueuer of each PR's latest AddedToMergeQueueEvent, never the commit author. Anything unproven demotes: a canary, an unknown range, a subject with no (#N), an unreadable identity, a failed lookup. - Records are read from both filers (github-actions[bot] and merge.agent-identity); a user-opened issue with the marker cannot stand in. A failed read of the bot's records fails the job; of the identity's, it warns and can only add a record, never drop one. A record matched by its failing run must be a demotion record. - Revert detection is anchored at line starts (Reverts #N lists, revert- button subjects, `This reverts commit`, the red-main revert marker), so prose or another repository names nothing; an unreadable reverted subject is an unproven revert and demotes. The canary push range is at most 20 commits, the newest 20 when the previous head cannot be read. - A cut or guessed range gets no lift block, since one that understates the deletion would lift the record; a record without a block clears only on a person's close. The file-revert job files the revert record with issues: write alone; outputs are written before anything can fail the step, as the runner keeps a failed step's outputs. - A commit subject is rendered in code font without backticks, so it mentions no one. - Fix issues: one per newly failing check, at most 5, with fixed text (a fix_name_ok check name, hex SHAs, the numeric run link, the record number), no label, closing keyword, subject or marker, so no reader takes one for a record. Job names only, never annotation text. - A canary record and a full-run record with a check over the cap or outside the charset keep Work status needs-human, as reviewed exceptions to the owner's stop rule; a failed intake hand-off is not one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-script The hold-floor files take main's version, regenerated by sync-hold-floor.py with this branch's file-demotion-issue.sh gate row beside main's rerun-ci-status.sh row. The floor pins are main's counts plus that one gate row (high and author-review routes). Co-Authored-By: Claude Opus 5.5 <[email protected]>
check-shell-portability.sh flagged two constructs the script carried over from the inline step: the revert-marker regex's escaped angle brackets and gh --jq's \s. The marker regex now quotes its literal parts, and the trims spell \s as gojq's own set, [\t\n\f\r ], so both match exactly what they did. api-budget-coverage.test.mjs reads the script through its bash-run detector, so it now declares it in test-scope. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-script 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 (incremental): PR #18450 at
|
|
claude-review reviewed Code review: PR #18450, incremental since
|
#10517 is closed. Reasons for this branch's other deleted comments are in the PR body. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main added a gate row to the hold floor (#18450) while this branch added the cdn-paths.mjs enforcement row. The floor pins carry both: 163 rows, gate 72, enforcement 66; high and author_review take main's digests, review takes this branch's. pr-require-checks.yml's hold_patterns is regenerated by scripts/sync-hold-floor.py. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: candidate 17 (part 2) of an
/architecture:improvedeepening pass over the CI lanes, run in a local session.Summary
post-merge-file-demotion-issues.yml's "File or comment on the demotion issue" step held its filing logic as a large inline bash body, reachable by tests only through the workflow file.Fix
.github/scripts/post-merge-demotion-alert/file-demotion-issue.shfrom main's checkout (.base), with the same id, env and outputs. The body moved verbatim, shfmt-formatted; its api-budget wrap sourcesapi-budget.bashrelative to the script, as the repository's other self-wrapping scripts do.gaterow, like the workflow that runs it;sync-hold-floor.pyregenerated the floor copies and the pins moved. The job checks out the full.base, so no copy list changes.\<and\>, and thegh --jqtrims spell\sas[\t\n\f\r ]; both forms give identicalgh api --jqoutput.TODO(#10517)above the record filing is dropped: fix(pr-pipeline): align every needs-human path with the owner stop rule #10517 is closed, and the script's comment scan flags a TODO the workflow's YAML hid.api-budget-coverage.test.mjsgains atest-scopeline for the script; no assertion or expected entry changes.Reasons kept from deleted comments
pr-require-checks.ymlcancels no running full run, so a cancel came from an actor with actions: write or a time-budget overrun. A dispatch replaced in the main-dispatch group before it started is no signal and files nothing. A passing re-run is recorded, never cleared. A dispatched run files on action_required too, matchingbabysit_postmerge.py'sFAILED_CONCLUSIONS.red-main.confirm-wait-minutes(default 55, at most 60, 40 when unread) for a bot-started dispatch. A dispatched red files nothing once a newer full run on main passed (newer-green.bash), checked during and after the wait; a failed lookup keeps waiting, then files.red-main.mjs's rule (failing-checks.mjson the runner's node). Judge exit 0 files only quarantine issues; 1 demotes (a baseline-red check whose quarantine expired); any other exit warns and files as before. Quarantine issues are locked and sent to intake, since github-actions[bot] issues start no issues run.merge.agent-identity); a user-opened issue with the marker cannot stand in. A failed read of the bot's records fails the job; of the identity's, it warns and can only add a record, never drop one. A record matched by its failing run must be a demotion record.This reverts commit, the red-main revert marker), so prose or another repository names nothing; an unreadable reverted subject is an unproven revert and demotes. The canary push range is at most 20 commits, the newest 20 when the previous head cannot be read.has_blockreads columns with awk, not read: withIFS=$'\t', read merges empty tab-separated fields, so an emptyFailing runcolumn would shift column 7.babysit_postmerge.pyhas no checkout to scan) gets it as a comment, once.needs-triage critical small low known.Verification
write-runner-never-rules.test.sh75 pass;test_diff_risk.py146 pass (PyYAML installed).sync-hold-floor.py --checkclean.scripts/check-shell-portability.sh origin/mainclean;plan-test-lanes.sh --base origin/mainendsunmapped=0; the can't-fail scan flags nothing.Related
Part of the
.githubdeepening series; follows #18438 (part 1, pr-dispatch-feedback).🤖 Generated with Claude Code