fix(adoption): adopted-PR automerge respects the risk gate — fail closed#455
Merged
Conversation
Live incident (getadaptiq #108, 2026-06-11): an adopted PR from a risk:high issue auto-merged MID-HUMAN-REVIEW — while the operator was running its acceptance evals, which then FAILED 2/6 deterministically. Main carried a broken routing change for ~40 minutes until the review repair landed. _enable_automerge_for_adopted_prs documents itself as mirroring _enable_automerge_for_reviewed_outcomes, but the mirror dropped risk_gated_issues. Adopted PRs predate the tick's dispatch metadata, so the gate now checks the ISSUE's labels fresh via the rescue gate's helper (promoted public; one source of truth, fail-closed on fetch failure), emitting orphan_pr_skipped reason=risk_gated. This closes the LAST of the three merge conveyors: dispatch-path gate (pre-existing), rescue-path gate (#454), adoption-path gate (this). TDD: gated-adoption never merges, fetch-failure fails closed; all existing adoption/rescue tests preserved. 44/44. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live incident (getadaptiq #108, 2026-06-11): an adopted PR from a
risk:high issue auto-merged MID-HUMAN-REVIEW — while the operator was
running its acceptance evals, which then FAILED 2/6 deterministically.
Main carried a broken routing change for ~40 minutes until the review
repair landed.
_enable_automerge_for_adopted_prs documents itself as mirroring
_enable_automerge_for_reviewed_outcomes, but the mirror dropped
risk_gated_issues. Adopted PRs predate the tick's dispatch metadata, so
the gate now checks the ISSUE's labels fresh via the rescue gate's
helper (promoted public; one source of truth, fail-closed on fetch
failure), emitting orphan_pr_skipped reason=risk_gated.
This closes the LAST of the three merge conveyors: dispatch-path gate
(pre-existing), rescue-path gate (#454), adoption-path gate (this).
TDD: gated-adoption never merges, fetch-failure fails closed; all
existing adoption/rescue tests preserved. 44/44.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com