fix(land-and-deploy): correct the --auto failure diagnosis in Step 4 - #2437
Open
Jmeg8r wants to merge 1 commit into
Open
fix(land-and-deploy): correct the --auto failure diagnosis in Step 4#2437Jmeg8r wants to merge 1 commit into
Jmeg8r wants to merge 1 commit into
Conversation
Step 4 says `--auto` failing means "repo doesn't have auto-merge enabled". That is only one of two causes, and in practice it is the rarer one. `--auto` only QUEUES a merge behind pending required checks. When every required check has already settled -- or the repo declares no required status checks at all -- GitHub considers the PR immediately mergeable and rejects enablePullRequestAutoMerge with "Pull request is in clean status" or "Pull request is in unstable status". Auto-merge being enabled makes no difference. A repo with zero required status checks takes the direct path 100% of the time, and so does any repo whose CI finishes before Step 4 runs. The flow itself is fine -- the direct-merge fallback already handles both cases. The problem is the recorded reason: an operator reading MERGE_PATH=direct is told to go check whether auto-merge is enabled, which sends them to the wrong setting. I lost time to exactly that on a repo where auto-merge was enabled the whole time and the ruleset simply had no required checks. Also adds --squash to the --auto invocation. The fallback squashes, so without it the two paths merge with different strategies depending on which one happens to be taken. Docs-only. Regenerated with `bun run gen:skill-docs` (and verified clean for --host codex and --host factory); output is idempotent on re-run, so the Skill Docs Freshness gate stays green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
Problem
Step 4 of
/land-and-deployattributes a failedgh pr merge --autoto one cause:That's only one of two causes, and in practice it's the rarer one.
--autoonly queues a merge behind pending required checks. When every required check has already settled — or the repo declares no required status checks at all — GitHub considers the PR immediately mergeable and rejectsenablePullRequestAutoMerge:Whether auto-merge is enabled makes no difference in that case. Two common repos hit this every single time:
--autois always rejectedWhy it's worth fixing
The flow is fine — the direct-merge fallback already handles both paths. The problem is the recorded reason. An operator who sees
MERGE_PATH=directis told to go check whether auto-merge is enabled, which points them at the wrong setting.I lost real time to this on a repo where auto-merge had been enabled the whole time and the ruleset simply declared no required checks. The wrong explanation in the docs is what made it take as long as it did.
Changes
--squashto the--autoinvocation. The fallback already squashes, so without it the two paths merge with different strategies depending on which one is taken.Docs-only — no behavior change to the flow itself.
Verification
Regenerated with
bun run gen:skill-docs, and confirmed clean for--host codexand--host factory(both exit 0). Output is idempotent on re-run, so the Skill Docs Freshness gate stays green. The tracked diff is exactly the two expected files:🤖 Generated with Claude Code