Skip to content

docs: add fail-closed safeguard against PRs from amd-integration#262

Merged
demandal25 merged 4 commits into
amd-integrationfrom
guard-no-pr-from-amd-integration
Jun 19, 2026
Merged

docs: add fail-closed safeguard against PRs from amd-integration#262
demandal25 merged 4 commits into
amd-integrationfrom
guard-no-pr-from-amd-integration

Conversation

@demandal25

Copy link
Copy Markdown
Collaborator

Summary

Adds a fail-closed safeguard so a PR is never accidentally raised from the amd-integration branch itself. amd-integration is 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: check git branch --show-current before pushing/PR'ing; if on amd-integration, move commits to a new topic branch (git branch <topic>), reset amd-integration to origin/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)

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>
Copilot AI review requested due to automatic review settings June 19, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.md with an always-on warning to never push/PR from amd-integration, and a brief recovery instruction.
  • Extends the pr-workflow skill doc with a CRITICAL fail-closed section detailing how to move local commits off amd-integration and restore it to origin/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.

Comment thread CLAUDE.md
Comment thread .claude/skills/pr-workflow/SKILL.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
Copilot AI review requested due to automatic review settings June 19, 2026 16:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread CLAUDE.md Outdated
Comment thread .claude/skills/pr-workflow/SKILL.md Outdated
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>
Copilot AI review requested due to automatic review settings June 19, 2026 17:04
@demandal25 demandal25 merged commit cb752e0 into amd-integration Jun 19, 2026
2 checks passed
@demandal25 demandal25 deleted the guard-no-pr-from-amd-integration branch June 19, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread CLAUDE.md
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>
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