Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Release Engineering

Overview

Releases are automated via scripts/release-manager.sh with GitHub Actions for publishing. The system uses:

  • Structured logging with JSON output for CI debugging
  • Exit-code validation (no fragile grep patterns)
  • Rollback automation for failed releases
  • Version sync across Cargo.toml and wasm/package.json

Release Manager

# Validate all gates (tests, clippy, fmt, LOC, dry-run)
scripts/release-manager.sh validate

# Prepare release (version bump, changelog, sync)
scripts/release-manager.sh prepare 0.2.0

# Publish (creates git tag, pushes - triggers GitHub release via CI)
scripts/release-manager.sh publish 0.2.0

# Full pipeline (validate + prepare + publish)
scripts/release-manager.sh full 0.2.0

# CI mode (non-interactive)
scripts/release-manager.sh full 0.2.0 --yes --log release.log

# Dry run (simulate without side effects)
scripts/release-manager.sh full 0.2.0 --dry-run

Validation Gates

The validate command checks:

GateMethod
Clean workspacegit diff --quiet
Correct branchMust be main
Compilationcargo check --all-targets --all-features
Formattingcargo fmt --check
Lintingcargo clippy -- -D warnings
Testscargo test --all-features
Documentationcargo doc --no-deps
Publish dry-runcargo publish --dry-run
LOC limitsAll src/*.rs ≤ 500 lines
WASM targetcargo check --target wasm32-unknown-unknown
Security auditcargo audit (if installed)

Documentation Sync

The prepare command automatically updates version references across all documentation:

FileUpdates
Cargo.tomlversion = "X.Y.Z"
wasm/package.json"version": "X.Y.Z"
Cargo.lockRegenerated via cargo check
README.mdStatus table + install examples
SECURITY.mdSupported versions table
book/src/getting-started.mdInstall examples
wasm/README.mdnpm install examples
llms.txt, llms-full.txtRegenerated via scripts/gen-llms-txt.sh
CHANGELOG.md[Unreleased] → [X.Y.Z]
AGENTS.mdVersion references (if present)

CI Workflows

Release (release.yml)

Triggered by git tag push (v*):

  1. validate — Extract version from git tag, match Cargo.toml, dry-run publish
  2. build-artifacts — Build release binary + WASM, create tarballs
  3. publish-cratescargo publish to crates.io
  4. create-github-release — Upload artifacts, extract changelog notes
  5. notify — Report success or failure with per-job status table
  6. update-rolling-tags — Update major/minor tags (v1, v1.2)

npm Publish (npm-publish.yml)

Triggered by tag push (v*):

  • Builds WASM package via wasm-pack
  • Publishes @d-o-hub/chaotic_semantic_memory to npm
  • Includes npm provenance (--provenance)

GitHub Pages (pages.yml)

Triggered by push to main (book/ changes):

  • Builds mdBook documentation
  • Generates API docs via cargo doc
  • Deploys to GitHub Pages

Commit Conventions

TypeVersion BumpExample
featMinorfeat(cli): add export command
fixPatchfix(reservoir): correct spectral radius
perfPatchperf(hyperdim): optimize bundle
feat!:Majorfeat!: redesign API
docs, chore, test, ciNo release

Rollback

If a release has issues:

# Automated rollback (deletes tag + GitHub release)
scripts/release-manager.sh rollback 0.2.0

# If already published to crates.io, yank manually:
cargo yank --version 0.2.0 chaotic_semantic_memory

Security

  • No long-lived API tokens — Uses CARGO_REGISTRY_TOKEN secret scoped to environment
  • Concurrency control — Release workflow uses cancel-in-progress: false
  • Minimal permissions — Only contents: write + id-token: write
  • Branch protectionmain branch requires PR with passing CI
  • Provenance — npm packages include build provenance attestation
  • Auditcargo audit runs as part of validation (when installed)

Architecture Decision Records

  • ADR-0039 — Release engineering strategy
  • ADR-0042 — Release automation and v0.1.0 readiness