Skip to content

fix(release): gate publication on the verified release SHA - #1138

Merged
Brad-Edwards merged 6 commits into
devfrom
GOV-928-release-admission-successor
Aug 18, 2026
Merged

fix(release): gate publication on the verified release SHA#1138
Brad-Edwards merged 6 commits into
devfrom
GOV-928-release-admission-successor

Conversation

@doublewhy

@doublewhy doublewhy commented Aug 12, 2026

Copy link
Copy Markdown

Plain-language summary

  • Context: OpenRAE already uses Release Please, trusted PyPI publishing, a canonical verification suite, and an optional real-container test. Those safeguards previously ran as separate paths.
  • Problem: A release could reach PyPI without a direct dependency on verification of the exact tagged commit, and the ordinary container job could skip or fail without blocking publication. A tag or GitHub Release could also change while a protected-environment approval was pending.
  • Fix: Resolve one release ID, tag, draft state, and 40-character commit SHA; run the same canonical verifier used by CI at that SHA; require the digest-pinned real-container tests with zero skips; build and smoke-test the wheel and sdist once; and revalidate identity immediately before PyPI, re-read the Release after attachment, finalize the bound numeric Release id, and accept an already-public retry only when both assets byte-match.

Issue mapping

Closes #1125.

Closes #1110.

Related to the broader release-delivery epic #684.

What changes

  • Extracts the existing proof-bearing nox -s verify job into a read-only reusable workflow. CI calls it for github.sha and keeps the historical verify status name as a strict result join.
  • Makes Release Please create a draft release, resolves its tag to an exact commit reachable from main, and refuses a failed Release Please result.
  • Runs a required release-only Docker job after canonical verification and before artifact build. It uses a reviewed Alpine digest, fails when Docker/image access is unavailable, and rejects zero tests or any skips. The existing PR/local Docker lane remains optional.
  • Builds one wheel and one sdist from the verified SHA, checks corpus payloads, installs each artifact outside the checkout, and requires CLI conformance plus the tagged version.
  • Keeps id-token: write and the pypi environment on the sole PyPI job. That job re-reads the release object and fully dereferences the tag immediately before the pinned publisher runs.
  • Makes GitHub attachment/finalization retry-safe: it revalidates the Release after upload, finalizes by numeric id, and accepts an ambiguous already-public retry only after byte-comparing both tested artifacts.
  • Adds executable workflow-policy tests, required/optional Docker-fixture tests, operator documentation, and GOV-928/RUN-314 traceability.

Verification

  • actionlint 1.7.7: all three changed workflows pass.
  • Focused release/Docker policy suite: 25 passed, 2 deselected, including four adversarial finalization and retry cases.
  • Required real Docker lane on Python 3.12: 2 passed, 0 skipped; JUnit contained exactly two cases and no skips.
  • Ruff format/check and repository policy passed.
  • Exact-head GitHub CI run 31664492824: canonical verification and the required verify join passed; 6,898 unit tests passed with 1 skip, 59 integration tests passed with 2 skips, and combined coverage uploaded. Fuzz, supply-chain, Docker CI, requirement governance, and Sonar also passed.
  • Exact-head CodeQL run 31664489013 passed both Actions and Python analysis; Docs run 31664492826 passed.
  • Python 3.12 rebuilt raes-3.3.0 wheel and sdist from this head; both clean installs passed 28-case CLI/conformance smokes outside the checkout.
  • Ground Control was unavailable locally, so the local external governance lookup skipped; the exact-head hosted governance check passed.

Scope and integration

The branch is rebased on exact origin/dev commit 96b20ae8422fae9936bae928bbd8a1c14d2001da; the current head is bab92a6c82a4a00d5b92716a28cfab7c2c768c8e. It does not include durability, scheduler, OCI-registry, libvirt, coverage-ratchet, realization, Python-matrix, or supply-chain-gate changes.

Merged #1121 supply-chain admission, #1128 libvirt traceability, #1130 OCI registry hardening, and #1132 timeout reconciliation are preserved in this rebased branch. Open PRs #1131 and #1139 also change ci.yml; merge those lower-layer CI changes first, then rebase this release PR once so the exact-SHA publication graph incorporates them. PR #1134 owns the interpreter-qualification matrix and remains separate.

@doublewhy
doublewhy marked this pull request as ready for review August 12, 2026 21:15
@doublewhy
doublewhy marked this pull request as draft August 13, 2026 03:17
@doublewhy
doublewhy force-pushed the GOV-928-release-admission-successor branch 2 times, most recently from 9cd0d64 to ed03a67 Compare August 13, 2026 03:23
@doublewhy
doublewhy force-pushed the GOV-928-release-admission-successor branch from ed03a67 to bab92a6 Compare August 13, 2026 03:37
@OpenRAE OpenRAE deleted a comment from doublewhy Aug 13, 2026
…ion-successor

# Conflicts:
#	.github/workflows/ci.yml
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Merged current dev and resolved the CI workflow conflict. The resolution keeps the exact-SHA reusable verifier and required verify result join while retaining CI on dev pushes, the CPython 3.11–3.14 compatibility matrix, XML and JSON coverage artifacts, and the current Isabelle font/runtime prerequisites. Workflow regression tests now follow the reusable verifier boundary.

Verification: focused workflow/Docker tests (26 passed), verify-completion, repository policy, and the staged pre-commit gate all passed.

Comment thread .github/workflows/canonical-verification.yml Fixed
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

CodeQL identified that the reusable verifier could save the shared Isabelle cache key from PR or manually dispatched release refs. The verifier now uses the restore-only cache action, so those runs may consume a trusted cache but cannot populate it. A workflow-policy assertion locks that boundary.

Verification: the regression test failed before the change and passed afterward; the focused workflow tests, full verify-completion, repository policy, and pre-commit gate all pass.

@Brad-Edwards
Brad-Edwards marked this pull request as ready for review August 17, 2026 16:30
…ion-successor

# Conflicts:
#	.github/workflows/ci.yml
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Merged current dev and resolved the ci.yml conflict by retaining the reusable exact-SHA canonical job and required verify result join while preserving the current interpreter matrix and supporting CI lanes. The updated setup-uv pin from dev was also applied to the canonical verifier and release-only Docker job.

Focused workflow regression tests: 17 passed.

@Brad-Edwards
Brad-Edwards merged commit 701858d into dev Aug 18, 2026
17 checks passed
@Brad-Edwards
Brad-Edwards deleted the GOV-928-release-admission-successor branch August 18, 2026 00:27
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.

3 participants