Skip to content

feat(mutation): auto-merge is a setting, not a boundary - #69

Merged
rldyourmnd merged 1 commit into
mainfrom
feat/auto-merge-serves-the-agent
Sep 1, 2026
Merged

feat(mutation): auto-merge is a setting, not a boundary#69
rldyourmnd merged 1 commit into
mainfrom
feat/auto-merge-serves-the-agent

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Enabling GitHub auto-merge was refused in four independent places — the provider rejected the payload before the request, the rollout plan hardcoded auto_merge: false, and mutation-capability + rollout schemas pinned the value as a const. No managed repository could have it on.

The refusal was grouped with force updates, visibility changes, permission changes and ruleset bypass. That grouping does not hold: each of those four removes a check, while auto-merge removes only the wait between a required check passing and the merge it already authorized. It cannot lose data, replace a credential, or expose private content — the three boundaries this engine stops at.

Measured cost of the wait: dependency PRs github-device-sync#59 and ci-workflows#75 sat 30.7 h and 25.4 h green before anyone merged them; every other PR paid a poll loop.

What changed

  • core/providers/github/mutation_repository.go — the pre-request refusal is gone; allow_auto_merge is an ordinary managed merge setting in both directions.
  • core/rollout/{plan,request}.go — a rollout carries its own auto_merge instead of a hardcoded false.
  • schemas/v1/mutation-capability.schema.jsonauto_merge is allowed | forbidden, not const: forbidden.
  • schemas/v1/rollout.schema.json — boolean, not const: false; rollout-request accepts it.
  • ADR 0023 and the mutation provider contract record why the grouping was wrong.

The required checks are untouched. They remain the gate; only the wait is removed.

Verification

  • go test ./core/... green, including a new positive test proving the value reaches GitHub (TestUpdateRepositorySettingsCarriesAutoMergeEnablement), replacing the negative one that pinned the refusal.
  • scripts/validate_ci_tier.sh fast PASS (Go core, schema validation, ADR index current).

Enabling GitHub auto-merge was refused in four independent places: the
provider rejected the payload before the request, the rollout plan hardcoded
`auto_merge: false`, and two schemas pinned the value as a `const`. Together
they meant no managed repository could ever have it on.

The refusal was grouped with force updates, visibility changes, permission
changes and ruleset bypass. That grouping does not hold. Each of those four
removes a check. Auto-merge removes only the wait between a required check
passing and the merge that check already authorized -- it cannot lose data,
replace a credential, or expose private content, so it is not one of the three
boundaries this engine stops at.

The wait was not free. Dependency pull requests sat 30.7 h and 25.4 h in the
green after their checks passed, because landing them needed a human or an
agent to look. Every other pull request paid a poll loop instead.

Auto-merge is now an ordinary managed merge setting the provider may set in
either direction, and a rollout carries its own `auto_merge` instead of a
constant. The required checks are untouched: they remain the gate.
@rldyourmnd
rldyourmnd enabled auto-merge September 1, 2026 17:21
@rldyourmnd
rldyourmnd merged commit 03a8830 into main Sep 1, 2026
7 checks passed
@rldyourmnd
rldyourmnd deleted the feat/auto-merge-serves-the-agent branch September 1, 2026 17:25
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