Skip to content

release: harden and prepare 0.3.1 publication - #29

Merged
chtnnh merged 1 commit into
mainfrom
release/0.3.1-prep
Aug 27, 2026
Merged

release: harden and prepare 0.3.1 publication#29
chtnnh merged 1 commit into
mainfrom
release/0.3.1-prep

Conversation

@chtnnh

@chtnnh chtnnh commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Prepare the 0.3.1 release across the CLI, GitHub Action, package metadata, changelog, and generated versioned documentation.

  • Align every current 0.3.1 pin: root and workspace package manifests/lockfile, Action defaults and examples, CLI-generated workflow references, and documentation.
  • Add the 0.3.1 frozen documentation snapshot and sidebar, then register it in the version manifest.
  • Harden the release workflow: require an exact tag/package-version match, require and re-check main ancestry before publication, safely distinguish an existing matching npm publish from a conflicting one, and verify npm gitHead, SLSA provenance, and signatures.
  • Harden documentation deployment: validate the published package provenance before release docs are deployed, serialize Pages deployments, and verify the release/version manifest and current main immediately before deployment.
  • Prevent release-history drift with an immutable versioned-docs provenance check. It rejects removed, reordered, rewritten, or side-branch/failed-release snapshots while preserving the pre-versioned legacy baseline.
  • Add release-contract fixtures for mismatched tags, transactional and idempotent pin updates, invalid versions, deleted or rewritten snapshots, and unrelated tags.

Validation

  • npm run lint -- --max-diagnostics=100
  • npm run build
  • npm test — 219/219 passing
  • npm run smoke
  • npm run smoke:verify
  • npm run build:docs
  • npm pack -w @chtnnh/know-code --dry-run --json
  • git diff --check
  • Two independent GPT-5.6 Sol xhigh correctness reviews — clean

Release prerequisite

Before pushing v0.3.1, protect v* tags in the repository rulesets against updates and deletion. The workflow checks fetched refs defensively, but server-side tag protection is needed to close the final remote tag-mutation race.

Bump all release pins, generated versioned docs, and package metadata to
0.3.1.

Harden release and documentation deployment checks with tag/version/main
ancestry validation, npm gitHead and provenance verification, serialized
Pages deployment, and immutable versioned-docs history enforcement.

Add release-contract coverage for pin updates, failed or unrelated tags,
deleted or rewritten frozen docs, and release-tag mismatches.

Know-Code-Verified: b47a9c761e1195d7c79d8fb580997e5a6bcb53665574b5f64884354e07808840
@chtnnh chtnnh self-assigned this Aug 27, 2026
@chtnnh
chtnnh marked this pull request as ready for review August 27, 2026 14:52
@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes critical release and GitHub Pages pipelines and npm publish behavior; mistakes could block releases or deploy wrong docs, though checks are largely fail-closed with new regression tests.

Overview
Prepares 0.3.1 by aligning version pins (monorepo, CLI, GitHub Action defaults, init --workflow references, CI docs) and adding a frozen version-0.3.1 Docusaurus snapshot plus website/versions.json entry. Docs policy text now says every npm release gets a versioned cut and Pages deploys on every main push (not only website/** changes).

Release and Pages CI gain a coordinated safety layer: new check-release-tag.mjs and check-release-docs-provenance.mjs enforce tag/package parity, main ancestry, immutable version manifests, and byte-stable frozen docs (blocking dropped, reordered, or rewritten snapshots). release.yml runs those checks twice around publish, verifies the remote tag has not moved, publishes with --provenance (SLSA + signature audit, idempotent skip when gitHead already matches), upserts GitHub Releases, and adds a deploy-docs job. docs.yml only deploys after the latest declared version exists on npm with matching gitHead and provenance; Pages uses queued concurrency and confirms main has not advanced before deploy.

Tooling/tests: bump-release-pins.mjs is transactional and covers more pin sites; release-contract.test.ts locks workflow shape and provenance edge cases; CLI tests assert version from package.json instead of hard-coded semver.

Reviewed by Cursor Bugbot for commit 15e0f44. Bugbot is set up for automated code reviews on this repo. Configure here.

@chtnnh
chtnnh merged commit 37d82df into main Aug 27, 2026
3 checks passed
@chtnnh
chtnnh deleted the release/0.3.1-prep branch August 27, 2026 15:16
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