Skip to content

Build a fail-closed release pipeline with trusted publishing and traceable artifacts #63

Description

@plx

Parent epic

#32

Problem and impact

There is no reproducible release workflow, immutable version/tag check, package/installed-artifact gate, GitHub Release, binary archive, checksum, SBOM, provenance, or signature policy. Crates.io 0.1.4 exists without a corresponding Git tag or GitHub Release. Manual publication could diverge from the audited commit.

Required pipeline

Design a dry-runnable workflow that, on the exact proposed tag commit:

  1. verifies clean source identity and Cargo.toml/tag/CLI/changelog version agreement;
  2. runs locked full tests on every supported OS and the MSRV;
  3. runs fmt, all-target/all-feature Clippy with warnings denied, and rustdoc with warnings denied;
  4. runs advisory, workflow, license, attribution, and package-manifest checks;
  5. runs public API/SemVer policy against the proper baseline;
  6. builds cargo package, installs it in a clean root, and runs the smoke suite;
  7. builds supported native binary archives in reproducible/traceable environments;
  8. smoke-tests each exact archive on its target OS;
  9. creates SHA-256 checksums and an SBOM/provenance attestation;
  10. uses a protected environment and crates.io Trusted Publishing where available; and
  11. creates an immutable GitHub Release only after all gates pass.

The workflow must support a non-publishing rehearsal that exercises every gate and artifact step without creating external release state.

Security requirements

  • Pin every action/tool as established by the workflow-hardening ticket.
  • Minimize permissions; grant id-token: write only to the publish job/environment.
  • Never run release with untrusted checkout code and secrets in the same trust context.
  • Require maintainer approval for the production environment.
  • Prevent moving/reusing release tags.

Required tests/evidence

  • Deliberately mismatch tag/version and prove failure before build/publish.
  • Deliberately fail a package smoke test and prove publish cannot run.
  • Verify checksums against downloaded artifacts.
  • Install every artifact in a clean environment and exercise success/failure CLI behavior.
  • Rebuild twice; if bit reproducibility is claimed, hashes must match, otherwise record expected nondeterminism while proving source provenance.

Acceptance criteria

  • One non-publishing rehearsal passes end to end on the intended v0.2 candidate shape.
  • Every gate is fail-closed and required by the publish job.
  • Crate and binaries trace to one immutable commit/tag.
  • Checksums, SBOM/provenance, licenses, and smoke results are produced.
  • Trusted publishing/protected approval is configured without a long-lived exposed token.
  • Failure injection proves publication cannot bypass a failed gate.
  • Release runbook documents recovery without tag mutation.

Relationships

Non-goals

This ticket builds and rehearses the mechanism; it must not publish v0.2 before the independent audit passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Significant semantic, completeness, correctness issues.component: releaseVersioning, publication, release artifacts, and distributiondiscovered-by-codexIssues discovered via review by codex.domain: distributionCrates.io, GitHub Releases, Homebrew, and installable artifactsdomain: reliabilityFail-closed, deterministic, and robust operational behaviordomain: supply-chainDependencies, workflows, provenance, and publishing trusthardeningImproves safety, resilience, or operational guaranteesproduction-readinessPart of the audited path from prototype to production-ready usereleasePackaging, publishing, or release engineering workrelease-blockerMust close before the production-readiness release gate can passrisk: cross-platformBehavior depends on operating-system or filesystem semanticstarget: v0.2.0Must be resolved or explicitly waived before the v0.2 production auditworkflow:production-readinessIncluded in automatic production-readiness work selectionworkflow:production-readiness-leafIndependently actionable work item in the production-readiness sequence

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions