Skip to content

ci(release): gate publishing on accepted exact-main artifacts #1198

Description

@bokelley

Summary

The current Release Please workflow can enter release-capable behavior from a main push and its publish=false dispatch path does not prove that release creation is disabled. Add a permanent, fail-closed acceptance guard before the Python reporting stack is integrated or publication is re-enabled.

Release Please workflow 204238826 is currently disabled_manually and must remain disabled throughout implementation, stack integration, and actual-main acceptance.

Required behavior

  • Separate release-PR proposal from tag/GitHub-release/PyPI publication. A proposal-only invocation must be technically incapable of publishing.
  • Bind every release-capable invocation to an explicit immutable main commit and reject stale, missing, non-main, or moving targets.
  • Require fresh successful protected CI and the approved release-acceptance workflow for that exact commit.
  • Require candidate wheel/sdist identity, hashes, package inventory, version, and installed acceptance for that exact source commit before publication.
  • Reapply the complete gate after the generated release PR merges; the release-PR merge commit is a new target and must not inherit evidence from its parent.
  • Keep recovery/manual publishing behind the same gate. Do not leave an alternate publish=true, legacy rerun, tag, or branch-ref bypass.
  • Use least-privilege permissions, concurrency controls, idempotent retries, and explicit environment approval where supported.
  • Preserve a safe proposal route while the publication writer remains disabled.

Acceptance criteria

  • Proposal-only and release-capable paths are structurally separate and tested.
  • Wrong SHA, stale SHA, non-main ref, incomplete/failed/skipped CI, missing artifact evidence, mismatched version/hash, and replay attempts all fail closed.
  • Exact accepted M_impl can create/update the normal release PR without publishing.
  • Exact accepted M_release can publish once after fresh artifact and installed-package validation.
  • Reruns and recovery dispatches cannot reuse stale acceptance.
  • Workflow security validation and an independent review pass on the final exact head.
  • Operational documentation covers disable/drain, guarded enable, proposal, final validation, publish, and rollback.

Integration boundary

Implement and review independently, but merge after the reporting stack and #1172. Do not re-enable Release Please, publish, create tags/releases, or weaken existing branch protection as part of this issue.

Related: #1172, #1192, #1193.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions