Repository navigation
ci(desktop): start the Desktop release when Packages succeeds on main - #1414
Merged
Merged
Conversation
The release gate used to start on the push and poll for that commit's Packages run for 60 minutes. Under CI congestion the 0.22.0 commit's Packages run sat queued past that bound and release run 39368396653 refused, so releases needed a manual re-dispatch. desktop-release.yml now starts from workflow_run on Packages completing with success for a push to main. The Packages head commit (workflow_run.head_sha) is the subject whose checks decide the release; the gate reads that run back and requires its desktop test and build jobs. GitHub runs workflow_run at main's tip and signs attestations for it, so the release builds the tip, as a dispatch already did, and requires its packages/desktop tree to equal the subject's. Workflow commit and source commit therefore stay equal in the provenance. A commit that doesn't change packages/desktop, one superseded by a newer Desktop change, or an already released version ends quietly as no release. The concurrency group queues runs (queue: max) so the many no-op runs can't cancel a pending release. A dispatch still waits: four hours while Packages is queued, then 60 minutes once it runs. Provenance and the download verifier accept the workflow_run event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
added a commit
that referenced
this pull request
Oct 20, 2026
#1414 starts Desktop releases from workflow_run. A dispatch is always a candidate, so it reaches the release-state check and resumes. Any other run that finds the resumable state (PyPI serves the version, the tag exists, no published release) builds nothing and leaves a warning to dispatch, instead of failing every Desktop commit until someone does. The gate's release output stays with the main-unchanged step, which a resume skips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Summary
Release run 39368396653 refused Desktop 0.22.0 because the gate polled for the commit's Packages run for 60 minutes, and under CI congestion that run sat queued longer. This change starts the release only after Packages has finished, so queue time can't fail a release.
desktop-release.ymlstarts fromworkflow_runon Packagescompleted, branchmain. The gate runs only when that run concludedsuccess, came from apush, and belongs to this repository'smain; a fork's pull request from a branch namedmaincan't release.workflow_dispatchstays for manual runs.github.event.workflow_run.head_sha, never main's tip. The gate reads that Packages run back through the API. It requires the same workflow, head commit,pushevent,mainbranch, repository, andcompleted/success, plus successfuldesktop test /anddesktop build /jobs.workflow_runworkflow at main's tip, and the Fulcio certificate records that tip as the workflow SHA. The release therefore builds and tagsgithub.sha, as a dispatch already did, and requires the tip'spackages/desktoptree to equal the subject's. That keepsworkflow_commit == source_commitin the provenance and channel, which the verifiers check. Buildinghead_shainstead would produce attestations whose certificate names a different commit.packages/desktop, when main changed Desktop again after the subject (the newer commit's own Packages run releases it), or when the version is already released. Classification runs before the release-state check, so an unrelated commit never trips the loud partly-published refusal.queue: max(GitHub, May 2026). The local actionlint 1.7.12 doesn't know this key yet; CI doesn't run actionlint.native_release.pyand the download verifier now accept theworkflow_runevent.pushstays valid for earlier releases.These gates are unchanged:
openadapt-releaseApp identity for tagging.Caching is unchanged. Note that the release build jobs already use
setup-nodewithcache: npm; this PR doesn't add or remove any cache.Docs:
packages/desktop/RELEASES.mdhas a new "How a release starts" section.packages/desktop/CLAUDE.mdanddocs/monorepo/README.mdare updated to match.Tests
tests/test_desktop_release_subject.pynow asserts the trigger, the gate condition,queue: max, the head-SHA binding, the step order and the quiet exits. It also covers the Packages read-back, the desktop job prefixes, the dispatch bounds, the freshness check and the release App identity.packages/desktop/tests/test_native_release.pyandtest_public_metadata.pyare updated for the new trigger and step order.tests/test_desktop_release_subject.py,tests/test_verify_github_release.py,packages/desktoptest_native_release.py,test_public_metadata.py,test_native_signing.pyandtest_release_publication.py. actionlint with shellcheck is clean, apart from the unknownqueuekey.No release was dispatched or re-run.
🤖 Generated with Claude Code