Skip to content

Distribute AACP as GitHub Release assets (v0.3.0a1) - #27

Merged
darklordVirtual merged 1 commit into
mainfrom
release/github-releases-v0.3.0a1
Nov 8, 2026
Merged

darklordVirtual merged 1 commit into
mainfrom
release/github-releases-v0.3.0a1

Conversation

@darklordVirtual

Copy link
Copy Markdown
Owner

What

A tag-driven release pipeline that publishes the aacp-conformance package as GitHub Release assets instead of PyPI:

Asset
aacp_conformance-<v>-py3-none-any.whl installable wheel
aacp_conformance-<v>.tar.gz sdist
aacp_conformance-<v>.cdx.json CycloneDX SBOM of the tested runtime environment
SHA256SUMS.txt SHA-256 of the above

Plus Sigstore-signed build-provenance (all assets) and SBOM (wheel) attestations, verifiable with gh attestation verify.

Workflow (.github/workflows/release.yml)

  • verify – tag must equal v + pyproject.toml version, CHANGELOG.md must have a non-empty ## <version> section, tagged commit must be on main; full conformance suite, vectors and lab tests (same as CI); fails if checks rewrite tracked files.
  • build – builds twice under SOURCE_DATE_EPOCH; wheel must be byte-identical, sdist content-identical. Checks wheel name/version/Requires-Python, aacp console script, LICENSE, every schema/*.json byte for byte, and that no runs//.github//cache paths ship. twine check --strict. SBOM from a pip-less venv. Checksums.
  • smoke – installs into a fresh venv on Linux/macOS/Windows × Python 3.12/3.13 (+ sdist on Linux) and runs aacp init/validate/inspect/adversarial --list outside any checkout. Fails if aacp imports from anywhere but the test venv.
  • publish – tag push only, behind the release environment. Re-verifies checksums, refuses an existing release, attests, creates a draft, uploads, checks the asset list, then publishes (works with immutable releases).

PRs touching release inputs rehearse everything except publish (this PR triggers it). All actions pinned to commit SHAs; build tooling pinned in requirements-release.txt.

Also

  • scripts/release.py (stdlib only): tag/version/changelog gates, notes, dist checks, checksums. tests/test_release.py: 19 tests incl. changed-byte, stray-file, runs/ leak, stale-schema and non-reproducible-wheel cases.
  • scripts/smoke_installed_cli.py: shared by release and the existing cli-package CI job (replaces its inline heredoc; same assertions plus version and import-location checks).
  • docs/INSTALL.md (install, and what checksum/attestation do and do not establish), docs/RELEASING.md (runbook), README/CLI-onboarding pointers.
  • CHANGELOG.md: ## Unreleased → ## 0.3.0a1 — alpha.

Local verification

Full suite: 370 tests OK. Local rehearsal of the build job: wheel reproducible, twine check --strict passes, SBOM validates, wheel and sdist install and pass the smoke test; a wrong --version fails it. actionlint clean.

Before tagging (manual repo settings)

  1. Create the release environment with a required reviewer and deployment tag rule v*. Without it GitHub auto-creates the environment unprotected.
  2. Tag ruleset for v*.
  3. Enable immutable releases.

Then: merge → git tag -a v0.3.0a1 -m "AACP 0.3.0a1" && git push origin v0.3.0a1 → approve the deployment.

Not in scope

No PyPI publication, no bundled dependencies, no reusable uses: …@v1 Action yet.


Generated by Claude Code

Add a tag-driven release workflow that verifies, builds, smoke-tests and
publishes the aacp-conformance wheel, sdist, CycloneDX SBOM and
SHA256SUMS.txt as a GitHub Release, with Sigstore-signed build provenance
and SBOM attestations.

- verify: tag == v + pyproject version, non-empty CHANGELOG section,
  tagged commit on main, full conformance suite and lab tests
- build: two builds under SOURCE_DATE_EPOCH; wheel must be byte-identical,
  sdist content-identical; wheel metadata, console script, licence and
  schema bytes checked; no runs/ or CI paths shipped; twine --strict
- smoke: installed CLI on Linux, macOS and Windows, Python 3.12 and 3.13,
  plus the sdist, run outside any checkout
- publish: tag push only, behind the `release` environment; draft, upload,
  asset-list check, then publish (compatible with immutable releases)

Pull requests touching release inputs rehearse everything except publish.
The CLI package CI job now shares scripts/smoke_installed_cli.py.
CHANGELOG's unreleased section becomes 0.3.0a1. No PyPI publication.

@darklordVirtual darklordVirtual left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (AI-drafted, Claude Opus 5.5; not independent): ready to merge.

Checked: the release workflow end to end (verify → build twice from SOURCE_DATE_EPOCH → check-dist --rebuild-dist → SBOM in a pip-less venv → checksums → smoke matrix → gated publish), smoke_installed_cli.py against the assertions removed from validate-assessments.yml (all kept: schema-valid results, NOT_RUN, property_verdict is None, C/F/G suite), and CI (14/14 green across ubuntu/macos/windows × 3.12/3.13 plus sdist).

Good: actions pinned by SHA, permissions: {} with per-job grants, publish only on tag reachable from origin/main, refuses to replace an existing release, draft → asset diff → publish, git diff --exit-code after the checks.

Non-blocking:

  1. Order with #28–#30. The tag is cut from main. If v0.3.0a1 is tagged right after this merges, the release contains none of the controls work. Suggest merging #24 and #28–#30 first, then tagging.
  2. conformance/ is packaged, but conformance.controls resolves its catalog through ROOT (the repository), so python -m conformance.controls from an installed wheel cannot find the catalog. Fine for an alpha if controls stay repo-only; worth one line in docs/INSTALL.md.
  3. The smoke script relies on assert, so it must never run under python -O. It doesn't today.

Simulated merge of all open PRs in order (#27, #24, #25, #26, #28, #29, #30): no conflict from this PR; combined tree passes all AGENTS.md checks (490 tests OK).


Generated by Claude Code

@darklordVirtual
darklordVirtual merged commit 0d9192a into main Nov 8, 2026
14 checks passed
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.

2 participants