Repository navigation
docs(agents): merge stacks forward with every layer green; merge down only for vendor upgrades - #588
theCodeDrift wants to merge 1 commit into
Conversation
… only for vendor upgrades
|
@claude /review |
|
Claude finished @theCodeDrift's task in 1m 56s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing. Scope: docs-only change to Findings:
Consistency checks that passed:
No other correctness, security, or clarity issues found in the diff. |
| **Merge forward, all green, by default.** `gh stack merge` is all-or-nothing in both directions: it lands the whole stack at once, so units that are only correct together still reach `main` together, and one red layer blocks the whole stack. So "these units are only correct together" is not a reason for a red intermediate layer. It is a reason to put those units in the **same** layer. Find the change that cannot be split (a renamed directory and everything that reads its name, say), make it one layer, and move everything that is correct without it into the layers below. Verify each branch, since "this layer is green" is a claim about behavior, not intent: run typecheck, lint and the full suite on every branch before pushing. | ||
|
|
||
| Note how this interacts with archiving: a change is archived exactly once, on whichever PR is the tip. **No check gates that anywhere any more, though the state is reported.** A PR-time gate could only guess at stack position, and guessed wrong often enough to be ignored; a `main`-only gate replaced it and turned `main` red for the entire time a forward-merging stack was draining, which is a red that means "work is in progress" rather than "something is wrong". A signal that is expected to be red is not a signal. Archiving is a step you perform on the tip, and what replaced the gates reports instead of failing: an `Open OpenSpec` label and a tip warning on pull requests, and on `main` a tracking issue and a stale-work sweep, which is the abandoned work neither gate measured. | ||
| **Merge down only for a vendor upgrade, or a lateral merge into the stack.** Bumping a vendored engine (ast-grep, Vale) is the one case where a red layer is the point. The bump goes in its own layer, so a reviewer sees exactly what the new version broke, and the layers above it are the codemods and fixes that make it green. That bottom layer cannot be green on its own by construction, so `gh stack merge` cannot land the stack, and it merges down instead (below). |
There was a problem hiding this comment.
[New] "a lateral merge into the stack" is introduced here (and in the PR description) but never defined anywhere in this doc — the table above and the "Landing a vendor-upgrade stack" section below only describe merging down. A reader following this guidance has no way to tell what a lateral merge actually is, when it differs from merging down, or how to execute one. Either define it inline or drop the phrase until there's a section for it.
Makes stacked, merging forward, every layer green the default delivery shape, landed with
gh stack merge.gh stack mergeis all-or-nothing in both directions. It lands the whole stack at once, so units that are only correct together still reachmaintogether, and one red layer blocks the whole stack. "Only correct together" is therefore a reason to put those units in the same layer, not a reason for a red intermediate one. Make the change that cannot be split into one layer, and move everything that is correct without it below.Prompted by #583–#586, where a red intermediate layer would have blocked
gh stack merge. That stack has been regrouped to be green at every layer.No changeset: this changes contributor guidance only.