Repository navigation
fix(release): restore manifest PR automation and native Intel validation - #542
Conversation
There was a problem hiding this comment.
Findings
-
[Minor] The generated manifest PR can end up green-but-never-merged if any path-filtered workflow is a required check —
.github/scripts/sync-release-manifests.sh:40runsgh pr merge --auto --squashand then exits 0 with::notice::… awaiting required checks and merge. The manifest PR only touchespackaging/**, but.github/workflows/release-macos-x64-native-check.yml:7-14and.github/workflows/packaging-smoke.ymlare both restricted bypathsfilters that excludepackaging/**. Under branch protection that requires those job names, the check stays pending forever, auto-merge never fires, the job still reports success, and the in-repo manifests silently stay stale — the exact failure mode this PR is fixing. I cannot read branch protection from the public checkout, so this is conditional on the required-check list.
Suggested fix: before relying on auto-merge, confirm the required-check list only contains jobs that run on every PR (ci.ymlcheck), or add an always-running companion job that reports the same check name for path-filtered PRs. -
[Nit] The artifact suppression keys off
github.workflowinside a called workflow —.github/workflows/release-macos-x64-native-check.yml:118usesif: github.workflow == 'Release macOS x64 native check' || inputs.upload-artifact. Because thegithubcontext in aworkflow_callinvocation is associated with the caller, this comparison is non-obvious and would silently invert if that association ever changes, which would attach a secondnative-check-macos-x64DMG artifact to a release run.
Suggested fix: key off the event directly, e.g.if: github.event_name != 'workflow_call' || inputs.upload-artifact. -
[Nit] A non-stable tag fails the release run after artifacts are published —
.github/scripts/sync-release-manifests.sh:7-10hard-errors on anything other thanvX.Y.Z, while.github/workflows/release.ymlstill triggers onv*.*.*, so a tag likev0.3.0-rc.1publishes installers and then turnsbump-manifestsred with no actionable recovery.
Suggested fix: emit::notice::Skipping manifest sync for non-stable tagandexit 0for pre-release tags (or narrow the release tag pattern), keeping the hard failure for malformed stable tags. -
[Nit] The PR number is re-queried instead of read from
gh pr create—.github/scripts/sync-release-manifests.sh:34re-lists after creation and.github/scripts/sync-release-manifests.sh:36-39fails the job when the list call misses, which leaves an already-created PR orphaned and fails a release that actually succeeded in opening it.
Suggested fix: capture the created PR number from the command output (gh pr createprints the URL), e.g.pr_number="$(gh pr create … | grep -oE '[0-9]+$')", and keep the list call only for the reuse-existing-PR branch.
Questions
- Does the current branch protection required-check list include
Linux packaging smokeorNative Intel packaging check? If yes, the first finding is effectively blocking for the manifest PR and needs the companion aggregator job.
Summary
- Review mode: initial
- No blockers. The core direction is right: dropping the direct
mainpush and the[skip ci]marker, requiringRELEASE_BOT_TOKENwith an explicit credential failure (.github/workflows/release.yml:495-505), and gatingpublishonnative-intel(.github/workflows/release.yml:433) all address the reported defects, and the new local-git integration test genuinely exercises no-op, missing-credential, create, rerun, and denied-create paths. - The PR makes no closure claims — it explicitly says #541 and #534 are untouched — so there is no linked-issue acceptance criteria to validate.
- Residual risk I could not verify from the public checkout:
macos-15-intelrunner availability/queue time for the new publication gate (author reports actionlint 1.7.12 only, which does not prove the label is served). If that runner is unavailable,publishnow blocks rather than degrades. - Pre-existing drift this PR does not backfill:
packaging/homebrew/Casks/open-codesign.rb:2is still at0.2.2while the liveOpenCoworkAI/homebrew-tapcask is at0.3.0, andpackaging/scoop/bucket/open-codesign.jsonis at0.2.2against a0.2.0live bucket. After merge, run the sync once for the current release (workflow_dispatchofrelease.ymlfor the last stable tag, or./packaging/update-shas.sh <version>) so the first automated PR is not a large backfill. - Removing the
[skip ci]marker also means the manifest PR is correctly subject to required CI; nothing here loosens protection or introduces a bypass.
Testing
- Added:
.github/scripts/sync-release-manifests.test.sh, wired into.github/workflows/ci.yml:25-26; runs on every PR without network or credentials. - Gaps worth a small follow-up: a mock case for
gh pr mergefailing (auto-merge disabled) and forgit push --force-with-leaserejecting a concurrent writer, since both now fail the release job — the body claims those paths fail loudly but only nullsoft-create denial is asserted. - Not run (automation).
Open-CoDesign Bot
Release manifest synchronization pushes a
[skip ci]commit to protected main, then silently succeeds when the fallback PR cannot be created. Intel verification targets the retired macos-13 runner and does not gate publishing.Validation: actionlint 1.7.12 on all three changed workflows; bash syntax; local and CI manifest integration tests; git diff --check. Cloud CI (lint/typecheck/tests/Electron build), Linux packaging smoke, CodeQL, Dependency Review and automated PR review passed for 79dc6ab. Native Intel validation also passed on attempt 2 (3m37s): https://github.com/OpenCoworkAI/open-codesign/actions/runs/41869077136/job/126721621301 . Verified x86_64 runner architecture, x64 DMG packaging, packaged app architecture, native application smoke test, and artifact upload. Attempt 1 failed because no hosted runner acquired the job; it executed no steps. Rerunning the failed job passed without code changes. All 8 current PR checks pass for 79dc6ab.
Maintainer setup: configure repository secret RELEASE_BOT_TOKEN using a repository-scoped fine-grained PAT with Contents and Pull requests read/write, with organization approval if required. Keep required checks and auto-merge enabled; no protection bypass is needed. No settings or secrets were changed. Actual release publication and token-backed manifest PR creation are not exercised by this PR.
Leaves #541 and #534 untouched.