Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The current-main check has a race that can allow publishing an artifact after its commit is no longer current.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds automated npm release verification and trusted publishing with provenance.
Changes:
- Adds Effect-based release validation and unit tests.
- Builds, verifies, packages, and publishes approved releases through GitHub Actions.
- Validates package identity, integrity, source commit, and registry provenance.
| File | Description |
|---|---|
typescript/check-release.ts |
Validates release identity and version progression. |
typescript/check-release.unit.test.ts |
Tests release validation and failure cases. |
.github/workflows/release-npm.yml |
Verifies and publishes npm artifacts using OIDC. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Josh-a-e
marked this pull request as draft
October 2, 2026 12:35
Member
Author
|
Closing this draft because the direct-publication implementation is superseded. The replacement design is being reviewed in the canonical source repository before implementation begins. The revised workflow will stage the verified npm tarball after merge and require npm owner approval with 2FA. No version has been published by this PR. |
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's the point of this PR?
Verify package changes on pull requests, then publish a new stable npm version automatically after its release PR merges. Publishing uses npm trusted publishing with provenance, without a stored npm token.
The package remains at 0.1.0. That version already exists on npm, so this PR does not publish a release when merged.
Review scale
Decisions
Verify by hand
Review the workflow and repository settings. Before the first new version, an npm owner must bind
@vazen-ai/tomlto GitHub ownervazen-ai, repositorytoml, workflowrelease-npm.yml, environmentnpm-release, and require 2FA while disallowing traditional tokens.Machine record
Attestations
All four GitHub actions are pinned to full commits. Dependency caching is disabled. The publish job checks tarball hash, package identity, publishing configuration and current main commit. It publishes with
--ignore-scripts --provenance, then waits for matching registry integrity and provenance metadata.Main requires a PR and the up-to-date
Verify npm packagecheck, with no ruleset bypass or force pushes. The environment accepts the main branch only. Actions default to read, cannot approve PRs, and allow only the four named, pinned GitHub actions. The npm binding still needs owner setup.Tests and type-checks
Public package verification passed: 139 tests, TypeScript, build and package lint. Release guards have 15 tests covering invalid versions, package identity, registry failures, duplicate versions and numeric version ordering. Workflow and shell lint passed. Local execution of release checking and packing correctly skips 0.1.0 and produces a package with the public source commit.
Public GitHub Actions verification passed: https://github.com/vazen-ai/toml/actions/runs/36917157231. Publishing correctly skipped on the PR. A temporary 0.2.0 tarball also passed npm publish dry-run on a clean directory; no version was published.
Escalations
The owner chose automatic publishing after merge, without another environment approval.
Copilot triage
A corresponding source review found that explicit
--tag latestdisables npm's backwards-version protection. The flag is removed; the final command passed another npm dry run.Copilot suggested protected release tags to prevent main advancing between the preflight check and publishing. Noise for the chosen release policy: merging approves the immutable commit, and a later merge does not revoke an in-flight publication. Main releases are serialised and never cancelled. The description now states the preflight check's limit rather than implying it locks the branch. No writable release-tag permission is needed.