Skip to content

Lock in PR-against-fork rule after the upstream-mistarget incident#3

Open
cyrilsayada wants to merge 1 commit into
mainfrom
docs/pr-url-defaults
Open

Lock in PR-against-fork rule after the upstream-mistarget incident#3
cyrilsayada wants to merge 1 commit into
mainfrom
docs/pr-url-defaults

Conversation

@cyrilsayada

Copy link
Copy Markdown
Owner

A PR got opened against beck-source/inventory-management (upstream parent) instead of cyrilsayada/inventory-management (the fork) because /pull/new/<branch> on a fork defaults base to the parent. User caught it, closed the PR (beck-source#99 on beck-source), and had to remediate.

CLAUDE.md rule 5.5 ("Open the PR"):

  • Made it explicit that base = the fork, never upstream
  • Switched the browser-fallback URL from /pull/new/<branch> to /compare/main...<branch>?expand=1 (compare locks base in URL)
  • Added a final sanity-check step: visually verify the "base ← compare" selector before telling the user to click Merge

LEARNINGS.md:

  • New entry documenting symptom, root cause (GitHub's intentional fork-default), fix, and the rule

A PR got opened against beck-source/inventory-management (upstream
parent) instead of cyrilsayada/inventory-management (the fork) because
`/pull/new/<branch>` on a fork defaults base to the parent. User caught
it, closed the PR (beck-source#99 on beck-source), and had to remediate.

CLAUDE.md rule 5.5 ("Open the PR"):
- Made it explicit that base = the fork, never upstream
- Switched the browser-fallback URL from `/pull/new/<branch>` to
  `/compare/main...<branch>?expand=1` (compare locks base in URL)
- Added a final sanity-check step: visually verify the
  "base ← compare" selector before telling the user to click Merge

LEARNINGS.md:
- New entry documenting symptom, root cause (GitHub's intentional
  fork-default), fix, and the rule

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant