Skip to content

ci: diff-plan main pushes and run the full candidate matrix on release tags - #228

Merged
usehoplite[bot] merged 2 commits into
mainfrom
hoplite/akraiphia-akraiphnion-f4e54807
Sep 2, 2026
Merged

ci: diff-plan main pushes and run the full candidate matrix on release tags#228
usehoplite[bot] merged 2 commits into
mainfrom
hoplite/akraiphia-akraiphnion-f4e54807

Conversation

@usehoplite

@usehoplite usehoplite Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The full 19-job CI matrix ran on every push to main (~25 min wall, including the 22-minute Android candidate), regardless of what changed. Releases, meanwhile, are rare. This PR moves that cost to where it is actually consumed:

  • Main pushes are diff-planned. plan now computes affected surfaces from the pushed diff, exactly like pull requests. A backend-only push runs backend/security/image and skips Android, marketing, docs, CLI, and n8n; a docs-only push runs the docs suite only. Delivery-surface changes (workflows, changes/, build contracts) still fail closed to the complete matrix.
  • Release tags run the full candidate matrix. v* tags now trigger CI, producing the candidate artifacts (frontend bundle, unsigned APK, image evidence) for the tagged SHA.
  • The release workflow pins to the tag's own CI run and waits for it (gh run watch --exit-status) instead of picking any successful run for the SHA — necessary now that a SHA can have both a diff-planned main run and a full tag run, and safer generally: a red tag build can no longer release.
  • Backend tests run once with -race -cover instead of two separate jobs duplicating the suite (saves ~11 runner-minutes per backend change; coverage is still produced).

The image job's manifest derivation handles tag runs by ranging from the previous release tag (git describe), since a tag has no commits after itself — the changelog-derived version resolution would otherwise fail on an empty commit range.

Verification

  • bun test scripts/release-ci-contract.test.mjs scripts/ci-plan.test.mjs scripts/ci-artifacts.test.mjs — 16/16 pass, including "main candidates always run the complete matrix" and "delivery changes fail closed."
  • Both workflow files parse clean (yaml.safe_load).
  • scripts/ci-plan.mjs exercised in both modes: --full and diff-based, plus a synthetic classification check (backend-only → backend/security/image/application, docs-only → documentation).
  • The PR's own CI run exercises the diff-planned path end to end.

Risks: tag-pushed CI runs are new — release flow now takes CI duration longer at tag time (acceptable; releases are infrequent). Android artifact freshness at release time is preserved by the tag run building it.

Open in Hoplite

usehoplite Bot added 2 commits September 2, 2026 20:24
…pushes

Main pushes now plan from the pushed diff like pull requests, so untouched
surfaces skip their jobs. Release tags trigger a full CI run whose artifacts
the release workflow consumes; the tag workflow pins to that run and waits
for it. The image job derives the release version from the previous tag when
building a tag, since the tag itself has no commits after it.
The race suite duplicated the backend suite on every backend change. One
-race -cover run keeps both signals at the cost of the slower run alone.
@usehoplite
usehoplite Bot merged commit 44a8893 into main Sep 2, 2026
12 of 15 checks passed
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.

0 participants