Skip to content

docs: add fail-closed PR target safeguard#261

Merged
demandal25 merged 2 commits into
amd-integrationfrom
add-pr-target-safeguard
Jun 19, 2026
Merged

docs: add fail-closed PR target safeguard#261
demandal25 merged 2 commits into
amd-integrationfrom
add-pr-target-safeguard

Conversation

@demandal25

Copy link
Copy Markdown
Collaborator

Summary

Adds a fail-closed safeguard so PRs are never accidentally opened against the fork parent flashinfer-ai/flashinfer. Because ROCm/flashinfer is a GitHub fork, gh pr create defaults the base to the parent repo unless overridden — this codifies an explicit, abort-on-mismatch workflow.

What changed

  • .claude/skills/pr-workflow/SKILL.md — adds a CRITICAL fail-closed section: mandatory gh repo set-default --view pre-flight (must print ROCm/flashinfer or abort), explicit --repo ROCm/flashinfer --base amd-integration on every gh pr create, abort if the resolved owner is flashinfer-ai, and a one-time fresh-clone setup checklist.
  • CLAUDE.md — adds an always-on backstop with the same rule, in case the skill does not load.

Test plan

  • pre-commit run -a (ran via commit hooks; markdownlint and file checks passed)

Guard against accidental PRs against the fork parent flashinfer-ai/flashinfer.
Adds a mandatory gh repo set-default pre-flight and explicit --repo/--base
requirements to the pr-workflow skill, plus an always-on backstop in 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:20

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 “fail-closed” documentation safeguards to prevent creating PRs against the upstream fork parent (flashinfer-ai/flashinfer) by codifying explicit gh targeting and pre-flight verification steps.

Changes:

  • Add a CRITICAL PR-targeting backstop to CLAUDE.md (repo/base branch, mandatory pre-flight verification, abort-on-mismatch).
  • Add a detailed fail-closed PR target safeguard section to the pr-workflow skill, including pre-flight checks, explicit gh pr create flags, and fresh-clone setup steps.

Reviewed changes

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

File Description
CLAUDE.md Adds an always-on rule to ensure PRs target ROCm/flashinfer with base amd-integration, including a pre-flight repo default check.
.claude/skills/pr-workflow/SKILL.md Documents a fail-closed gh workflow to prevent accidental PRs to the fork parent, plus one-time setup guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.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:23
@demandal25 demandal25 merged commit 7b7fc0a into amd-integration Jun 19, 2026
2 checks passed
@demandal25 demandal25 deleted the add-pr-target-safeguard branch June 19, 2026 16:25

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 3 comments.

**Before ANY `gh pr create`, run this pre-flight check and ABORT if it fails:**

```bash
gh repo set-default --view # MUST print exactly: ROCm/flashinfer
Comment on lines +36 to +37
If the resolved owner of `--repo` is ever `flashinfer-ai`, abort. It is always
better to fail to raise a PR and explain why than to raise one against upstream.
Comment thread CLAUDE.md
Comment on lines +12 to +13
`--repo ROCm/flashinfer --base amd-integration` explicitly, and run `gh repo set-default --view` first —
it MUST print `ROCm/flashinfer` or you abort. If the target owner cannot be
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