feat(cli): Ralph loop lands branches with a merge, preserving each ticket's commits - #71
Merged
Merged
Conversation
…cket's commits The loop-owned landing used `git merge --squash`, collapsing every ticket into one commit on the integration base. Land with `git merge --no-ff` instead, so the branch's own commits (the push-after-every-green-step history) are preserved beneath one labelled merge commit that still carries the Conventional Commit title, `(#n)`, and the `Closes #n` trailer. Everything else about the landing is unchanged: the serialized lander, the fast gate on the merged tree, remote verification, checkpoints, and the base-moved re-sync (a conflict or a gate-fail hands back as before). An "Already up to date" merge is the empty-land case, still reported `failed`. The parallel copies move together: the ralph workflow's Land dispatch, the launch-ralph landing section and policy lines, the launch-ralph-implement hand-off note, and the seeded loop summary. Adds 2026-09-17-ralph-land-preserves-commits.md (amends ADR-0032 and ADR-0022) and regenerates the ADR registry index. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCjoCBSGLqPnNRQdkh2Qr5
Resolve the docs/adr/README.md conflict by regenerating the registry index with `launchrail adr index`, so both new dated ADRs are listed: master's design-fidelity-build and this branch's ralph-land-preserves-commits. The launch-ralph-implement skill auto-merged cleanly — master's design-fidelity additions to items 1 and 5, this branch's merge-not-squash change to item 7. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCjoCBSGLqPnNRQdkh2Qr5
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.
What & why
The Ralph loop's landing squashed each ticket into a single commit on the shared integration base. This change keeps all of the branch's commits instead.
The loop-owned landing (ADR-0032) used
git merge --squash, collapsing every finishedralph/<n>-*branch into one commit. It now lands withgit merge --no-ff, so each ticket's own commits — the push-after-every-green-step history — are preserved beneath one labelled merge commit.What changed
git merge --no-ff origin/<branch> -m "<title> (#n)" -m "Closes #n" -m "Landed by the Ralph loop…". The merge commit still carries the Conventional Commit title, the(#n)reference, and theCloses #ntrailer, so the ticket→commit trail and the auto-close keyword are intact; the branch's commits are reachable beneath it.baseMovedre-sync (a conflict or a gate-fail hands back as before).--no-ffhas the same success/conflict surface the squash did, so throughput doesn't regress.failed, as the empty squash was.Trade-off
The integration base is no longer one linear commit per ticket — it carries a merge commit per ticket with the branch's commits beneath, WIP checkpoints included (which is what "keep all the commits" means).
git log --first-parentgives the one-line-per-ticket view; reverting a ticket isgit revert -m 1 <merge>.The single-ticket
/launch-implementPR flow is untouched — a one-ticket PR squash-merged into the default branch is a separate, conventional choice, not the loop's shared-branch landing.Files
packages/cli/assets/ralph.workflow.js— Land dispatch, schema descriptions, comments (+ mirrored example)launch-ralph/launch-ralph-implementskills — landing section, policy lines, hand-off note (+ mirrored examples)packages/cli/src/lib/seeds.ts— seeded loop summary (+ generated example)docs/adr/2026-09-17-ralph-land-preserves-commits.md— new ADR (amends ADR-0032 and ADR-0022); registry index regeneratedpackages/cli/tests/add-ralph.test.ts— assertsgit merge --no-ff, no--squashValidation
pnpm buildclean ·pnpm test— 256 passed ·launchrail adr indexregenerated and idempotent.🤖 Generated with Claude Code
https://claude.ai/code/session_01WCjoCBSGLqPnNRQdkh2Qr5
Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.