Skip to content

docs: Add collection branch safety warnings to PR workflow#5176

Merged
adinauer merged 1 commit intomainfrom
docs/pr-collection-branch-warning
Mar 9, 2026
Merged

docs: Add collection branch safety warnings to PR workflow#5176
adinauer merged 1 commit intomainfrom
docs/pr-collection-branch-warning

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 9, 2026

📜 Description

Adds explicit warnings to pr.mdc and create-java-pr skill that the collection branch in a stacked PR workflow must never be manually merged, fast-forwarded, or pushed to.

Changes:

  • .cursor/rules/pr.mdc: Added CRITICAL warning in "Creating the Collection Branch" section; added "Never merge into the collection branch" note in "Syncing the Stack" section; fixed example branch name to use feat/scope-attributes-api instead of feat/scope-attributes (which is the collection branch)
  • .claude/skills/create-java-pr/SKILL.md: Added CRITICAL warning in Step 1's stacked PR guidance

💡 Motivation and Context

During cache tracing PR stack work, the collection branch was accidentally fast-forwarded to include all stack commits. GitHub interpreted this as all stack PRs being merged, auto-closed them, and deleted their head branches. The entire stack had to be recreated with new PR numbers.

This adds guardrails to prevent the same mistake in future sessions.

💚 How did you test it?

Documentation-only change. Reviewed the wording for clarity and completeness.

📝 Checklist

  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.

🔮 Next steps

None.

#skip-changelog

Add explicit warnings to pr.mdc and create-java-pr skill that the
collection branch must never be manually merged or fast-forwarded.
Updating it causes GitHub to auto-merge all stack PRs and delete
their branches, destroying the entire stack.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@adinauer adinauer merged commit 6a6b6c6 into main Mar 9, 2026
64 checks passed
@adinauer adinauer deleted the docs/pr-collection-branch-warning branch March 9, 2026 13:46
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