Repository navigation
ci: stop releasing commits whose main CI failed, and confirm each deploy is live - #15
Conversation
Require the newest verify.yml main push run for the exact tagged SHA to complete successfully before publishing any release artifacts. Remove duplicate publish-job type, lint, test, and ffmpeg setup while retaining the release validation and security checks. Expose serverVersion through the public capabilities API without changing its schema version or the health endpoint. Smoke-test stable deployments after publishing, waiting for the expected public version and checking the landing page and capabilities endpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reject missing runs and inconsistent totals before selecting the newest run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Extract workflow run and endpoint validation, simplify SemVer parsing, and use non-mutating sorting and top-level await. Add SemVer edge cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 Claude Opus 5.5 responding on behalf of beastyrabbit @codex review New head 252fb05 fixes the six SonarQube quality-gate issues in the two new CI scripts without changing behavior. It extracts the run and endpoint validation into helpers, uses |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (0.00% Estimated after merge)
Note
🤖 Claude Opus 5.5 responding on behalf of beastyrabbit
v0.15.0 shipped from a commit whose main CI had failed. The
Verify supported runtimesrun on6def5ab0failed on Linux (macOS was cancelled), yet the tag publish run for that same commit pushed the container, the npm package and the release assets. The release job only checked that the tag was onmain; it never looked at CI, andmainhas no branch protection to catch it.Tag releases now wait for main CI on the exact tagged commit and publish nothing unless it passed. After publishing, a new job confirms that schaffa.dev is actually serving the release.
Release gate
Before any publishing step, the
publishjob runsscripts/ci-require-green-main.mjs. It asks GitHub forverify.ymlruns from a push tomainon$GITHUB_SHA, checks those fields on every returned run itself, and takes the newest one. It does not filter for successes, so a newer failure always beats an older pass.completed+success: the release continues and the log shows the run URL and attempt.mainpush.A pull request run, a run on another branch or a success on a different commit cannot satisfy it. Re-running a failed
verify.ymlrun updates that same run, so a green re-run unblocks the release. The job gainsactions: read; the ancestry check stays.Because the gate guarantees main CI, the publish job no longer repeats
pnpm typecheck && pnpm lint && pnpm testor installs ffmpeg (about a minute). Nothing later depended on them:pack:clibuilds the CLI itself, the image builds in Docker, and the CLI artifact check does not use ffmpeg. Version validation, the npm duplicate check, gitleaks, the audit, CLI artifact verification, the image scan and digest promotion, npm publish, release attachments and the source map job are unchanged, as areverify.yml,arc-smokeand.forgejo/.Post-deploy smoke test
/healthzis behind Pangolin SSO publicly (401), so the running release had no public signal./api/capabilitiesnow also returnsserverVersion(for example0.16.0). The existingversion: 1stays the response schema version./healthzis unchanged.A new
deploy-smokejob runs afterpublishon stable tags. Prereleases skip it, because the Flux image policy (>=0.0.0) never selects them. It pollshttps://schaffa.dev/api/capabilitiesfor up to 20 minutes, which covers the 2-minute image scan, the 2-minute pin commit, the Git sync and the Recreate rollout. Once the expected version is live, it checks that the landing page and capabilities API return 200 with the expected content. A newer version fails as superseded, not as success. Malformed responses, redirects, unhealthy endpoints and timeouts fail loudly. The first release withserverVersionis handled: the current 0.15.0 counts as an older release while the job waits.Verification
pnpm test:releasepasses 26/26.pnpm typecheck,pnpm lint,pnpm build,pnpm securityand actionlint pass. CLI tests pass 50/50 and server tests 124/125. The one failure is the local video test: Chrome's sandbox is blocked on that host and ffmpeg is missing.6def5ab0(failed run 39666551720) and passes59518960(run 39664865751). Against production, the smoke script reports 0.15.0 as a release withoutserverVersion.Note for the next release
Main CI on
6def5ab0is red because of a timing-sensitive browser test. Intest/telemetry-browser.test.ts, "early queued error reaches the local envelope stub" allows about 2.5 s for the GlitchTip envelope. It passed in the publish job and locally on the same commit. With this gate, a flaky failure on the release commit blocks the tag untilverify.ymlis re-run green, which is the intended behavior.🤖 Generated with Claude Code