Repository navigation
test: run the adapter suites on nextest, so only the doctests stay on cargo test (test-suites PR 2) - #252
Merged
Conversation
… cargo test PR 2 of the test-suites plan. - .config/nextest.toml: an `adapters` profile for the suites that need Docker. It selects `binary(pg_adapter) | binary(smtp_sink)`, writes a JUnit report, and kills nothing, as cargo test did: the slowest test took 30 s here, and a runner is slower. Each test starts its own Postgres or Mailpit container, so nextest's process per test shares nothing those suites did not share before. - CI's `pg-adapter` job installs nextest (setup-rust's `nextest` input) and runs each suite as `cargo nextest run -p thrust-adapters-selfhosted --profile adapters -E 'binary(...)'`, two steps as before, so a failure still names its suite. - scripts/verify-all.sh: the same two commands. - scripts/mutants.sh: the adapter rows run through `adapter_row` (the `adapters` profile with `--ignore-default-filter`, so the hermetic smtp_wire, smtp_config and Cloudflare email suites can be rows too). With every row on nextest there is one kill rule: nextest exits 100 and the row's JUnit report counts a failure. The libtest checks are gone. Every one of the 7 invocations selects the same tests as on cargo test, name for name: pg_adapter 82, smtp_sink 7, and the rows' filtersets. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AGENTS.md (the suites paragraph, and the commands table's adapter row), the testing chapter (rules.md, running.md: the exit codes and the pg-adapter job; real-backends.md), the contributing pages (standards.md: the kill rule and the Postgres row; features.md: the planted Postgres bug's command, as mutants.sh runs it), the rust-test-logic skill's nextest reference, and the plan's status. Dated records that cite a run's `exit 101` (status.md, mutation.md) say what was measured then, and stay as written. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#248 gave every row of scripts/mutants.sh one of four verdicts (scripts/lib/mutants-verdict.sh), and this branch had rewritten the same functions, so mutants.sh conflicted. The merge takes main's mutants.sh, library and test whole. The next commit puts the adapter rows on nextest within #248's structure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On top of #248's verdicts. The adapter rows (pg_adapter's two, the six SMTP, the four Cloudflare email) run through `adapter_row`: nextest with the `adapters` profile and `--ignore-default-filter`, the log in `<name>.test.log` and the JUnit report beside it as `<name>.junit.xml`. That is the shape a contract.sh pass has, so verdict_suite judges both unchanged, and kill_check_suite and kill_check_suite_msg take every row. adapter_row turns nextest's 4 (no test ran) into 5, as contract.sh does, so the verdict reads it as the vacuity guard and not as "the target never came up". No row runs on cargo test any more, so the libtest judge goes: the library's verdict_cargo, mutants.sh's kill_check and kill_check_msg, the `cargo` kind of `record`, and the test's cargo section. test-mutants-verdict.sh generates its cases for the log of a contract pass and of an adapter row alike (286 checks), and checks the wiring: both functions use verdict_suite, no row runs `cargo test`, and adapter_row maps 4 to 5. Controls, each a broken copy that must fail the test, under dash: - the #93 bug (a run that never started read as SURVIVED): 32 bad; - the needle ignored: 6 bad; - adapter_row keeping nextest's 4: 1 bad; - an SMTP row back on cargo test: 1 bad. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
PR 2 of the test-suites plan (
.agents/plans/test-suites/): the adapter suites run on nextest. With #243's contract suite, every Rust test now runs on nextest except the doctests (cargo test --doc; nextest cannot run them).What
.config/nextest.toml: anadaptersprofile for the suites that need Docker. It selectsbinary(pg_adapter) | binary(smtp_sink), writes a JUnit report, and kills nothing, ascargo testdid: the slowest test took 30 s here, and a runner is slower. Each test starts its own Postgres or Mailpit container, so nextest's one process per test shares nothing these suites did not share before. No test group is needed, unlike the contract suite's mock IdP.pg-adapterjob installs nextest (setup-rust'snextestinput, from test: run the contract suite on nextest, counted from its JUnit report (test-suites PR 1) #243) and runs each suite withcargo nextest run -p thrust-adapters-selfhosted --profile adapters -E 'binary(...)'. It keeps two steps, as before, so a failure still names its suite.scripts/verify-all.shruns the same two commands.scripts/mutants.sh, inside fix(mutants): tell a row that did not run from one that survived #248's verdicts (merged in; see below). The adapter rows run throughadapter_row: nextest with theadaptersprofile and--ignore-default-filter. Each writes<name>.test.logwith<name>.junit.xmlbeside it, the same shape as acontract.shpass, soverdict_suitejudges every row.adapter_rowturns nextest's 4 ("no test ran") into 5, ascontract.shdoes, so the verdict says "the vacuity guard" and not "the target never came up". No row runs oncargo testany more, so the libtest judge goes:verdict_cargo,kill_check,kill_check_msg, and the test's cargo cases.test-mutants-verdict.shgenerates its cases for both log shapes, a contract pass's and an adapter row's (286 checks). Its wiring checks are now: both judging functions useverdict_suite; no row runscargo test;adapter_rowmaps 4 to 5.rules.md,running.md(the exit codes and thepg-adapterjob),real-backends.md,standards.md,features.md(the planted Postgres bug's command, asmutants.shruns it), therust-test-logicskill's nextest reference, and the plan's status. Dated records that cite a run'sexit 101(instatus.mdandmutation.md) say what was measured then, and stay as written.Merged with #248
maingained #248 while this was in progress. It gives every row ofmutants.shone of four verdicts (KILLED, SURVIVED, UNCLEAR, DID NOT RUN), and this branch had rewritten the same functions, somutants.shconflicted. The merge commit takesmain'smutants.sh, library and test whole. The next commit puts the adapter rows on nextest within that structure, rather than keeping this branch's simpler single rule, which could not tell "did not run" from "survived".Evidence
Every check below has a control that makes it fail (AGENTS.md rule 8).
cargo testselection, name for namepg_adapter82,smtp_sink7, the discard-noop row 3, count-nothing 6,smtp_wire9,smtp_config4, the Cloudflareemailtests 99model_postgres_adapter_matches: 2 where libtest selects 3cargo testagainst nextestcargo testrunspg-adapterjob's two commandspg_adapter82 passed,smtp_sink7 passedtest-mutants-verdict.shunder dashadapter_rowkeeping nextest's 4 1 bad; an SMTP row back oncargo test1 badscripts/mutants.shon the merged treekilled=49 survived=0 unclear=0 did-not-run=0 refused=4 not-refused=0; all 12 adapter rows KILLED throughverdict_suitedepsandci-scriptsjobs, read fromci.ymlitself, shell scripts under dash.config/andscripts/changed, so CI runs everything.🤖 Generated with Claude Code