feat(mutation): auto-merge is a setting, not a boundary - #69
Merged
Conversation
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.
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.
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, andmutation-capability+rolloutschemas pinned the value as aconst. 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#59andci-workflows#75sat 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_mergeis an ordinary managed merge setting in both directions.core/rollout/{plan,request}.go— a rollout carries its ownauto_mergeinstead of a hardcodedfalse.schemas/v1/mutation-capability.schema.json—auto_mergeisallowed | forbidden, notconst: forbidden.schemas/v1/rollout.schema.json— boolean, notconst: false;rollout-requestaccepts it.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 fastPASS (Go core, schema validation, ADR index current).