Skip to content

Write down the stacked-PR rule that has stranded work twice - #30

Merged
mikemaccana merged 1 commit into
mainfrom
claude/pr-hygiene-notes
Aug 7, 2026
Merged

mikemaccana merged 1 commit into
mainfrom
claude/pr-hygiene-notes

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Adds a CLAUDE.md. Flat off main, independent of #29.

Stacked PRs have stranded work in this repository twice — the #17/#18 pair, and now the Time chapter rewrite in #22/#26. The failure is silent: merging a child into a base branch that has already merged puts the work somewhere nobody will merge from again, while GitHub reports every PR in the stack as merged.

The file records:

  • The rule. Retarget the child onto main as soon as the parent merges, and before merging the child. Never merge a PR whose base branch has already merged. Prefer flat PRs off main when the work is separable.
  • The check that proves it landed, since the merged badge does not:
    git merge-base --is-ancestor origin/<branch> origin/main && echo "landed" || echo "STRANDED"
    
  • The three verify commands this repository expects before a push (npm run lint, check-figure-geometry.mjs, npm run build-pdf), plus the faster single-chapter preview.
  • The rule that prose must not name an identifier the companion repository does not have, which a rename in this session got wrong in two paragraphs.

Generated by Claude Code

Merging a PR into a base branch that has already merged puts the work in a
branch nobody will merge from again, and GitHub still shows every PR in the
stack as merged. It cost the Time chapter rewrite once and the #17/#18 pair
before that.

Records the rule (retarget onto main before merging the child), the
one-line check that proves a branch actually landed, and the verify
commands this repository expects before a push.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ABFpszmPxRorwWtWGR2jXj
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.

2 participants