docs: add fail-closed PR target safeguard#261
Merged
Conversation
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>
There was a problem hiding this comment.
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-workflowskill, including pre-flight checks, explicitgh pr createflags, 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
| **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 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 |
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 PRs are never accidentally opened against the fork parent
flashinfer-ai/flashinfer. BecauseROCm/flashinferis a GitHub fork,gh pr createdefaults 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: mandatorygh repo set-default --viewpre-flight (must printROCm/flashinferor abort), explicit--repo ROCm/flashinfer --base amd-integrationon everygh pr create, abort if the resolved owner isflashinfer-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)