Repository navigation
CI: migrated test db template and six unit-pure shards - #1927
Merged
Merged
Conversation
freshDb and freshDbWithForeignKeys deserialize a copy of a lazily built migrated template. Full backend suite: 8446 pass, 183 s.
unit-pure-shard runs bun test --shard=i/6 with seeded timings; the unit-pure gate keeps the required check name and proves every classified file ran. The file classifier moves to scripts/ci/unit-pure-files.sh, shared with deploy-backend test-gate (left serial). Tier-routing guard reads the script.
Gate proves the exact set of files each shard ran (junit), none twice; deploy gate and shards write the classifier output to a file and refuse an empty list; one unit_pure_due output replaces three copies of the nine-term filter; tier guard pins both callers of the shared script.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1927Version: 🤖 Updated on each push. |
The exactly-once block meant for the unit-pure gate was also inserted into the scrub-tools gate, which has no file list, so jq failed to compile and the gate went red although every scrub shard passed. Tested: workflow YAML and tier-routing suites (64 pass).
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unit-puretakes ~31 min and has grown ~0.7 min/day (10 min a month ago), about 10-12 days from its 44-min timeout. Analysis of run 40061599144 showed ~20 s of setup and the rest one serialbun testover 644 files; backend time is dominated byfreshDb()re-running all migrations at ~860 call sites.backend/test/helpers/d1.ts): the migrated schema is built once per process and eachfreshDb()/freshDbWithForeignKeys()returns an independentDatabase.deserialize()copy. Same real SQLite, same real schema; a new test proves schema equality with a from-scratch migration, copy independence and the FK pragma. Full backend suite locally: 8446 pass, 0 fail, 183 s (was 420-640 s).unit-pure-shard(matrix 1..6,--shard=i/6balanced bytest/unit-pure-timings.json) plus a gate job that keeps the required check nameunit-pure. The gate fails unless every shard succeeded, recomputes the file list itself, and requires the shards' reported list hash and counts to match it and their files run to sum to the full list, so a dropped slice cannot pass green. Mirrors the existingscrub-toolsshard pattern.scripts/ci/unit-pure-files.sh, used bytest.ymlanddeploy-backend.yml'stest-gate(left serial on purpose; it gains from the template). Stale timing comments fixed.No test was removed or weakened; the no-mock policy holds (real SQLite).
Test plan
test/workflow-yaml.test.ts,test/ci-tier-routing.unit.test.ts(61 pass); YAML parses;bash -non new run blocksunit-puregate green; compare wall time🤖 Generated with Claude Code