fix(release): give npm the repository field, and open a PR for the formula - #163
Merged
Merged
Conversation
…rmula Both first-run publishing jobs failed on the v0.16.0 release. Neither was reachable before a real tag existed. npm: `--provenance` rejected the upload with E422 — "package.json: repository.url is \"\", expected to match https://github.com/arthurpanhku/dvalincode from provenance". The package simply had no `repository` field; provenance verifies it against the build source. Added. (The "No bin file found at dist/index.js" warning in the same log is not related — it is printed before `prepublishOnly` runs the build. Checked the log to confirm the build did run.) homebrew: the push was rejected with GH006, protected branch. main requires the `test` and CodeQL checks and is strict, so a direct push from CI cannot ever succeed. I had claimed in #160 that main had no protection — I read `enforce_admins` and `required_pull_request_reviews`, saw both empty, and did not check `required_status_checks`, which is what is actually set. The job now opens a pull request instead. That PR needs one manual nudge: GitHub does not start workflows for a pull request opened with GITHUB_TOKEN, so its required checks stay pending until someone closes and reopens it. The PR body says so. Removing that step needs a PAT with admin rights, which is a credential this repo does not have and should not gain lightly. Co-Authored-By: Claude Opus 5 <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.
Both first-run publishing jobs failed on v0.16.0
Neither failure was reachable before a real tag existed. The release itself succeeded — binaries, Evidence Pack, provenance attestation and the GitHub Release are all published — but npm and Homebrew did not land, and
mcp-registrywas correctly skipped because it needs npm.npm — E422 on provenance
package.jsonhad norepositoryfield at all.--provenanceverifies it against the build source, so the upload was rejected after the signature had already been written to the transparency log. Added the field.The
No bin file found at dist/index.jswarning in the same log is not related — it is printed beforeprepublishOnlyruns. I checked the log to confirm the build did run (tsc -p tsconfig.json, then the fullcheck), rather than assuming.homebrew — GH006, protected branch
This one is my error. In #160 I wrote that main had no protection and the push would succeed. I had queried the protection API but only read
enforce_adminsandrequired_pull_request_reviews, saw both empty, and concluded "unprotected" — without checkingrequired_status_checks, which is what is actually set:{ "required_status_checks": ["test", "Analyze JavaScript and TypeScript"], "strict": true }A direct push from CI can never succeed against that. The job now commits to
chore/homebrew-<tag>and opens a pull request. The formula generation itself worked on the failed run (✓ Formula/dvalincode.rb → 0.16.0); only the push was rejected.One manual step, stated rather than hidden
GitHub does not start workflows for a pull request opened with
GITHUB_TOKEN, so the formula PR's required checks stay pending until someone closes and reopens it. The generated PR body says exactly that.Removing the step would need a PAT with admin rights (
enforce_adminsis false, so an admin token can bypass). That is a credential this repository does not currently have, and adding one to make a formula bump one click cheaper is a bad trade — so it is documented instead.Testing
bash -n; the PR-bodyprintfwas run standalone to confirm quoting survives the nested apostrophe and backticks.needsintact.npm run checkgreen, 332 tests / 50 files.Security and AI Governance
docs/.docs/governance/AI-CHANGE-IMPACT-ASSESSMENT.md.The homebrew job's permissions change from
contents: writetocontents: write+pull-requests: write; it can no longer write to main, only to its own branch. That is strictly narrower than what it had.Notes
To finish the release: merge this, then move the tag onto the new commit —
Moving it is safe here: 0.16.0 never reached npm, so nothing downstream consumed it. The GitHub Release will be rebuilt and its artifacts replaced.
Until this lands,
npx -y dvalincodestill serves 0.15.0, which has nodvalin_scan— so the awesome-mcp-servers submission stays on hold.