Skip to content

chore: repoint repository references and fix npm publish permissions - #1041

Merged
rekmarks-consensys-1 merged 9 commits into
mainfrom
rekm/migrate-ci
Sep 3, 2026
Merged

chore: repoint repository references and fix npm publish permissions#1041
rekmarks-consensys-1 merged 9 commits into
mainfrom
rekm/migrate-ci

Conversation

@rekmarks-consensys-1

@rekmarks-consensys-1 rekmarks-consensys-1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The repository, homepage, and bugs metadata, the changelog release links, the code owner team, and various documentation links all named a repository URL and a team that no longer resolve directly. This corrects them, and removes two CI dependencies that cannot be satisfied from here.

It also fixes a latent publishing bug found along the way. For packages that already exist on npm, action-npm-publish@v6 unsets the auth token and publishes via OIDC. Neither publish job declared a permissions block, and id-token: write is never granted by default, so the action would print "OIDC is not available", fall back to yarn pack, and exit 0 having published nothing. The action has been on v6 since #954 without an intervening release, so this path has never actually run.

Granting the token takes two edits, not one. A called workflow's jobs cannot request more than the caller grants, and an enumerated permissions block sets every unlisted scope to none — so main.yml's caller had to widen too, or the request would have been an escalation and failed at run time. actionlint does not check permission subsetting across a workflow_call, so nothing local catches this.

Only the real publish job gets the token. publish-npm-dry-run declares no environment, so it runs ahead of the npm-publish approval gate; an OIDC token there is exchangeable at npm for a publish credential, which would leave that gate conventional rather than enforced. It therefore carries an explicit contents: read block to withhold what the caller now grants. Worth pairing with pinning npm's trusted publisher to the npm-publish environment when that gets configured.

The npm scope @metamask/* is deliberately unchanged, as are the MetaMask/* reusable actions — they are public and key off github.repository — and links to genuinely separate repositories such as MetaMask/core and MetaMask/delegation-framework.

Changes

  • Update repository.url in the root manifest and propagate repository, homepage, and bugs to every workspace via yarn constraints --fix; the private packages, which the constraint does not cover, are updated to match.
  • Regenerate the release-link block in all 28 changelogs. Inline pull request links are left alone: those pull requests are where the links say they are.
  • Delete the security code scanner. Its secrets cannot be resolved here, and analyse-code gated all-jobs-complete, so every pull request would have failed on it. This also removes a duplicate run — the workflow declared its own push/pull_request triggers alongside the workflow_call from main.yml.
  • Point CODEOWNERS at a team that resolves. An unresolvable team matches nobody rather than erroring, so review was silently never requested.
  • Grant id-token: write to the npm publish job and the publish-release caller in main.yml, withhold it from the pre-gate dry run, and drop the Slack notification, whose webhook and subteam are both unreachable from here.
  • Repoint documentation links, and drop two references into a private repository from comments that already describe what they guard against.

Testing

yarn constraints and yarn changelog:validate are the real regression tests for the manifest and changelog rewrites — the latter regenerates every link block from repository and fails on any difference. actionlint covers the workflow edits, and main.yml's own check-workflows job runs it in CI. yarn build and the full unit suite pass; the source edits are comment-only, so those are regression checks rather than targeted ones.

The full suite failed once in packages/kernel-ui/src/App.test.tsx and passed on re-run. That file is untouched by this branch and the test passes in isolation on both main and here, so it looks like a pre-existing flake under parallel load.

🤖 Generated with Claude Code

rekmarks-consensys-1 and others added 8 commits September 3, 2026 14:54
The `repository`, `homepage`, and `bugs` fields named a repository URL that
no longer resolves directly. `yarn.config.cjs` derives the latter two from
the root manifest's `repository.url`, so this is one edit plus
`yarn constraints --fix`; the private packages, which the constraint does
not cover, are updated to match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`auto-changelog validate` derives these links from each manifest's
`repository` field and fails on any mismatch, so they follow the previous
commit. Inline pull request links are left alone: those pull requests are
where the links say they are.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The scanner depends on secrets this repository cannot resolve, and
`analyse-code` gates `all-jobs-complete`, so every pull request would
fail on it. Removing the job also removes a duplicate run: the workflow
declared its own `push`/`pull_request` triggers alongside the
`workflow_call` from `main.yml`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
An unresolvable team matches nobody rather than erroring, so review was
silently never requested.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
For packages that already exist on npm, `action-npm-publish@v6` unsets the
auth token and publishes via OIDC. Without `id-token: write`, which is
never granted by default, it prints "OIDC is not available", runs
`yarn pack`, and exits 0 having published nothing. The action has been on
v6 since #954 without a release, so this path has never run here.

The Slack notification is dropped along with it: the webhook and the
subteam it addressed are both unreachable from this repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README, setup guide, and wiki links named a repository URL that no
longer resolves directly. The two `MetaMask-planning` references pointed
into a private repository; both comments already describe the primitive
they guard against, so the reference bought the reader nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A called workflow's jobs cannot request more than the caller grants, and
an enumerated `permissions` block sets every unlisted scope to `none`.
Without this the publish jobs' `id-token: write` is an escalation and
fails at run time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rekmarks-consensys-1 rekmarks-consensys-1 added the no-changelog Indicates that no changelog updates are required, and that related CI checks should be skipped. label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 73.05%
🟰 ±0%
9790 / 13401
🔵 Statements 72.9%
🟰 ±0%
9954 / 13653
🔵 Functions 73.6%
🟰 ±0%
2301 / 3126
🔵 Branches 67.27%
🟰 ±0%
4023 / 5980
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/kernel-test/src/vats/endowment-fetch.ts 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
16-105
packages/repo-tools/src/test-utils/fetch-input.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #4714 for commit 22b82a0 by the Vitest Coverage Report Action

@sirtimid-ci sirtimid-ci 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.

LGTM!

The dry run has no `environment`, so it runs before the `npm-publish`
approval gate. An OIDC token is exchangeable at npm for a publish
credential, which would make that gate conventional rather than enforced.
An explicit block is required to withhold it: the caller grants
`id-token: write` for the real publish job, and jobs without their own
block inherit it.

Also drop an issue reference whose siblings are gone; a bare number now
reads as an issue in this repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rekmarks-consensys-1
rekmarks-consensys-1 added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 543581a Sep 3, 2026
28 checks passed
@rekmarks-consensys-1
rekmarks-consensys-1 deleted the rekm/migrate-ci branch September 3, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that no changelog updates are required, and that related CI checks should be skipped.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants