Skip to content

fix(evidence): evaluate release proofs against the release line - #90

Merged
AdmilsonCossa merged 1 commit into
mainfrom
release-line-gates
Nov 14, 2026
Merged

AdmilsonCossa merged 1 commit into
mainfrom
release-line-gates

Conversation

@AdmilsonCossa

Copy link
Copy Markdown
Collaborator

Problem

Two release evidence proofs pin the package version to enumerated values:

  • REL-014 (tests/evidence/release/one-zero-contracts.mjs) requires package.json#version === "1.0.0".
  • REL-012 (tests/evidence/release/hardening-contracts.mjs) requires the version to be in {"0.6.1", "1.0.0"}.

Changing only packages/core/package.json to 1.0.1 on a copy of main makes both proofs fail. Any 1.0.x patch release therefore has to edit the proofs it is meant to satisfy.

The previous-release compatibility gate also still compares against 0.6.1, and REL-014 requires that exact string. For the 1.x line the previous public release is 1.0.0.

Change

  • scripts/release-line.mjs (new): three pure predicates over final MAJOR.MINOR.PATCH versions: parseReleaseVersion, isReleaseOnMajorLine, isReleaseAtOrAfter. Prerelease and build-metadata versions are not release versions.
  • REL-014: accepts any final release on the 1.x line. Still requires exactly 16 stable entrypoints and the ## 1.0.0 changelog entry. The compatibility baseline must be a published 1.x release that is not newer than the package.
  • REL-012: accepts any final release from 0.6.1 on, with a baseline between 0.6.0 and the package version.
  • scripts/check-previous-compatibility.mjs: baseline moves from 0.6.1 to 1.0.0, with the frozen v1.0.0-consumer.ts fixture. The fixture body is identical to the 0.6.1 one because the export names and declarations of 1.0.0 are identical to 0.6.1.
  • evidence/claims.json: REL-012 and REL-014 invariant text, and the REL-014 limitation, aligned with the proofs.

No runtime, type, or export change in @workit/core. No version bump.

Ownership boundary

The two proofs remain the owners of their claims; check-previous-compatibility.mjs remains the only owner of the baseline. release-line.mjs adds no policy of its own: it only parses and orders versions, following the existing pattern of pure script modules with unit tests (npm-pack-result.mjs, vulnerability-gate.mjs).

Evidence

Windows, Node 24.19.0, on this branch:

  • tests/unit/release-line.test.js: 20 tests, written first and failing before the module existed.
  • npm run test:coverage: 34 files, 445 tests; statements, branches, functions and lines at 100%.
  • check:compat-previous: {"previousCompatibility":"ok","baseline":"1.0.0","packagePaths":16,"declarations":31}.
  • test:evidence: REL-012 and REL-014 pass, 0 failed proofs; check:evidence-ledger ok with 63 claims.
  • Every other gate of npm run verify passed when run individually (33 gates in total, with check:package-consumer:node in place of check:package-consumer).

Simulated bumps on a scratch copy, editing only packages/core/package.json (and the baseline constant where stated):

Package version Baseline REL-014 REL-012
1.0.0, 1.0.1, 1.4.2 1.0.0 pass pass
2.0.0 1.0.0 fail pass
1.0.1-rc.1, 0.6.1 1.0.0 fail fail
1.0.1 1.0.2 fail fail
1.0.1 0.6.1 fail pass

Limitations

  • The Bun compatibility fixture was not run locally (no Bun executable on the workstation); it relies on the Verify package job.
  • The simulated bumps ran the two proofs in isolation on a copy. They do not prove a full 1.0.1 release: lockfile, changelog, SBOM and tarball checks belong to the bump change.
  • REL-014 still requires exactly 16 entrypoints. A future minor that adds a subpath must revisit that count.
  • The compatibility gate compares export names and generated declarations byte for byte. That is the patch-release contract; an additive minor needs a superset rule, which this change does not define.
  • The gate proves surface compatibility, not behavioral compatibility.

Checklist

  • Tests were added or updated before behavior changed.
  • npm run test:coverage passes with 100% statements, branches, functions, and lines.
  • npm run verify passes, or an environmental limitation is documented. (Bun fixture, see Limitations.)
  • Public API, declarations, package exports, and compatibility fixtures were updated when applicable. (New v1.0.0-consumer.ts baseline fixture; no API change.)
  • Root size and zero-runtime-dependency contracts remain intact.
  • Cancellation, cleanup, retries, deadlines, and budgets still have one owner.
  • New claims identify proof paths, expected invariants, and limitations.
  • Logs, receipts, screenshots, and fixtures contain no secrets or private consumer data.

🤖 Generated with Claude Code

REL-014 required package.json#version to equal "1.0.0" and REL-012
required it to be in an enumerated set, so an isolated bump to 1.0.1
failed both proofs. Each release had to edit the proofs it was meant to
satisfy.

Add scripts/release-line.mjs with pure predicates for final
MAJOR.MINOR.PATCH versions and use them in both proofs:

- REL-014 accepts any final release on the 1.x line, still requires the
  16 stable entrypoints and the 1.0.0 changelog entry, and requires a
  published 1.x compatibility baseline no newer than the package.
- REL-012 accepts any final release from 0.6.1 on, with a baseline
  between 0.6.0 and the package version.

Move the previous-release compatibility baseline from 0.6.1 to 1.0.0 and
add the frozen 1.0.0 consumer fixture. The 1.0.0 export names and
declarations are identical to 0.6.1, so the gate result is unchanged.

Prerelease versions, other major lines, a baseline newer than the
package and a pre-freeze baseline are still rejected.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@AdmilsonCossa
AdmilsonCossa merged commit db05877 into main Nov 14, 2026
8 checks passed
@AdmilsonCossa AdmilsonCossa mentioned this pull request Nov 14, 2026
8 tasks done
AdmilsonCossa added a commit that referenced this pull request Nov 14, 2026
Bump the workspace and package version to 1.0.1 and record the changelog entry. Maintenance release: the runtime, public exports and TypeScript declarations are unchanged from 1.0.0.

1.0.1 publishes the declared agent tool authority documentation and the corrected CORR-006 title (#88), the Node 20.11 consumer fixture pin (#89), and the release-line evaluation of REL-012 and REL-014 with the 1.0.0 compatibility baseline (#90).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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