Skip to content

Run the integration suite when the seed changes - #2394

Merged
jakebromberg merged 2 commits into
mainfrom
fix/ci-seed-gate
Sep 8, 2026
Merged

Run the integration suite when the seed changes#2394
jakebromberg merged 2 commits into
mainfrom
fix/ci-seed-gate

Conversation

@jakebromberg

Copy link
Copy Markdown
Member

A change to dev_env/seed_db.sql or dev_env/init-db.mjs executes neither file in CI.

Both are in the db-init filter, but db-init gates only migrate-dryrun, which applies migrations and stops short of the seed. The integration suite -- the one job that builds a database from this seed and asserts against it -- keys off apps, jobs, shared and tests, none of which a dev_env change matches.

Observed, not theorised

On a branch adding rows to seed_db.sql and two counts to init-db.mjs, the run went green with Integration-Tests reporting success in 14 seconds, having executed neither file.

With db-init added to the gate, that same branch ran the suite for 2m39s and failed a spec (flowsheet-upcoming-show.spec.js, a scan-count ceiling). That failure is real, is reachable from main today, and nothing reported it before this change. It is being worked separately in #2392 -- this PR is only the gate.

Second commit: an unrelated red on main

format:check is currently failing on main. 9494e31 left plans/mu-ziq-replacement-char-remediation.md with emphasis markers prettier rewrites.

It went unnoticed through the same hole this PR closes, one filter over: that commit touched only plans/, which no filter covers, so lint-and-typecheck never ran on it. The fix here is entirely prettier --write output -- asterisk emphasis to underscore, no prose changed.

It is included rather than split because format:check gates lint-and-typecheck, which gates Integration-Tests; without it this PR cannot demonstrate its own effect. Happy to split it if you would rather review them apart.

Worth considering separately

plans/** still triggers no job. This PR does not widen the filter to cover it -- that is a judgement about whether plan documents should hold up CI, which is worth deciding deliberately rather than as a side effect of this fix.

Unrelated to this PR's subject, and pre-existing on main: 9494e31 left plans/mu-ziq-replacement-char-remediation.md with emphasis markers prettier rewrites, so format:check has been failing on main since. The change here is entirely prettier --write output, asterisk emphasis to underscore, no prose touched.

It went unnoticed for the same reason this PR exists. That commit touched only plans/, which no paths-filter entry covers, so lint-and-typecheck never ran on it. This PR's workflow edit is what pulled the job back in and surfaced it.

Fixed here rather than split out because format:check gates lint-and-typecheck, which gates Integration-Tests -- the job this PR adds the seed to. Leaving it red would leave the seed unexecuted, which is the thing being fixed.
A change to seed_db.sql or init-db.mjs executed neither file in CI. Both are in the db-init filter, but db-init gates only the migration dry-run, which applies migrations and stops short of the seed. The integration suite -- the one job that builds a database from this seed and asserts against it -- keys off apps, jobs, shared and tests, none of which a dev_env change matches.

Observed on a branch that added rows to seed_db.sql and two counts to init-db.mjs: the run went green with Integration-Tests reporting success in fourteen seconds, having executed neither file. With db-init added to the gate, the same branch ran the suite for two and a half minutes and failed a spec. That failure is real and predates this change being able to see it.

The failure this now catches is a seed that does not apply, or that applies different rows than a spec expects, which otherwise surfaces at the next developer's first run against a database nobody had rebuilt yet.
@jakebromberg
jakebromberg merged commit fb57e1f into main Sep 8, 2026
6 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.

1 participant