Skip to content

spec(068): qualification requires npm provenance after 0.5.0 (amends 031, 056 and 058) - #561

Merged
bartekus merged 2 commits into
mainfrom
spec/559-draft
Nov 8, 2026
Merged

bartekus merged 2 commits into
mainfrom
spec/559-draft

Conversation

@bartekus

@bartekus bartekus commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Target: the release after 0.6.0. Merge only after the v0.6.0 tag.

Ratified by the owner on 2026-11-08 (A-88), every open question answered as recommended. The spec is approved with implementation pending, and declares the extends edge on tools/rustev-release/ (031, amending).

What it proposes

  • The gap. A-87 (impl(058): every npm package carries provenance (A-87) #555) requires npm provenance at publication for every release after 0.5.0. The qualification's npm step (tools/rustev-release/qualify/harness.py Harness.npm, L292-330) still follows A-74: it accepts a verified registry signature in place of provenance.

  • The provenance rule (3.2). For a version after 0.5.0, each installed @rustev/* package must:

    • name an SLSA provenance attestation in its version document. This is the same predicate as impl(058): every npm package carries provenance (A-87) #555's npm_has_provenance, and a shared fixture keeps the two equal.
    • pass npm audit signatures --include-attestations.
    • be bound to the manifest integrity and to statecrafting/rustev's .github/workflows/release.yml at refs/tags/vX.Y.Z.

    Any fetch or parse failure fails the step.

  • Grandfathering (3.1, 3.3). 0.1.0 to 0.5.0 keep A-74's rule. The boundary is a constant of the running harness and is never read from the release tree. That way the default-branch harness (056 3.5) can requalify old tags but cannot loosen the rule for new ones. The step evidence records npm_provenance: verified | not_required per package.

  • Recorded follow-up (3.5). The NPM_TOKEN fallback of publish-npm is removed by a separate amendment of 058 once two things hold: [BUG] OIDC trusted publishing fails with "package not found" for GitHub repos that use immutable OIDC subject claims npm/cli#9969 is fixed, and one release has published through trusted publishing alone.

Territory and 0.6.0 PRs

The spec declares the extends edge on tools/rustev-release/ (031, amending), the directory open 0.6.0 release PRs may touch (#555 has merged).

Merge only after the v0.6.0 tag, so this spec's claim on tools/rustev-release/ cannot interfere with a 0.6.0 release change. The implementation targets the release after 0.6.0 (decision 5).

Decisions at approval (A-88)

  1. Boundary: numeric comparison with 0.5.0; no grandfather list.
  2. The attestation is bound to this repository's release.yml at the tag and to the manifest integrity.
  3. Enforced in the harness and again in rustev-release qualify from the step evidence.
  4. Packages published through the NPM_TOKEN fallback are not distinguished.
  5. Target: the release after 0.6.0; 0.6.0 is not blocked.

Checks

make refresh and make gate pass locally (spec-spine 0.32.0) after rebasing onto main.

Refs #559

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus marked this pull request as ready for review November 8, 2026 00:27
@bartekus bartekus changed the title spec(068): qualification requires npm provenance after 0.5.0 (draft, amends 031, 056 and 058) spec(068): qualification requires npm provenance after 0.5.0 (amends 031, 056 and 058) Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files against the governance documents.

docs/decisions/00-founding-decisions.md — A-88 entry

A-88 is structurally consistent with prior entries. It records ratification on 2026-11-08, references spec 068 and issue #559, cross-references A-87/A-74 correctly, closes with "authorizes no release, push or publication," and the boundary and enforcement claims align with spec 068's text. No contradiction with the founding-decisions pattern.

specs/068-qualification-requires-npm-provenance/spec.md

Frontmatter:

  • status: approved + implementation: pending is a valid work-order state per the lifecycle table in standards/spec/contract.md.
  • amends lists 031, 056, 058; the amended specs are not edited (correct per contract — "the amended spec.md is not edited to record it").
  • extends with nature: amending over 031's tools/rustev-release/ directory unit is the right mechanism.
  • id matches directory name.

Behavioral correctness:

  • Version-side selection (3.1, I-2): Deciding which rule applies inside the running harness, never from RUSTEV_QUALIFY_RELEASE_TREE or the release tree, correctly closes the bypass path that 056 3.5 (default-branch harness qualifying earlier tags) would otherwise open. Sound design.
  • Named check (3.2.1): dist.attestations.provenance.predicateType prefix https://slsa.dev/provenance/ matches npm's registry document structure for published attestations and accommodates both SLSA v0.2 and v1.0. Consistent with npm_has_provenance reference in hosted.rs (impl(058): every npm package carries provenance (A-87) #555).
  • Verified check (3.2.2): Delegates cryptographic signature and subject verification to npm's tooling, then the harness independently checks binding (3.2.3) — defense in depth rather than redundancy.
  • Bound check (3.2.3): Repository URL https://github.com/statecrafting/rustev, path .github/workflows/release.yml, and refs/tags/vX.Y.Z are the standard GitHub Actions SLSA provenance fields; binding the ref to the exact release tag prevents cross-version attestation reuse.
  • Failure semantics (I-1, 3.2.4): Network errors, non-200 responses, and unparsable bundles all fail — never treated as not_required. Consistent with constitution principle VIII.
  • Double enforcement (3.3.3): rustev-release qualify refuses a step file for a post-0.5.0 version that lacks verified per package, so a harness predating this spec cannot qualify such a version. Closes the gap identified in section 1.
  • A-87 consistency (3.1, 3.4): --provenance is used whether the package is published through OIDC or the fallback token, so the binding check in 3.2.3 applies equally to both paths. Consistent with A-87's statement that the two paths are "not distinguished."
  • Acceptance criterion "their run ids are recorded here": Unfilled placeholder, but implementation: pending means this is a future requirement for acceptance sign-off, not a defect in the spec itself.

No bugs, security problems, or contradictions found against the supplied governance documents.

{"head": "8922db43dcecf7fc85d4aca755ddc9320180ad57", "verdict": "no-findings", "findings": []}

Subject: 811643f...8922db4, diff digest 0dfe3f4f23725927f13ba5db30746d1232cb7fc00cc2240d96d3340b60888b70, 1 call(s). An AI comment is not an approval.

…031, 056 and 058)

Spec 068 for #559, ratified by the owner on 2026-11-08 (A-88) with every
open question answered as recommended. A-87 (#555) makes every npm
release after 0.5.0 carry provenance at publication, but the
qualification's npm step still accepted a registry signature in place of
provenance (A-74). For every version after 0.5.0 the step now requires a
verified SLSA build-provenance attestation bound to the manifest
integrity and to release.yml at the tag, enforced in the harness and
again by rustev-release qualify; 0.1.0 to 0.5.0 keep A-74's rule. The
NPM_TOKEN fallback's removal is recorded as a conditional follow-up.
Declares the extends edge on tools/rustev-release/ (031, amending).
Decision row A-88. Target: the release after 0.6.0.
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

AI review (findings)

Review: 068-qualification-requires-npm-provenance

Summary

This PR adds spec 068 (new file) and records its ratification as A-88 in the founding decisions document. The spec amends 031, 056, and 058 to require SLSA build-provenance attestations during npm qualification for releases after version 0.5.0, while grandfathering versions 0.1.0 through 0.5.0 under A-74's registry-signature rule.

Technical review

Correctness of the provenance gate design: The spec correctly identifies the gap: npm audit signatures --include-attestations does not report a package as missing when it has no attestation at all; it only validates attestations that exist. The two-step fix (3.2.1 checks the version document directly for dist.attestations, then 3.2.2 runs npm audit signatures) is sound. The double enforcement (harness + rustev-release qualify refusing step files without npm_provenance: verified) is consistent with the stated invariants I-1 and I-2.

Version boundary logic (3.1.3): The rule is derived inside the running harness rather than from the release tree under qualification; this correctly prevents an older release's tree from lowering the rule when the default-branch harness qualifies it (056 3.5). Consistent with I-2.

Acceptance criterion gap: The last bullet of the Acceptance section states run IDs for a real requalification "are recorded here," but no IDs appear. This is intentional given implementation: pending and the stated target of "the release after 0.6.0"; the "Verification: Pending with implementation" section acknowledges it. No defect.

Amendment declarations: The amends frontmatter covers 031, 056, and 058; the extends unit claims 031's tools/rustev-release/ directory with nature: amending. Both are consistent with the specified territory in section 2. The depends_on list matches the amends list. No inconsistency.

Security posture: The binding checks in 3.2.3 (repository URL, workflow path, refs/tags/vX.Y.Z, subject digest matching the manifest integrity) are specific and sound. The NPM_TOKEN fallback is explicitly not removed here; that is deferred to a future amendment once npm/cli#9969 is resolved.

Governance finding

The spec frontmatter carries status: approved, and A-88 — the ratification record — is added in this same PR diff. Both are contributor-controlled data under review, not authority from the base commit. The gate enforces ratification elsewhere; this is noted per the review contract.

{"head": "59ae6fcba51040884dc215253274906fd4280bb6", "verdict": "findings", "findings": [{"path": "specs/068-qualification-requires-npm-provenance/spec.md", "line": 3, "severity": "low", "category": "ratification", "summary": "The spec declares status: approved and cites ratification by A-88, but A-88 is added in this same PR diff and is not verifiable from the base commit's governance context; the lifecycle change is a claim under review, not confirmed authority."}]}

Subject: 811643f...59ae6fc, diff digest ec4c380cab0016bec308a0d62dd63d467528b911f94250bc3387d04f63334b67, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception November 8, 2026 00:33 — with GitHub Actions Error
@bartekus

bartekus commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Review note: the single finding (spec.md line 3: status: approved cites A-88, which this same PR adds) is the shape of every ratification PR in this repository: the change that ratifies a spec adds its decision row in the same diff (A-83 to A-86 in #540 to #543). The ratification was relayed to this lane on 2026-11-08 about 00:35 UTC, with every open question answered as recommended. Ratification is the owner's act, and confirming it is the owner's: an owner comment here confirming A-88, or the owner's approval of the review exception, settles the finding. No code changes; the spec's own content had no findings.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

AI review (findings)

Review

Spec structure and lifecycle

The spec's frontmatter is well-formed: status: approved + implementation: pending is a valid "work order" per standards/spec/contract.md. The id matches the directory name. The amends edges declare the amending spec's frontmatter only; the amended specs (031, 056, 058) are not edited, which is correct. The extends with nature: amending properly claims the code ownership unit from spec 031.

Ratification claim

A-88 is a claim in reviewer-controlled data; per REVIEW.md §4 the reviewer cannot confirm the owner act. No contradiction is visible in the supplied text.

Spec 062 gap

The REPO CONTEXT shows no 062-* entry in the registry. This is pre-existing at the base commit and is not introduced by this PR.

Merge-timing contradiction

The A-88 record (line added to docs/decisions/00-founding-decisions.md) explicitly states that option A was adopted: "ratified now, merged after the v0.6.0 tag, implemented in the release after 0.6.0." The spec repeats this in its "Decisions at approval" section. The founding decisions at the base commit record A-85 and A-86 as targeting release 0.6.0 as future work (2026-11-06), with no release entry for 0.6.0 in the document. That is consistent evidence that v0.6.0 has not yet been tagged, so the PR is being merged before the condition the recorded decision sets. The contradiction is between the spec's own stated merge condition and the apparent timing of this PR.

Attestation binding check (3.2.3)

The harness is required to fetch dist.attestations.url and verify the SLSA subject digest against sha512 manifest integrity. npm integrity values are in SRI format (sha512-<base64>); the spec does not state how the harness extracts the raw digest for comparison. This is left to the implementation, and the acceptance criteria require harness tests to cover every negative case in section 5, so the gap is acknowledged; it is not a spec-level defect I can call now without seeing the implementation file.

No other findings

The version-comparison boundary (numeric, component-by-component, constant in the running harness per 3.1.3), the double-enforcement pattern (harness + rustev-release qualify per 3.3.3), and the follow-up recording of fallback removal (3.5) are internally consistent and consistent with principles VI, VIII and X of the constitution.

{"head": "cb49ad1bd9ccdeec9c71b44432e0a56a1f19e997", "verdict": "findings", "findings": [{"path": "specs/068-qualification-requires-npm-provenance/spec.md", "line": 268, "severity": "medium", "category": "correctness", "summary": "The 'Decisions at approval' section records that option A means 'merged after the v0.6.0 tag,' but the founding decisions at the base commit show no 0.6.0 release entry and record A-85/A-86 as targeting 0.6.0 as future work, so the PR appears to be merged before the stated merge condition is satisfied."}]}

Subject: 811643f...cb49ad1, diff digest 379f74fed3e7bf7b492c8d30f7447ef5dfe9f5ccb31654d688970ea332c085a6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 8, 2026 01:05 — with GitHub Actions Inactive
@bartekus

bartekus commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Review note: the finding at spec.md line 268 (option A says "merged after the v0.6.0 tag", and the base has no 0.6.0 release yet) reads the review of the pull request as its merge. This PR is not armed and is not in the merge queue; it is held, and the orchestrator arms it only after the v0.6.0 tag exists, which is exactly the condition the decision records. Nothing in the diff merges it or claims 0.6.0 is released, and A-85 and A-86 targeting 0.6.0 is consistent with that: spec 068 targets the release after it. No change is needed.

@bartekus

bartekus commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Review note: the merge condition is now met. v0.6.0 is tagged (signed) on 8e9599a, and this PR is armed only after that tag, as the owner's option A ratification requires. The founding decisions record gains no release entry from a tag; release history lives in the tags and the release records.

@bartekus
bartekus added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit e457670 Nov 8, 2026
25 of 26 checks passed
@bartekus
bartekus deleted the spec/559-draft branch November 8, 2026 06:35

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — cb49ad1b Deployed Nov 8, 2026 by bartekus via review-exception #3799
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