Skip to content

fix(pr-pipeline): give a ci-fix-escalated stop a next actor - #11175

Merged
kyle-sexton merged 4 commits into
mainfrom
fix/ci-fix-escalated-next-actor
Oct 30, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
fix/ci-fix-escalated-next-actor

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Closes #10971

Summary

Before this change, a ci-fix-escalated stop left the pull request with a failing pr-unblock/fix-ci status, no label and no next actor once its same-head retry was spent. #10974 already restored that retry, so the only part of #10971 left was the route. A check that the rung-up retry could not fix is not one of the owner's three reasons, so it now goes to an agent session (needs-session) and not to a person. The label goes on at each ci-fix-escalated stop, while the dispatcher's same-head retry still runs, so the PR has a next actor even when that retry is skipped (the per-head cap). The session that finds the head green or lands the fix removes the label; no lane removes it.

Fix

  • .github/scripts/pr-unblock/escalation-routes.json: ci-fix-escalated stays route: fail and gains "label": "needs-session".
  • .github/scripts/pr-unblock/report-escalation.sh reads an entry's label only on a fail route and only as a well-formed label name (^[a-z]+(-[a-z]+)*$); anything else fails the run. It writes the label before the lane-stopped comment that explains it. If a session removed the label and the lane stops again on the same head with an unchanged comment, it puts the label back and leaves the comment alone. The comment names the queue. A fail route with no label behaves as before: no label, and no issue read.
  • escalation-routes.mjs (comment) and docs/conventions/pr-pipeline/README.md describe the label.
  • A changelog fragment for pr-pipeline.

Verification

  • Test first. report-escalation.test.sh gets SESSION_REASONS=(ci-fix-escalated) and these new checks:
    • the table queues exactly these reasons and names no other label;
    • label then comment, never needs-human;
    • status mode still posts the failing status;
    • an already-labeled PR gets the comment only;
    • a removed label on the same head is put back with no comment write.
      The existing fail-comment edit-in-place cases now use ci-fix-round-cap, which is still unlabeled.
  • Red on the base (40df610c55): 5 not ok (route missing, label not written, queue not named, label not put back). Green after the fix: 817 ok, 0 not ok.
  • node --test from inside .github/scripts/pr-unblock/: 1033 of 1033 pass. .github/actions/resolve-config/callers.test.mjs: 202 of 202. pr-merge clear-escalations and merge-holds: 171 of 171.
  • shellcheck report-escalation.sh is clean. scripts/check-changelog-fragments.sh --check and --check-required origin/main both pass.
  • I checked the diff for secrets and machine-specific paths before the push and found none.

Metrics

A ci-fix-escalated stop is now countable as an open needs-session PR (the label is the queue), where before it showed only as a red status no queue held. Until a session clears it, that count also includes a PR whose same-head retry mended the stop. The stalled-lane-stop signal (#10718) can drop these once a session picks them up.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 30, 2026 01:27
A ci-fix-escalated stop left the pull request with a failing
pr-unblock/fix-ci status, no label and no next actor once its same-head
retry was spent. Route it fail with "label": "needs-session", and teach
report-escalation.sh to apply a fail route's label (well-formed names
only) before the lane-stopped comment, and again when a session removed
it and the lane stops on the same head.

Carved from #10954 per its pr-verify note.

Closes #10971

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 06:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T06:52:25.669221Z 8247c54 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 32cbc669d99ff3034956c6ca9ac39d0a078328b6: 0 finding(s), 0 as inline comments.

No security findings in the incremental change since 8247c54.

The change touches two prose files:

  • .changes/pr-pipeline/fix-ci-fix-escalated-next-actor-7c3e91a4.md
  • docs/conventions/pr-pipeline/README.md

Both rewrite the description of when ci-fix-escalated adds the needs-session label. The label now goes on at each such stop while the dispatcher's same-head retry still runs, and the session that finds the head green or lands the fix removes it. No code, workflow, token scope, trusted-actor list, kill switch or merge hold changes. Neither file matches a trusted-path glob. Neither removes or softens a standing instruction or a guardrail. They describe behavior only.

The script that applies the label (report-escalation.sh) and escalation-routes.json are not in this increment. They were reviewed at 8247c54 and are unchanged.

I read the diff and did not compare the new prose against that code. If the prose and the code disagree, that is a documentation accuracy issue, not a security one.

Skip gate 2 applies: the change has no security-relevant surface.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 8247c54d1e62b5270bf4fa130cd32d424630ed0a; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 32cbc669d99ff3034956c6ca9ac39d0a078328b6: 0 finding(s), 0 as inline comments.

Incremental review of the two files changed since 8247c54: the pr-pipeline changelog fragment and docs/conventions/pr-pipeline/README.md. I found nothing to report.

The change is wording only. It now says three things:

  • The needs-session label goes on at each ci-fix-escalated stop, while the dispatcher's same-head retry still runs.
  • The session that finds the head green or lands the fix removes the label.
  • No lane removes it.

I checked those claims against the PR description. I also searched .github for other references to needs-session. The only ones are the escalation-routes.json entry, a comment in escalation-routes.mjs, and report-escalation.*. No lane code clears the label, so "no lane removes it" holds.

I did not run the tests or the shell script. The test results in the PR description are author-claimed and I did not verify them.

The README paragraph has a line break after "A cancelled run applies no label: the write". It is cosmetic and I did not flag it.

Spend: this change adds no paid-plan, billing or other cost change.

… stop

The label is applied at every ci-fix-escalated stop while the
dispatcher's same-head retry still runs, so a skipped retry still leaves
a next actor; the session that finds the head green or lands the fix
removes it, and no lane does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 629eac3 Oct 30, 2026
100 of 103 checks passed
@kyle-sexton
kyle-sexton deleted the fix/ci-fix-escalated-next-actor branch October 30, 2026 07:46
kyle-sexton added a commit that referenced this pull request Oct 30, 2026
…-reason-holds

Compose both sides in the eight conflicted files:
- escalation-routes.json: keep the branch's ci-fix-escalated why; both
  sides add the needs-session label (#11175).
- escalation-routes.mjs, report-escalation.sh header: main's wording plus
  the branch's three-reason hold and fail-safe for an unlisted reason.
- report-escalation.test.sh: the branch's HOLD/SESSION reason sets with
  main's stricter no-other-label check.
- pr-pipeline.yaml: review-dependency and apply-dependency-patch wait on
  needs-session and "security: outside-actor".
- live-config.test.mjs: keep both new tests.
- pr-require-checks.yml: the branch's floored paths with main's
  path-holds guard (sync-hold-floor.py --check clean).
- pr-pipeline README: the branch's routing text plus main's note that a
  session, not a lane, removes needs-session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pr-pipeline): give a ci-fix-escalated stop a next actor

1 participant