Skip the Claude review on fork PRs, and correct three stale CLAUDE.md notes - #263
Merged
wormeyman merged 2 commits intoAug 25, 2026
Merged
Conversation
GitHub withholds repository secrets from a `pull_request` event raised by a fork, so `secrets.CLAUDE_CODE_OAUTH_TOKEN` resolves to an empty string and the action fails every time. Measured across the open backlog: `claude-review` failed on all five fork PRs (#227, #242, #243, #258, and #249 before it merged) and passed on both in-repo ones (#257, #260). That is the whole pattern - it is not a misconfiguration the workflow can fix, it is what the event is for. The failure blocks nothing, which is the problem. Every fork PR opens with a red X, and a check that is always red is a check nobody reads - so a real failure in it would be missed. A job-level `if` turns it grey instead. The alternative is `pull_request_target`, which does get fork PRs reviewed but hands base-repo secrets to a fork's code. Every outside contribution here arrives from a fork, so that trade is not available. The comment at the guard says so, since the next person to notice the skipped runs will reach for it. In-repo branches, Renovate's included, still run. Also corrects a stale note in CLAUDE.md: the `ajv` entry still described `ModdedBlueprintError` and `TrainBlueprintError` as declared-but-never-thrown, and #262 deleted both. The point it was making survives - ajv is ~100 kB and nothing branches on its result - so the entry keeps that and records what went. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018N3pm7fQQDv6HTVz1TEpmE
…pins Three corrections, each measured rather than read off the file. The documented local-install command did not set the version at all. It read `VP_VERSION=0.2.8 VP_NODE_MANAGER=yes curl -fsSL https://vite.plus | bash`, and an assignment ahead of a command applies to that command alone - `curl` got the variables and the `bash` on the far side of the pipe read an empty string. Measured against a stub script, which printed `VP_VERSION=[]`. The installer then falls back to `VP_VERSION="${VP_VERSION:-latest}"`, read off the script itself, so anyone following that line installed `latest` rather than the pin. That is the "green, and wrong" split the same file warns about one section down, with a local toolchain silently different from the lockfile's and CI's. The command now downloads the script and runs it with the variables ahead of `bash`, matching setup-vp/action.yml, and sets VP_HOME for the layout reason #260 established. Syntax-checked with `fish -n`, since it is a fish block. The pin is 0.2.9 everywhere in the repo - root, editor and website package.json, the root overrides alias, and VP_VERSION in setup-vp/action.yml - while the file still said 0.2.8 in three places. It also claimed 0.2.8 was `latest` as of 2026-08-11; `npm view vite-plus dist-tags` gives 0.3.0 today. That entry has now gone stale twice, which is its own best argument, so it says so and points at the command to re-measure with. And the installer-checksum note said the hash did not move across 0.2.6 -> 0.2.8, so a bump usually leaves it alone. True when written, and it is the reassurance that made 2026-08-24 expensive: the script rotated with VP_VERSION untouched and every job on every branch failed at `Set up Vite+`. The note now records that a hash can move with no bump at all. Re-fetched today and the current sha256 still matches the pin, so nothing in CI needs changing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018N3pm7fQQDv6HTVz1TEpmE
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.
What
Two independent housekeeping changes, both docs-or-CI only. No source files change, so the editor's behaviour is untouched.
ifin.github/workflows/claude-code-review.ymlso the Claude review skips on pull requests from forks.CLAUDE.md, each re-measured rather than edited by inspection.1. Skip the Claude review on fork PRs
GitHub withholds repository secrets from a
pull_requestevent raised by a fork, sosecrets.CLAUDE_CODE_OAUTH_TOKENresolves to an empty string and the action fails every time.Measured over every run of this workflow rather than assumed. Tallying all 30
runs recorded before the fix, by whether the head was a fork:
claude-reviewThat is the whole pattern - no exceptions in either direction. It is not a
misconfiguration the workflow can fix - it is what the event is for.
Why it is worth fixing. The failure blocks nothing, which is exactly the problem. Every fork PR opens with a red X, and a check that is always red is a check nobody reads, so a real failure in it gets missed.
Why not
pull_request_target. That would get fork PRs actually reviewed, but it runs with base-repo secrets against a fork's code - the documented path to secret exfiltration from an untrusted contributor. Every outside contribution to this repo arrives from a fork, so the trade is not available. There is a comment at the guard saying so, because the next person to notice the skipped runs will reach for it.The commented-out author filter it replaces was a footgun. Uncommenting it would have added a second
if:to the same mapping, and with duplicate keys the last one wins - verified, a two-ifjob resolves to the second. It would have silently overridden this guard.Control:
claude-reviewstill ran and passed on this branch, which is in-repo. The guard does not break the in-repo path.2. CLAUDE.md corrections
The documented install command never set the version
It read:
An assignment ahead of a command applies to that command alone, so
curlgot the variables and thebashon the far side of the pipe read an empty string. Measured against a stub script:The installer then falls back to
VP_VERSION="${VP_VERSION:-latest}"(line 26 of the script, withdefault: latestin its own header). So anyone following that line installedlatest, not the pin - the same "green, and wrong" split the file warns about one section down, where the localvpis a different toolchain from the lockfile's and CI's and nothing says so.The replacement downloads the script and runs it with the variables ahead of
bash, matchingsetup-vp/action.yml, and setsVP_HOMEfor the layout reason #260 established. Syntax-checked withfish -n, since it is afishblock.The pin is 0.2.9, and the file said 0.2.8
Measured at all five sites:
package.json:300.2.9package.json:40(overrides alias)@voidzero-dev/vite-plus-core@0.2.9packages/editor/package.json:330.2.9packages/website/package.json:220.2.9setup-vp/action.yml:64VP_VERSION=0.2.9The file also said 0.2.8 was
latestas of 2026-08-11.npm view vite-plus dist-tagsgives 0.3.0 today. The entry has now gone stale twice - it said 0.2.6 while 0.2.8 shipped, then 0.2.8 while the repo moved to 0.2.9 - which is its own best argument, so it now says so and points at the command to re-measure with. No version bump here; Renovate tracks vite-plus on a 24-hour cooldown and 0.3.0 is a day old.The checksum note reassured you about the thing that took CI down
It said the hash did not move across 0.2.6 -> 0.2.8, so a bump usually leaves it alone. True when written, and that is what made 2026-08-24 expensive: the script rotated with
VP_VERSIONuntouched and every job on every branch failed atSet up Vite+. The note now records that the rule runs both ways - a hash can move with no bump at all.Re-fetched today: the current installer sha256 is
3dd88ced…, which still matches the pin. Nothing in CI needs changing.The ajv entry named two deleted classes
It described
ModdedBlueprintErrorandTrainBlueprintErroras declared, exported, handled and never thrown. #262 deleted both. The point it was making survives - ajv is ~100 kB and nothing branches on its result - so it keeps that and records what went, since the names are still findable in the history.Verification
vp check- 230 files formatted, 0 warnings, lint errors or type errorsvp test- 187/187 across 15 filesifis a real key on the job, and the only oneclaude-reviewas the in-repo control🤖 Generated with Claude Code
https://claude.ai/code/session_018N3pm7fQQDv6HTVz1TEpmE