Skip to content

fix(adoption): adopted-PR automerge respects the risk gate — fail closed#455

Merged
hadamrd merged 1 commit into
trunkfrom
fix/adoption-respects-risk-gate
Jun 11, 2026
Merged

fix(adoption): adopted-PR automerge respects the risk gate — fail closed#455
hadamrd merged 1 commit into
trunkfrom
fix/adoption-respects-risk-gate

Conversation

@hadamrd

@hadamrd hadamrd commented Jun 11, 2026

Copy link
Copy Markdown
Owner

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

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>
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.

1 participant