Skip to content

docs(decisions): Add ADR 0082 pinning the publish-stage npm CLI version - #99

Merged
yunseo-kim merged 3 commits into
mainfrom
docs/adr-0082-npm-version-pinning
Aug 16, 2026
Merged

docs(decisions): Add ADR 0082 pinning the publish-stage npm CLI version#99
yunseo-kim merged 3 commits into
mainfrom
docs/adr-0082-npm-version-pinning

Conversation

@yunseo-kim

@yunseo-kim yunseo-kim commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds ADR 0082, deciding that the publish-stage npm CLI is provisioned as an explicitly pinned, integrity-verified distribution selected from a reviewed allowlist, replacing the current floating node-24-bundled npm on the publish job only. Build-stage npm selection is unchanged and remains governed by ADR 0016/0017/0027.

  • What changed?
    • New ADR 0082: pin the publish-stage npm CLI version with integrity-verified provisioning (version + distribution SHA-256 in the publish job), a reviewed allowlist recorded in the specification, and a bump procedure requiring an npm-internals diff-review checklist (oidc.js flow, buildMetadata() branch structure, @npmcli/config exclusive enforcement, publishConfig flatten timing, sigstore-js major) plus per-version compatibility fixtures.
    • Publish-side contract change (implementation lands with the npm trusted publishing auto-enables provenance and discards the --provenance-file bundle (dogfood 4 read-back failure) #97 fix): the publish job's npm validates against the allowlist pin, replacing the current exact-equality check against the build-time runtime.npm_version record, since build npm (toolchain, floating) and publish npm (pinned) diverge by design. Build continues recording its actual npm in runtime.npm_version.
    • Relations updates (frontmatter only; accepted ADR bodies untouched): partially-supersedes ADR-0027 scoped to the publish-stage npm provisioning clause (reverse edge added), see-also ADR 0016/0017/0029/0081 (reverse edges added).
    • Index rows for 0082 in docs/decisions/README.md and README.ko.md.
  • Why is this needed?
  • Scope note (from review): an earlier draft pinned npm across all jobs; per reviewer decision the pin is publish-only, and a manifest-selected build npm option was considered and excluded from this ADR (build-stage selection may be revisited by a separate future decision).
  • How to test: documentation-only; adr-relations-check passes (83 ADRs, 184 edges, NO PROBLEMS); prettier and markdownlint clean.

Related Issues

Change Type

  • Documentation

Changelog

Changelog update:

  • Not needed because this change is not user-facing

Checklist

General

  • PR title follows Conventional Commits format: type(scope): Summary
  • This PR does not expose backend/internal implementation details in a public repo.
  • No secrets, tokens, keys, or private endpoints are included.
  • Changes stay within this repository's intended scope.

Protocol / Compatibility Impact

  • No protocol/spec impact in this PR; ADR 0082's consequences (spec allowlist, publish-side pin validation, provisioning) land in the follow-up implementation PR.

Testing

  • Lint and format pass
  • Manual verification performed

Describe test evidence: adr-relations-check reports 83 ADRs / 184 edges / NO PROBLEMS; prettier and markdownlint clean on docs/decisions/; verified via git diff that existing ADRs changed only in frontmatter relations (bodies immutable per convention).

Documentation

  • Spec/docs updated (this PR is the ADR; index READMEs updated in both languages)
  • Changelog decision completed above

Rollout / Risk

  • Risk level: Low (documentation only)
  • Rollback plan: revert this branch.

Reviewer Checklist

  • Scope is clear and minimal
  • Security and boundary checks passed
  • Tests and docs are sufficient
  • Compatibility impact is correctly handled

@yunseo-kim yunseo-kim changed the title docs(decisions): Add ADR 0082 pinning the builder-owned npm CLI version docs(decisions): Add ADR 0082 pinning the publish-stage npm CLI version Aug 16, 2026
ADR 0082 decides that the floating, node-24-bundled npm provisioning is
replaced by an explicitly pinned, integrity-verified npm distribution
selected from a reviewed allowlist, with a bump procedure requiring an
npm-internals diff-review checklist and per-version compatibility
fixtures.

Motivation: the issue #97 remediation mechanism depends on npm internals
(oidc.js flow, config exclusive semantics, publishConfig flatten timing,
sigstore-js major) that already vary across the currently allowed range
(11.5.1/11.17.0/12.0.2), and the fourth dogfood showed fail-closed
read-back protects acceptance but not registry state (0.1.2 is
permanently burned). The decision completes the builder-owned npm
principle (ADR 0016/0017) and the recorded pinned-setup intent of
ADR 0027, and makes the specification's per-version fixture obligation
satisfiable.

Relations: partially-supersedes ADR 0027's npm provisioning clause
(reverse edge added); see-also ADR 0016/0017/0029/0081 (reverse edges
added). Accepted ADR bodies are untouched; only frontmatter relations
were updated. adr-relations-check: 83 ADRs, 184 edges, NO PROBLEMS.

Signed-off-by: Yunseo Kim <git@yunseo.kim>
Rescope the decision per review: the npm pin applies to the publish job
only; build-stage npm selection stays with the Node.js 24 toolchain npm
and remains governed by ADR 0016/0017/0027 unchanged. The publish-side
contract changes from exact equality with the build-time
runtime.npm_version record to validation against the reviewed allowlist
pin, since build and publish npm versions now diverge by design. The
ADR 0027 partial-supersession scope narrows to the publish-stage npm
provisioning clause. Retitle the ADR and filename accordingly and update
both index READMEs.

Signed-off-by: Yunseo Kim <git@yunseo.kim>
Signed-off-by: Yunseo Kim <git@yunseo.kim>
@yunseo-kim
yunseo-kim force-pushed the docs/adr-0082-npm-version-pinning branch from d63f058 to 6c1b1ef Compare August 16, 2026 14:47
@yunseo-kim
yunseo-kim merged commit b98dfaf into main Aug 16, 2026
50 checks passed
@yunseo-kim
yunseo-kim deleted the docs/adr-0082-npm-version-pinning branch August 16, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant