<>ts-stack
Get StartedArchitecturePackagesSpecsGuides
⌘K
Reference
Home
Get StartedOverviewInstallChoose your stackKey concepts
ArchitectureOverviewStack layersBEEF (BRC-62)BRC-100 Wallet InterfaceIdentity & AuthConformance pipeline
PackagesOverviewSDKWalletNetworkOverlaysMessagingMiddlewareHelpers
InfrastructureOverviewmessage-box-serveroverlay-serveruhrp-server-basicuhrp-server-cloud-bucketwabwallet-infrachaintracks-serverwebrtpay-relay
SpecsOverviewBRC-100 Wallet InterfaceOverlay HTTPMessage-box HTTPAuthsocket (WebSocket)BRC-31 Auth HandshakeBRC-29 Peer PaymentBRC-121 / HTTP 402ARC BroadcastMerkle ServiceStorage AdapterGASP SyncUHRPAir-Gap Optical (BRC-141)
ConformanceOverviewVector catalogTS runnerContributing vectors
GuidesOverviewIdentity, DIDs and credentialsIdentity migrationBuild a wallet-aware appRun an overlay nodePeer-to-peer messagingHTTP 402 payments
ReferenceOverviewBRC indexRepository health
AboutVersioningContributingDoc agentDocumentation sources
Loading…
Edit this page on GitHub
© 2026 BSV Blockchain. ts-stack is open-source.
GitHubContributingVersioning

Release and Operations Guide

This guide connects source versions, npm publication, post-release dependency reconciliation, infrastructure images, deployments, and rollback. It does not authorize a release: publication or deployment starts only when an operator explicitly requests it.

Release invariants

  • Release only a reviewed commit reachable from main.
  • Never build or publish npm packages from a workstation.
  • Never build Linux/amd64 production images on an unverified local macOS toolchain; use the repository workflow.
  • Treat package versions and image tags as immutable.
  • Promote the exact packed tarball or image digest that passed its security and provenance gates.
  • Do not bypass a failing audit, package consumer, dependency review, CodeQL, Sonar finding, image scan, attestation, or registry-integrity check.
  • Keep public services reachable by default when that is their product contract. CORS and CSP are configurable deployment controls, not authentication or authorization.
  • Treat an unpublished source manifest as a visible release-held candidate, never as evidence that a package or image is available to consumers.

1. Decide the release scope

Use the Generated Stack Facts page for current source versions and the package graph.

  1. Classify each public change as patch, minor, or major.
  2. Include every package whose packed bytes or manifest changed.
  3. Inspect first-party dependents for declaration, bundle, range, wire, and runtime effects.
  4. For infrastructure consumers, identify which image manifests and locks will need reconciliation after npm publication.
  5. For breaking or persisted-data changes, write migration and rollback steps before changing versions.

A broad code change does not justify bumping all packages automatically, and a small diff does not justify omitting an affected dependent.

2. Source preflight

Before creating a release tag, require green exact-main evidence for:

bash
pnpm install --frozen-lockfile --ignore-scripts
pnpm rebuild esbuild
pnpm rebuild better-sqlite3
pnpm audit:security
pnpm check-versions
pnpm build
pnpm docs:examples
pnpm typecheck
pnpm lint
pnpm format:check
pnpm test
pnpm conformance --validate-only
pnpm health:check
pnpm docs:facts:check

Also require the affected package coverage, property, browser, mobile, CLI, WASM, clean-consumer, and pack:check lanes selected by CI. The full release workflow repeats artifact-critical checks; local success is not a substitute.

On pull requests, the repository-owned 90% patch-coverage gate is blocking and uses the merged LCOV reports for changed production lines and branches. External coverage reporting remains informational only when it cannot enforce that contract. Exact package checks must prove all conditional/wildcard exports, declarations, maps, side-effect metadata, peer/optional adapter metadata, and clean ESM/CommonJS consumers. Browser candidates must also produce the governed composition report without exceeding their committed budgets.

Confirm before proceeding:

  • the target versions are absent from npm;
  • no draft or unrelated change was pulled into the release;
  • package READMEs, examples, API docs, migration notes, and support statements match the candidate;
  • Dependabot changes were reviewed for actual runtime and deployment effects;
  • all temporary overrides still have valid evidence and removal dates; and
  • open security findings are either fixed or explicitly governed with an owner, review deadline, and objective removal condition.

3. npm publication

Use one supported trigger:

  • packages/<path>/vX.Y.Z for one package;
  • release/vYYYY-MM-DD for a cascade;
  • legacy vX.Y.Z for a cascade; or
  • protected manual dispatch from main.

The run has exactly one human gate, the release-approval environment on the approve job. It starts at t=0 beside preparation. Approve it immediately after dispatch. The rest of the run then proceeds unattended, and publication still happens only if every automated gate passes. npm-production keeps its branch policy and npm trusted-publisher binding but has no required reviewers, so there is no late approval prompt.

The workflow stages immutable tarballs in an uncredentialed job, emits package and aggregate CycloneDX SBOMs, audits licenses and vulnerabilities, verifies clean consumers, and then passes only those bytes into the protected npm-production job. That job verifies GitHub attestations, publishes with npm OIDC provenance and lifecycle scripts disabled, and reconciles registry integrity.

Record the source SHA, workflow run, artifact manifest, package names/versions, attestation results, and registry digests in the release evidence.

4. Post-publication reconciliation

A successful cascade waits until every published version resolves from the registry, then creates one generated commit on automation/sync-published-versions directly on top of the released github.sha. That commit synchronizes workspace floors, updates every just-published first-party package found anywhere in each infrastructure lock (including transitive entries such as middleware reached through wallet-toolbox), and patch-bumps every infrastructure component whose manifest or lock changed. The same run then calls infra-release.yaml to build, scan, attest, sign, and push the images from that exact commit (section 5). It also opens the sync PR so main records the same bytes. Review that PR like source code:

  1. verify every first-party range corresponds to a published version;
  2. inspect pnpm-lock.yaml and every changed infrastructure lock;
  3. confirm lock refreshes name no ad hoc package and run with lifecycle scripts disabled;
  4. rerun audits, build/typecheck, package consumers, infrastructure tests and images, and repository health; and
  5. merge only after required checks and review threads are complete.

Do not merge an independent Dependabot PR that fights the release-sync graph. Consolidate it into the reviewed baseline or close it as superseded.

The read-only dependency/release verification workflow runs after successful release workflows and monthly. Confirm that its artifact records:

  • every source version, npm latest, recorded published baseline, tarball integrity, and provenance result;
  • every remaining source candidate that is still intentionally held from publication;
  • a clean lifecycle-disabled install plus npm audit signatures;
  • every deployment image pulled by immutable digest; and
  • generated package/support/conformance/coverage-reporting facts with no drift.

Do not close a release wave by copying version numbers from source manifests. Use this artifact and the release workflow evidence to distinguish what is published from what remains held. If publication was explicitly not authorized, close the implementation work with the held-candidate inventory and leave publication as a separate operator action.

5. Infrastructure images and deployment

A cascade npm release publishes affected images automatically from its infra-sync commit. A cascade with no npm candidates still releases infra components already bumped on main. For infrastructure-only source changes, or after a single-package npm release:

  1. update and review its manifest and committed lock, bumping its version;
  2. let the Linux/amd64 CI matrix build and scan the image;
  3. release with an infra/v* tag or the protected manual workflow;
  4. verify the immutable digest, SPDX SBOM, SLSA provenance, and signature;
  5. update deployment manifests to the exact verified digest;
  6. deploy through the system's owned GitOps/CI path; and
  7. validate health, readiness, authentication, storage/database connectivity, representative requests, logs, and rollback readiness in the real environment.

For Overlay, Wallet Storage, WAB, Message Box, Wallet Relay, and similar public services, validate both:

  • the public-by-default path from an origin not known at build time; and
  • the opt-in allowlist path for operators that require a restricted deployment.

An allowlist must be explicit configuration. Setting a hosting URL, fallback QR origin, or CSP document must not silently turn a public service into a same-origin-only service. Authentication, authorization, signatures, topic validation, rate limits, and request bounds remain enforced in both modes.

6. Independent assurance program

The release owner is also accountable for arranging an independent review of the security-sensitive stack. The review must cover cryptography, consensus and Script evaluation, wallet signing and storage, authentication and payment replay boundaries, Overlay and other untrusted network parsers, and npm/image supply-chain controls. It must inspect reviewed main source and the exact released packages and images, not production secrets or customer data.

The BSV Association security owner will select an independent, conflict-free provider with demonstrated cryptographic, application-security, and supply-chain experience by 2026-08-31. Selection evidence will record the candidate comparison, scope, conflicts check, statement of work, and confidential reporting channel. The review package will include the reviewed source SHA, package and image digests, SBOMs and attestations, threat models, conformance and coverage reports, fuzz/property evidence, and sanitized deployment configuration.

Findings must use a private GitHub security advisory or security@bsvblockchain.org and follow the acknowledgement, assessment, remediation-update, severity, and coordinated-disclosure targets in SECURITY.md. The ts-stack maintainers own triage and remediation; release owners own affected-artifact inventory, mitigation, deprecation, forward fixes, and deployment rollback. Public disclosure remains embargoed until coordinated with the reporter and affected operators.

OpenSSF Best Practices badge registration is deferred while QA issue #400 remains open, because its coverage, fuzzing, runtime, and manual-suite claims are not yet complete enough for a truthful self-assessment. The BSV Association security owner must register within five business days after issue #400 closes and link the resulting project record from this guide. Existing Scorecard findings remain governed by governance/repository-health/exceptions.json; badge deferral does not waive or suppress them.

Independent review and badge participation improve evidence and accountability. Neither is proof that defects cannot exist, and all findings enter the normal private reporting, remediation, release, and incident processes.

Failure and rollback

Before publication

Fix the source or workflow and rerun from a reviewed commit. Do not weaken a gate or retag different bytes under the same version.

Partial npm publication

Rerun within the retained candidate window so already-published versions are accepted only when their registry digests exactly match the staged tarballs. If the candidate expired or any digest differs, stop, inventory the published subset, and plan a deliberate recovery release.

Defective npm release

Deprecate the affected immutable version and publish a corrected patch or explicit forward-fix. Advise consumers which version to pin during recovery. Do not delete evidence or assume an npm unpublish is an operational rollback.

Defective image or deployment

Roll back the deployment to a previously verified image digest. Preserve the failing digest, source SHA, workflow URL, deployment transition, validation results, and incident link. Reconcile any emergency live change back to upstream source immediately.

Security incident

Treat unexpected lifecycle execution, provenance/attestation failure, registry digest mismatch, secret exposure, or active exploitation as a security incident. Stop promotion, preserve evidence, rotate affected credentials, use a private GitHub advisory, and coordinate disclosure under SECURITY.md.

Completion record

A release is complete only when source, published artifacts, post-release dependency state, deployed image digests where applicable, and documentation agree. Record the exact evidence in the operator-authorized release tracker; completed release program #401 is the retained reference closeout. Do not mark package availability or deployed behavior complete from a local build alone.

See npm Package Supply Chain, Container Supply Chain, and Versioning Policy for the underlying contracts.

Mutation audits are background findings only

No PR, npm release, OCI image, Marketplace publication or deployment starts or waits for a mutation campaign. Scores, receipts, campaign results and mutation finding status cannot grant or deny publication. No mutation waiver is needed.

The independent Background mutation findings workflow has explicit main-only dispatch, one named target/partition, a 30-minute audit job budget and a separate five-minute metadata-only triage reporter. It retains available raw evidence and opens or updates an advisory issue after unsuccessful execution. A timeout is inconclusive evidence. No full-registry schedule is enabled. Future audit work must be explicitly budgeted and must never become a release dependency.

All existing source ancestry, human approval, deterministic/property/native, security, coverage, package consumer, immutable artifact, SBOM, signing, attestation and staging checks remain applicable. Infrastructure calls carry release-sha as source identity from successful release preparation; it is not a mutation qualification. The existing main ancestry and narrowly allowed direct infra-sync child checks still prevent product changes between preparation and image publication.

Triage actual product defects into owned issues and focused regression tests. Use the private security process for sensitive findings. Historical mutation reports and exceptions below remain evidence of prior policy; they do not impose admission requirements under this policy.

Retired one-time experimental #674 release waiver

The operator authorized one full release without successful #674 mutation qualification: release 40612905804, SDK 4.0.1, Toolbox 2.15.1, 37 npm packages and 8 infrastructure images. The npm source was f12e0dd669287b63964545035a39f0d339abc447, with package bytes identical to the tested a6b6e352 candidates. GitHub skipped its image-sync continuation through the intentionally skipped campaign. PR #1433 repaired only release controls; continuation 40617228519 uses ada0681362455045ff3a0dd795fcf89e6f177d92 and the same immutable package bytes, with no repeated npm publication. The image source is its generated child 1aa0983115ba39579ac09885e1977c05b765e42e. Established compatibility and normal approval, artifact, advisory, SBOM, provenance and signature gates remained mandatory.

This was an operator waiver, not successful full mutation qualification. Failed and canceled campaign evidence remains failed. The historical record is governance/release-exceptions/2026-10-27-674.json. The temporary dispatch input and admission implementation are removed. Every later release requires the the historical full-mutation rule; the background-only policy above supersedes it.

The image inventory used two source children. Six new images came from 1aa0983115ba39579ac09885e1977c05b765e42e at caller ada0681362455045ff3a0dd795fcf89e6f177d92. Message Box1.1.55 and WebRTpay Relay0.2.2 were already occupied by older images containing SDK4.0.0, so the remaining recovery published Message Box1.1.56 and Relay0.2.3 instead. Image-only recovery 40623065656 uses caller d344bf07b8a9d25adc7203687b667a70e96955f5 and generated child f69c6f2b1f805e0d69962815515a641a35e230cb. Relative to the original inputs, only those two manifest/lock version fields changed; source and dependency bytes remained identical. Normal approval, build, scan, signature, provenance and SBOM gates remained required, with no additional npm build or publication. This consumed the same one-time release waiver. The temporary image-only dispatch adapter is removed together with the original admission.

Version pull request

Feature pull requests add change files under changes/ and never move a version. The Version packages workflow runs on every push to main while change files are pending. It applies all pending change files with pnpm changes:version, which sets source versions, release-note entries, package changelogs, baseline package versions, and the generated ledgers, and deletes the applied change files. It force-pushes the result to automation/version-packages and keeps one chore: version packages pull request open. Review the planned versions in that pull request, then merge it before you tag a release. Pull requests opened with the workflow token do not start CI on their own; close and reopen the pull request to start the required checks. To preview the plan locally, run pnpm changes:status.

Reconcile verified published baselines

After a protected cascade publishes, independently verify every public version, integrity, actual tarball digest and source-bound attestations. Reconcile the generated sync PR against its original immutable image-source commit, then set only the verified release entries in governance/package-release-notes.json to the public publishedVersion with releaseType: none. Run pnpm docs:packages, review the generated package facts and merge the validated reconciliation PR. Do not advance a baseline for a held, failed or partially published candidate. Later metadata commits do not change the pinned image source or its provenance.

November4 PR1093 operator exception retired

The temporary 2026-11-04-pr1093-main mutation exception is retired following successful publication of Paymail2.5.0, Toolbox/Core/Client/Mobile2.15.2 and all eight current infrastructure image tags. Image continuation41881749332 passed the complete published-package and image baseline reconciliation. The record in governance/release-exceptions/2026-11-04-pr1093.json retains the exact source boundaries, failed attempts and operator-waiver identity; it does not claim a mutation campaign passed. Temporary workflow inputs and admission helpers are removed. Future publication requires normal complete exact-source mutation qualification under the then-current policy. The background-only policy above now applies. Staging native/availability acceptance and production promotion remain separate; production is held for operator validation.