ci: gate pull requests with the same jobs main runs #308
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
headless
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/eco-app!308
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/bk79-eco-pr-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
eco-app had no pre-merge gate.
build-publish.ymltriggered only onpushto main andworkflow_dispatch, so a pull request ran nothing and the first CI signal arrived after the merge.That cost us one already. #306 merged and turned main red — run 215, job
test, onward exec lint:A missing blank line before a top-level
def.ward exec lintcatches it and CI already runsward exec lint— it just ran too late to stop the merge. This PR fixes that line and closes the window that let it land.What
One workflow, both triggers. Adding
pull_request:to the existing workflow rather than writing a PR-only copy means the gate a PR passes is byte-for-byte the gate main runs. A second file would drift.That leaves the publishing jobs, which must not fire on a PR:
build-imageandpublish-modnow checkgithub.event_name == 'push' && github.ref == 'refs/heads/main'.testandfrontendwere already trigger-agnostic and now run on both.build-imagealone would technically be enough —publish-modneeds it, and a skipped need skips the dependent — but each job stating its own rule survives someone later addingalways()to aneedschain. That is why sirens-echo'spublish-observedcarries both.This mirrors
coilyco-gaming/sirens-echoci.yml, which is the house shape already:push: [main]+pull_request:, publish jobs gated on the event.Alert channel
The Telegram steps are keyed on
failure() && github.ref == 'refs/heads/main'. A PR ref isrefs/pull/N/merge, so PR failures never reach the alert channel. No change needed.Verification
ward exec lint,ward exec test,ward exec smokeandpre-commit run --all-filesall pass locally on this branch, with no hook rewrites left in the tree. The workflow YAML parses and the job graph is what it claims:This PR is its own test. It is the first eco-app PR that runs CI, and its own run is the evidence that
testandfrontendfire while the twodeployjobs stay skipped. Worth reading the run before merging rather than taking the diff's word for it.Two things I found but did not fix
The alert never fired. Run 215's log shows
telegram alert missing required secret—TELEGRAM_BOT_TOKENorTELEGRAM_RED_CHAT_IDis unset for this repo, so main went red silently. Setting repo secrets is Kai's, not mine.CI does not run pre-commit. sirens-echo runs
pre-commit run --all-filesin its test job; eco-app runs only test/lint/smoke, so the catalog hooks (doc caps, trifecta, layout) are enforced at commit time but not in CI. Deliberately left out of this PR: it would make PR CI stricter than main CI, which is a separate change, and hook installation needs egress I cannot verify without pushing and watching.Refs #306