Skip to content

fix(pr-unblock): route dependency-fix-refused to a session builder, not the owner - #17559

Open
kyle-sexton wants to merge 1 commit into
mainfrom
fix/dependency-fix-refused-session-route
Open

kyle-sexton wants to merge 1 commit into
mainfrom
fix/dependency-fix-refused-session-route

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Refs: #17569

Owner decision: owner-decisions.md line 248 (record PR melodic-software/architecture#115).
verbatim: "with recommendations. Again, the security issue has to be critical, like an actual security issue"

Summary

dependency-fix-refused held a Dependabot pull request for the owner as a security stop (needs-human) whenever a commit other than Dependabot's was on the branch. Every such commit comes from one of our own actors, so the hold guarded only against them. Under the owner's standing direction that is friction, not a security boundary: only a token or secret leak, an account compromise or billing goes to the owner (§3, §10). The owner confirmed this for this case on 2026-11-19 (row and quote above).

#17344 shows the cost: the lane held it at 04:20Z. The @dependabot recreate at 06:14Z already removed the foreign commit, but the label stayed until a session removed it at ~23:08Z.

Fix

  • .github/scripts/pr-unblock/escalation-routes.json: dependency-fix-refused routes fail with needs-session instead of hold with owner reason security. A session builder drops or rebuilds the commit (for example @dependabot recreate), and the new head starts clean. dependency-escalate-security still holds a HIGH or CRITICAL risk in the update for the owner.
  • .github/scripts/pr-unblock/report-escalation.test.sh: moves the reason from HOLD_REASONS/OWNER_REASONS to SESSION_REASONS. The test's route check then asserts the row applies needs-session, not needs-human. It also deletes the two comment blocks that restated the arrays, which the comment lint flagged on the edited lines.
  • .github/scripts/pr-merge/clear-escalations.test.mjs: the reason joins the review-dependency fail routes.
  • docs/conventions/pr-pipeline/README.md: names the stop as a session-builder one.
  • .changes/pr-pipeline/: patch fragment.

The workflow's reason allow-lists (pr-run-activity-write.yml) only check that the script may give the reason, so they need no change.

Verification

  • bash .github/scripts/pr-unblock/report-escalation.test.sh: 1407 ok, 0 not ok.
  • node --test .github/scripts/pr-merge/clear-escalations.test.mjs: 128 pass, 0 fail.

Related

#17344, docs/adr/0073-merge-dependabot-pull-requests-in-the-pr-merge-lane.md

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgeasNxAPMueGtzfrDM

…ot the owner

A non-Dependabot commit on a dependency update comes from one of our own
actors, so holding it for the owner as a security stop was friction. It now
fails with needs-session; a session builder drops or rebuilds the commit and
the new head starts clean. dependency-escalate-security still holds a real
HIGH or CRITICAL risk for the owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeBVgeasNxAPMueGtzfrDM
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T23:22:07.270991Z d9471a5 PR opened
ℹ️ 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

Copy link
Copy Markdown
Contributor

claude-review reviewed d9471a5b10d8fbc8079529da0f25de7ffe59ef59: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR moves dependency-fix-refused off the owner hold route (owner reason security, label needs-human) and onto the fail route with label needs-session. It changes these files to match:

  • escalation-routes.json (the route itself)
  • report-escalation.test.sh (the reason leaves HOLD_REASONS/OWNER_REASONS and joins SESSION_REASONS)
  • clear-escalations.test.mjs (the reason joins the review-dependency fail list, and the assertion message is updated)
  • README.md (the pipeline docs)
  • a bump: patch changelog fragment

Checked:

  • Producers. I read every place that produces or allow-lists the reason: the two end(...) calls in apply-dependency-verdict.mjs, and the three reason allow-lists in pr-run-activity-write.yml. None of them depends on the route, which matches the PR's claim that the allow-lists need no change.
  • Merge stays blocked. The verdict job still posts no merge marker, and the merge gates still refuse a commit that isn't Dependabot's (commit-not-dependabot:<sha>). So the reroute only changes who is asked to unblock the PR. It does not widen what can merge.
  • Docs. I found no other doc that calls this stop a hold for a person:
    • pr-run-activity.md, near L1432 and L1451, only names the reason.
    • ADR 0073, near L154, only names the reason.
    • The older CHANGELOG.md entries describe past behaviour.
    • The README sentence the PR rewrote ("hands the pull request to a session builder") now matches the new route.
  • Tests. Both updated test arrays agree with the new JSON row. I did not run either suite. The PR's reported counts (1407 ok; 128 pass) are the author's claim and unverified.
  • Closing issue. The PR closes none, so there are no acceptance criteria to check.
  • Loosened check. The wrapper supplied no loosened_check_verdict: or loosened_check_patterns: line, so I used fail with no consumer entries. It supplied no decision-record line either, so the citation requirement was not checked. Loosened-check verdict: no loosened check in this diff.
  • Spend. None: nothing here changes spend or billing.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d9471a5b10d8fbc8079529da0f25de7ffe59ef59: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This pull request reroutes the dependency-fix-refused stop. It used to be a hold with owner reason security, which applies needs-human. It is now a fail with needs-session. The other four files are tests, docs and a changelog fragment that follow the route change.

What I checked. The escalation-routes.json row decides only how the stop is reported and who is asked to act on it. The gate that keeps a foreign commit from being merged is a separate piece of code, and this diff does not touch it:

  • On a merge verdict, the verdict job checks every commit and its pusher. If any commit is not Dependabot's own or a lane fix, it posts no merge marker (apply-dependency-verdict.mjs#L417-L437).
  • On a fix verdict, the lane's own fix is refused the same way (apply-dependency-verdict.mjs#L382-L386).
  • The pr-merge lane merges a Dependabot pull request only on a merge marker that names the reviewed head.

So the change does not let anything merge that the base would have stopped. The needs-session label does come off automatically at a new head once checks pass (clear-escalations.mjs#L1879-L1898). That does not open a merge path, because a new head needs a fresh dependency review, and that review runs the commit and pusher checks again.

I also checked whether rerouting sends untrusted text to an automated lane that holds credentials. It does not: no workflow acts on needs-session except the step that clears it (pr-merge.yml), so the label only queues the pull request for a session builder.

Owner threat model. Before this change, the stop was a person-approval hold on a non-Dependabot commit, made by one of the owner's actors (anyone who can push the branch has write access). Removing that hold is a named friction-hold removal, so it is not a finding. The kept security control for untrusted provenance is the verdict job's refusal to post a merge marker, and it is unchanged.

No pull request text tries to give the lane instructions. No change can bill or spend extra credits.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head d9471a5b10d8fbc8079529da0f25de7ffe59ef59. What it wrote, as data:

What it wrote (33 lines)
Summary: PR #17559 links no issue, so its spec is its own title and body (spec_kind pull-request).
  The diff matches that body: `dependency-fix-refused` in escalation-routes.json moves from `hold`
  with owner reason `security` to `fail` with `needs-session`, and the two test suites, the README
  and the changelog fragment change to match. All test jobs passed on the judged head (Test Bash
  0–3, Test Node:
  https://github.com/melodic-software/claude-code-plugins/actions/runs/44636171470/job/136011673013).
  No capture ran. The route is still sound in code: the lane still posts no merge marker. The
  problem is the step this removes. At the base, the person-only hold is documented as a trust hold
  the owner keeps on commits of untrusted provenance, and this PR deletes that comment. With the
  change, a session builder (an agent) can clear the stop instead of a person. That weakens a guard
  and loosens an owner-kept hold. Only a `closes` or `refs` issue that links the owner-decisions
  record and quotes the owner's words after `verbatim:` can authorize that. This PR has neither: its
  body only says the owner confirmed it in a session. So the verdict is fail.
- PR body: the owner's approval for downgrading this hold is only asserted ("the owner confirmed
  this in a session on 2026-11-19"), with no line link to docs/owner-decisions.md and no `verbatim:`
  quote. Weakening an owner-kept guard needs both, on an issue this PR closes or refs. File or link
  that issue with the link and quote, or drop the route change.
- .github/scripts/pr-unblock/escalation-routes.json:56: changing `dependency-fix-refused` from
  `hold`/owner-reason `security` to `fail`/`needs-session` takes the person out of the trust hold on
  non-Dependabot commits without a recorded owner decision. Keep the `hold` row until an authorizing
  issue cites the owner-decisions line and verbatim quote.
- .github/scripts/pr-unblock/report-escalation.test.sh:64: this moves `dependency-fix-refused` from
  HOLD_REASONS/OWNER_REASONS to SESSION_REASONS and deletes the comment calling it "a trust hold the
  owner keeps". Revert that along with the route row, or keep it only once the owner decision is
  cited.
- .github/scripts/pr-merge/clear-escalations.test.mjs:340: this adds `dependency-fix-refused` to the
  review-dependency fail routes. Revert it along with the route row unless the owner decision is
  cited.
- docs/conventions/pr-pipeline/README.md:2457: the text now says the refused fix goes to a session
  builder. Revert it along with the route row unless the owner decision is cited.
- .changes/pr-pipeline/fix-dependency-fix-refused-session-route-5d1e9b37.md: this fragment records
  "owner direction, 2026-11-19" with no record link. Remove it, or back it with the owner-decisions
  line link on the authorizing issue.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant