Skip to content

Verify shipped zips, Gatekeeper path, and install.sh in release CI - #50

Open
aboullaite wants to merge 5 commits into
mainfrom
maboullaite/release-binary-sanity-checks
Open

Verify shipped zips, Gatekeeper path, and install.sh in release CI#50
aboullaite wants to merge 5 commits into
mainfrom
maboullaite/release-binary-sanity-checks

Conversation

@aboullaite

Copy link
Copy Markdown
Collaborator

What

The release pipeline's verify job previously ran the raw cross-compiled binaries with --version, so the zips users actually download were never executed, and Gatekeeper never assessed the notarization (CI artifacts carry no quarantine attribute). This PR makes the sanity checks exercise what users actually consume:

Release workflow restructure

  • Packaging (zip + skills + sha256 sidecars) moves from the release job into build, so verify operates on the exact published artifacts.
  • verify (all 6 native platforms) now: checks the sha256 sidecar, extracts like a user (unzip / Expand-Archive) with no chmod so a lost executable bit fails in CI, asserts --version output matches the tag (catches broken ldflags stamping), and runs doctor plus a skill-bundle presence check.
  • On macOS, verify runs codesign --verify --strict and sets com.apple.quarantine before executing, recreating the real download path so syspolicyd actually assesses the signature and notarization ticket. This is the check that would have caught the v0.1.4 incident class.
  • workflow_dispatch dry-run mode: builds, packages, and verifies without publishing (version stamped as 0.0.0-dryrun.N).

New verify-release.yml covers the last mile after publishing: runs install.sh --version <tag> against the published GitHub release assets on macOS (arm64 + intel) and Linux (amd64 + arm64), then asserts the installed binary reports the right version and passes doctor. It runs as the final job of the Release workflow via workflow_call (a standalone on: release trigger never fires for releases created with GITHUB_TOKEN) and is also dispatchable for ad-hoc checks of any existing release.

Windows install.sh coverage is intentionally out of scope: users run it under Git Bash, which CI cannot reproduce faithfully; Windows binaries are covered by the native verify matrix.

Validation

Mohammed Aboullaite added 5 commits July 20, 2026 11:33
The verify job previously ran the raw cross-compiled binaries, so the
zips users actually download were never executed. Packaging now happens
in the build job and verify exercises the real artifact end to end:
checksum sidecar, user-style extraction (unzip / Expand-Archive), a
simulated quarantined download on macOS so Gatekeeper actually assesses
the notarization ticket, a version-output assertion to catch broken
ldflags stamping, a doctor smoke run, and a skill-bundle presence check.

A new reusable verify-release workflow covers the last mile after
publishing: install.sh against the published assets on macOS and Linux.
It runs as the final job of the Release workflow (a standalone
'on: release' trigger would never fire for GITHUB_TOKEN-created
releases) and is also dispatchable for ad-hoc checks.

The Release workflow itself gains a workflow_dispatch dry-run mode that
builds, packages, and verifies without publishing anything.
- Extract the version assertion and doctor smoke run into
  scripts/verify-binary.sh, shared by both workflows via sparse
  checkouts, so the smoke-test definition lives in one place
- Replace the hardcoded skill list in the verify job with a manifest
  the build job derives from plugin/skills, so the check cannot drift
  from what packaging actually copies
- Use GITHUB_REF_TYPE/GITHUB_REF_NAME default env vars in the version
  step instead of re-plumbing github.ref_name through env
- Use shasum -a 256 -c unconditionally (present on all six runners)
  instead of the sha256sum fallback dance
- Drop the dead zip/sha256 guard in the packaging loop, the redundant
  needs edge on the release job, and the redundant tag guard on
  verify-published (skipped transitively when release is skipped)
- Retain the run-scoped dist artifact for 1 day instead of the default
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