Repository navigation
fix(release): publish after promoted tags; add tag recovery path - #3794
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits intoNov 17, 2026
Merged
Conversation
On a promoted tag, integration jobs are skipped, and the implicit success() on Deploy Docs, GH-AW Compatibility, Build PyPI Distributions and Publish to PyPI turned that skip into a skip of publication: v0.36.0 created its GitHub release but never reached PyPI. These jobs now use !cancelled() with explicit needs.<job>.result == 'success' checks, and a contract test rejects any job behind a skippable job that relies on the implicit success(). repository_dispatch publish-existing-tag (client_payload.tag) re-publishes PyPI distributions for a published stable release that is missing from PyPI. It skips all validation and release jobs, builds from the tag, checks the built version, and stays in build-release.yml so PyPI trusted publishing still matches. Promotion evidence now also requires the run's Integration Tests Summary job to have succeeded, so a green recovery dispatch is never evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 17, 2026 18:35
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Release recovery can publish to PyPI without full-validation evidence for the exact commit and may check out a same-named branch instead of the release tag, allowing unverified or incorrect source to be published.
2 open issues
What changed in this PR
Fixes the publication regression introduced by #3771, where promoted release tags skipped downstream publication jobs. Adds a PyPI recovery path for existing stable releases and tightens promotion-evidence checks.
Changes:
- Adds explicit status gates so publication jobs tolerate intentionally skipped upstream jobs.
- Introduces
publish-existing-tagrecovery with release-state and distribution-version checks. - Requires a successful integration summary for promotion evidence and adds regression coverage.
| File | Description |
|---|---|
tests/unit/test_security_workflow_contracts.py |
Allows the recovery dispatch while preserving manual-trigger restrictions. |
tests/unit/test_platform_contract_workflow.py |
Adds publication-gate and recovery-path contract tests. |
tests/unit/scripts/test_release_plan.py |
Tests rejection of runs without a successful integration summary. |
scripts/release_plan.py |
Checks integration-job results before accepting promotion evidence. |
docs/src/content/docs/contributing/integration-testing.md |
Documents the PyPI recovery command and eligibility checks. |
CHANGELOG.md |
Records the publication fix and recovery option. |
.github/workflows/build-release.yml |
Updates publication gates and adds tag-based PyPI recovery. |
Review effort: Balanced
Comment on lines
+1212
to
+1213
| state="$(gh api "repos/$REPOSITORY/releases/tags/$TAG" --jq '"\(.draft) \(.prerelease)"')" | ||
| if [ "$state" != "false false" ]; then |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ needs.recover-tag.outputs.tag || github.ref }} |
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-release-publish-gates
branch
November 17, 2026 18:48
This was referenced Nov 17, 2026
Merged
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 19, 2026
* docs(changelog): make 0.36.0 onwards legible and concise Rewrites [Unreleased], [0.36.1] and [0.36.0] as one short line per user-visible change, with Highlights and a Breaking changes and upgrade notes list per version, grouped PRs and internal-only entries dropped (#3637, #3771, #3794, #3796, #3877). Credits, PR references, the 0.36.1 issue closures and the live Azure DevOps caveat are kept. Sections from 0.35.1 down are unchanged. The changelog instructions now describe this style. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore(lock): record the new changelog instructions hash Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: note the shared .mcp.json and VS Code Local mode in 0.37 upgrade notes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs(changelog): restore accuracy qualifiers flagged in review Restores the static env caveat for .mcp.json, the pack default-format qualifier, Copilot CLI scope for COPILOT_HOME, the 0.36.1 frozen-lockfile recovery step, and the bundle install --target qualifier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: danielmeppiel <danielmeppiel@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Release fix for a regression from #3771. The v0.36.0 tag run (44144535206) was promoted and took 7 min: it built, smoke-tested, release-validated and created the GitHub Release. But
Deploy Docs,GH-AW Compatibility,Build PyPI DistributionsandPublish to PyPIwere skipped, so PyPI still shows 0.35.1.Root cause: a job-level
if:without a status function gets an implicitsuccess(), which is false whenever any transitive ancestor was skipped. On a promoted tag the integration jobs are skipped by design.create-releasealready usedalways(), but the jobs after it did not.Changes in
.github/workflows/build-release.yml:!cancelled() && needs.<job>.result == 'success' && .... Their conditions are otherwise unchanged: pushed tag only, prerelease and private-repo checks.publish-existing-tag. This is a newrepository_dispatchtype (still noworkflow_dispatch). It publishes the PyPI distributions of a stable release that already exists:gh api repos/microsoft/apm/dispatches -f event_type=publish-existing-tag -F 'client_payload[tag]=v0.36.0'Release Planis skipped, so no validation or release job runs.Resolve Existing Release Tag(contents: read; the payload reaches the script only throughenv) refuses anything other than avX.Y.Ztag that is a published, non-draft, non-prerelease GitHub release whose version is not yet on PyPI.Build PyPI Distributionschecks out the tag, not main, and verifies that the built wheel and sdist versions match the tag.Publish to PyPIstays in this workflow with thepypienvironment, so the trusted publisher still matches.scripts/release_plan.py). A greenschedule/repository_dispatchrun counts as promotion evidence only if itsIntegration Tests Summaryjob succeeded. Without this, a green recovery dispatch on a main SHA would wrongly promote a later tag.After merge: dispatch
publish-existing-tagforv0.36.0so PyPI gets 0.36.0. v0.36.1 then publishes normally.Issue and approved scope
Issue: Refs #3581
Human scope-approval comment: #3581 (comment) (release CI scope, including "nothing publishes without a green full validation"). This PR is a named release fix for that scope, requested by the coordinator and by the 0.36.1 release captain.
Does this PR complete the issue, or what remains? Partial. It fixes a regression in #3771's publication path; the rest of #3581 stays in #3582.
Type of change
Testing
New guards in
tests/unit/test_platform_contract_workflow.py:test_publication_jobs_survive_skipped_upstream_jobs: any job downstream of a skippable job (integration-tests,recover-tag) must start withalways()or!cancelled(). Each publication job must checkneeds.<x>.result == 'success'for every need.test_implicit_success_publication_gate_is_rejected: restoring any of the four pre-fix conditions fails.test_tag_recovery_builds_from_a_verified_stable_tag_only.test_release_plan.pyadds tests showing that a green run whoseIntegration Tests Summarywas skipped, failed or missing is not evidence.pytest tests/unit/scripts/test_release_plan.py tests/unit/test_platform_contract_workflow.py tests/unit/test_security_workflow_contracts.py tests/unit/test_windows_signing_contract.py tests/unit/test_windows_unit_diagnostics.py tests/unit/test_ado_live_workflow_contract.py tests/unit/test_guardrailing_hero_topology.py tests/unit/test_docs_contract_workflow.py -p no:xdistruff check/ruff format --check(CI paths)bash scripts/lint-auth-signals.shactionlint .github/workflows/build-release.ymlSpec conformance (OpenAPM v0.1)