Skip to content

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

Draft
doublewhy wants to merge 3 commits into
devfrom
GOV-928-release-admission-successor
Draft

fix(release): gate publication on the verified release SHA#1138
doublewhy wants to merge 3 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
@doublewhy

Copy link
Copy Markdown
Author

Held under the temporary naming/release freeze. Preserve the exact-SHA release work, but do not rebase, mark ready, merge, or publish until the naming and compatibility decision is recorded.

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.

1 participant