docs: add fail-closed safeguard against PRs from amd-integration#262
Merged
Conversation
amd-integration is the PR base, never the head. Document a fail-closed flow: if on amd-integration with commits to ship, relocate them to a fresh topic branch, reset amd-integration to origin, then PR from the topic branch. Adds the procedure to the pr-workflow skill and a backstop to CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds documentation safeguards to ensure PRs for ROCm/flashinfer are never accidentally created from (or pushed directly to) the amd-integration base branch, including a fail-closed recovery procedure to relocate local commits onto a topic branch.
Changes:
- Updates
CLAUDE.mdwith an always-on warning to never push/PR fromamd-integration, and a brief recovery instruction. - Extends the
pr-workflowskill doc with a CRITICAL fail-closed section detailing how to move local commits offamd-integrationand restore it toorigin/amd-integration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
CLAUDE.md |
Adds a global backstop warning and high-level recovery guidance for avoiding PRs from amd-integration. |
.claude/skills/pr-workflow/SKILL.md |
Adds a detailed, fail-closed step-by-step procedure to relocate commits and reset amd-integration safely. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
Handle detached HEAD (empty git branch --show-current) as an abort condition, add the missing git fetch before reset in the CLAUDE.md backstop, and align the placeholder name (<topic-branch>) and "create a branch at HEAD" wording between CLAUDE.md and the pr-workflow skill. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 task
demandal25
added a commit
that referenced
this pull request
Jun 19, 2026
## Summary Adds a documented post-create Copilot review workflow to the `pr-workflow` skill, and fixes the one remaining Copilot finding from #262 (an inline-code span split across a newline in `CLAUDE.md`). ### What changed - **`.claude/skills/pr-workflow/SKILL.md`** — new "After creating a PR: handle the Copilot review" section: wait for all Copilot comments to land (and integrate any Copilot auto-push commits), evaluate each comment on its merits, fix the worthwhile ones, then resolve every thread — fixed threads get a commit-SHA reply, won't-fix threads get a written rationale. Includes GraphQL recipes for listing/resolving threads, since the REST `/comments/<id>` endpoint 404s on review-thread comments. - **`CLAUDE.md`** — the fetch+reset guidance previously sat inside a single backtick span broken across a line, which markdown can't render. Split into two separate inline-code spans. ## Test plan - [x] `pre-commit run -a` (ran via commit hooks; markdownlint and file checks passed) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Adds a fail-closed safeguard so a PR is never accidentally raised from the
amd-integrationbranch itself.amd-integrationis the PR base; it must never be the head. If commits land on it locally, they are relocated to a fresh topic branch before the PR is raised.What changed
.claude/skills/pr-workflow/SKILL.md— adds a CRITICAL section: checkgit branch --show-currentbefore pushing/PR'ing; if onamd-integration, move commits to a new topic branch (git branch <topic>), resetamd-integrationtoorigin/amd-integration, then PR from the topic branch. Resets only because commits are already preserved on the topic branch; abort on any ambiguity.CLAUDE.md— adds an always-on backstop with the same rule.Test plan
pre-commit run -a(ran via commit hooks; markdownlint and file checks passed)