Skip to content

test: run the adapter suites on nextest, so only the doctests stay on cargo test (test-suites PR 2) - #252

Merged
aRustyDev merged 5 commits into
mainfrom
test/adapter-suites-nextest
Nov 17, 2026
Merged

aRustyDev merged 5 commits into
mainfrom
test/adapter-suites-nextest

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

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: 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 one process per test shares nothing these suites did not share before. No test group is needed, unlike the contract suite's mock IdP.
  • CI's pg-adapter job installs nextest (setup-rust's nextest input, from test: run the contract suite on nextest, counted from its JUnit report (test-suites PR 1) #243) and runs each suite with cargo 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.sh runs 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 through adapter_row: nextest with the adapters profile and --ignore-default-filter. Each writes <name>.test.log with <name>.junit.xml beside it, the same shape as a contract.sh pass, so verdict_suite judges every row. adapter_row turns nextest's 4 ("no test ran") into 5, as contract.sh does, so the verdict says "the vacuity guard" and not "the target never came up". No row runs on cargo test any more, so the libtest judge goes: verdict_cargo, kill_check, kill_check_msg, and the test's cargo cases.
  • test-mutants-verdict.sh generates 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 use verdict_suite; no row runs cargo test; adapter_row maps 4 to 5.
  • Docs: AGENTS.md (the suites paragraph and the commands table), rules.md, running.md (the exit codes and the pg-adapter job), real-backends.md, standards.md, 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 (in status.md and mutation.md) say what was measured then, and stay as written.

Merged with #248

main gained #248 while this was in progress. It gives every row of mutants.sh one of four verdicts (KILLED, SURVIVED, UNCLEAR, DID NOT RUN), and this branch had rewritten the same functions, so mutants.sh conflicted. The merge commit takes main's mutants.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).

Check Result Control
each of the 7 adapter-suite invocations on nextest against its cargo test selection, name for name the same: pg_adapter 82, smtp_sink 7, the discard-noop row 3, count-nothing 6, smtp_wire 9, smtp_config 4, the Cloudflare email tests 99 the discard-noop filterset without model_postgres_adapter_matches: 2 where libtest selects 3
both Docker suites, cargo test against nextest all 89 pass both ways; on nextest in 54 s, against 70 s for the two cargo test runs
the pg-adapter job's two commands pg_adapter 82 passed, smtp_sink 7 passed a filterset that selects nothing exits 4, so the step fails
a row that never reached its assertion is not a kill the count-nothing row with Docker unreachable: 5 tests fail in setup, and the row is not KILLED (its needle, "statements, the model says", never appears)
test-mutants-verdict.sh under dash 286 of 286 broken copies: the #93 bug (exit 4 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
scripts/mutants.sh on the merged tree exit 0: killed=49 survived=0 unclear=0 did-not-run=0 refused=4 not-refused=0; all 12 adapter rows KILLED through verdict_suite
every command of CI's deps and ci-scripts jobs, read from ci.yml itself, shell scripts under dash 52 of 52 exit 0

.config/ and scripts/ changed, so CI runs everything.

🤖 Generated with Claude Code

aRustyDev and others added 5 commits November 16, 2026 21:00
… 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]>
@aRustyDev
aRustyDev merged commit b83ece3 into main Nov 17, 2026
39 checks passed
@aRustyDev
aRustyDev deleted the test/adapter-suites-nextest branch November 17, 2026 03:15
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