Repository navigation
test: run the contract suite on nextest, counted from its JUnit report (test-suites PR 1) - #243
Merged
Merged
Conversation
…from its JUnit report
PR 1 of the test-suites plan. Every pass of scripts/contract.sh (11) and
scripts/stage2-contract.sh (13) is now one call,
`suite_pass <bin> '<filterset>' [nextest args]`, which runs
`cargo nextest run -p thrust-contract-tests --profile contract
-E 'binary(<bin>) & (<filterset>)'`. The filtersets select exactly what
the libtest filters did, name for name, for all 24 arms.
- .config/nextest.toml: a `contract` profile (JUnit on, no fail-fast, no
kill: its own override outranks the default profile's prop|model
timeout) and a `mock-idp` test group of one thread for the
compat_oidc_ tests. Under nextest each test is a process, and each of
those starts the mock identity provider on the one fixed port the
target was given.
- The count guard (ADR-0121) reads the passed count from nextest's JUnit
report, which the scripts keep beside the pass's log
(`<log>.junit.xml`), not from libtest's `test result:` line. nextest's
exit 4 ("no test ran") becomes 5, because contract.sh's 4 already means
the target never came up. A test failure is nextest's 100, passed
through.
- --test-threads=1 --nocapture becomes --no-capture (serial, output
passed through). The `mail` pass, which ran in parallel with
--nocapture, stays parallel and prints each test's output as it
finishes.
- scripts/check-contract-counts.sh lists each arm's filterset with
`cargo nextest list --message-format oneline` and counts the lines. Its
records are tab-separated, because a filterset holds `|`. The self-test
is rewritten for the new arm shape, and adds two cases: an arm whose
filterset is not single-quoted.
- scripts/mutants.sh: a contract-suite row is killed when nextest exits
100 and the row's JUnit report counts a failure. A build that failed
(101) is no longer a kill. The adapter rows (pg_adapter, smtp_*, the
Cloudflare email tests) keep the cargo test check until PR 2 moves them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AGENTS.md: the contract suite runs on nextest with the `contract` profile; only the Postgres and SMTP adapter suites stay on cargo test, until PR 2 of the test-suites plan. - docs/src/testing: rules.md, running.md (the exit codes; what a pass runs), evidence-and-controls.md (the count guard and check-contract-counts.sh read nextest), techniques/contract-suite.md (an arm is a filterset; the OIDC test group). - docs/src/contributing/standards.md: what a kill needs, per kind of row. - The rust-test-logic skill's nextest reference: this repository's suite has been migrated, and how. - The plan: stage2-contract.sh has 13 passes (it said 14), and PR 1's status. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first CI run of this branch failed `contract (worker-memory, sweeper)` with `nextest exit=101` 60 ms after the target came up: cargo-nextest was installed only in the `hermetic` job, so `cargo nextest` was no such command in a contract cell. Locally nextest is installed, so the local runs could not show it; CI did, and failed closed. setup-rust gains a `nextest` input (and `nextest-version`, 0.9.140, the one pin), installing it with the same pinned taiki-e/install-action the hermetic job used. It is on for `hermetic` (whose own install step goes), `mutants`, the contract cells (contract-cell.yml, which the e2e schedule also calls) and flake-hunt.yml: every job that runs scripts/contract.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
aRustyDev
added a commit
that referenced
this pull request
Nov 16, 2026
main moved by five commits while CI ran on this branch, among them the contract suite on nextest (#243), which edits plan-ci.py, test_plan_ci.py, ci.yml and cicd.md as this branch does. The merge is textually clean; it was tested before it was committed, because a clean merge of two CI changes is not evidence that they agree: - test_plan_ci.py: 6,761 checks pass - test-ci-scripts.sh under dash: 173 cases pass - mutate_gate.py: 53 of 53 mutants killed, none broken (so every text a mutant replaces is still found exactly once in the merged files), and both equivalent mutants survive - lint-all-workflows.sh exits 0 on the merged ci.yml Co-Authored-By: Claude Sonnet 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 1 of the test-suites plan (
.agents/plans/test-suites/): the contract suite runs on nextest. It was the last Rust suite oncargo testwhose scripts parse libtest's text. The Postgres and SMTP adapter suites follow in PR 2.What
scripts/contract.sh(11) andscripts/stage2-contract.sh(13) is nowsuite_pass <bin> '<filterset>' [nextest args], which runscargo nextest run -p thrust-contract-tests --profile contract -E 'binary(<bin>) & (<filterset>)'. Flags map directly:--test-threads=1 --nocapturebecomes--no-capture. Themailpass ran in parallel with--nocapture, so it stays parallel and prints each test's output as it finishes..config/nextest.tomlgets acontractprofile: JUnit on, no fail-fast, and no kill. Its own override outranks the default profile'sprop|modeltimeout, which would otherwise kill a model test after 5 minutes. The profile also gets amock-idptest group of one thread for thecompat_oidc_*tests.<log>.junit.xml, not from libtest'stest result:line.contract.sh's 4 already means the target never came up.scripts/check-contract-counts.shlists each arm's filterset withcargo nextest list --message-format onelineand counts the lines. Its records are tab-separated, because a filterset holds|. Its self-test is rewritten for the new arm shape and has two new cases: an arm whose filterset is not single-quoted.scripts/mutants.sh: a row run throughcontract.shis killed when nextest exits 100 and the row's JUnit report counts a failure. A build that failed (101) is no longer a kill. The adapter rows (pg_adapter,smtp_*, the Cloudflare email tests) keep thecargo testcheck until PR 2 moves them.rust-test-logicskill's nextest reference.Why the OIDC tests need a group
Under nextest each test is a process of its own. The suite's mock identity provider (
src/mock_idp.rs) is a per-processOnceLockbound to the one fixed port the target was given as its issuer. Eachcompat_oidc_*test therefore starts its own provider on that port, and two running at once collide. A key per process is safe:thrust-adapters-oidcfetches the discovery document and the key set on every call, and each flow runs inside one test.Evidence
Every check below has a control that makes it fail (AGENTS.md rule 8).
main71,stage2 main65, …)main's filterset withcsrf_off_dropped selects 77 tests, where libtest selects 71;stage2 bindingswithoutversion_metadataselects 4, where it selects 3contract.shnative-memory: main 71, sweeper 3, csrfoff 6, panic 1, engine 4, mail 7.worker-memory: main 71, cron 1.worker-cfworker 1 (itsHIBERNATION-OBSERVATIONline still passes through).native-pgbudget 1. Each equals itsEXPECTmain's filterset narrowed by 3 tests: exit 5, "exit 0 but passed count != expected". A filterset that selects nothing: exit 5, "no test ran (nextest exit 4)"mock-idpgroupcompat_oidc_*tests at-j 3, ten runs: 0 failedscripts/mutants.shmainrun with no mutant (71 passed) reads SURVIVED. Theignore-tenantrow (7 of 71 failed) reads KILLED and lists them. Exit 101 with no report reads SURVIVEDscripts/check-contract-counts.shstage2 maincount) refused;--self-test18 casesdepsandci-scriptsjobs, shell scripts under dashmainmerged in. It moved 7 commits, among them #224 (the port fix, which also editscontract.sh), and the merge was clean. On the merged tree the counts guard passed, andnative-memorymain and mail passed (71, 7).worker-memory workeris not a cell, and this PR does not change that. It fails at the WebSocket connect (worker_only.rs:57) onmain's owncargo testscript, at the same line.contract-all.shrunsworkeronworker-cfonly, where it passes.Found by CI on the first push.
contract (worker-memory, sweeper)failed withnextest exit=10160 ms after its target came up. cargo-nextest was installed only in thehermeticjob, so in a contract cellcargo nextestwas not a command. The local runs could not show this, because nextest is installed here. The fix (third commit):setup-rustgains anextestinput andnextest-version, which is now the one pin (0.9.140). It installs nextest with the same pinnedtaiki-e/install-actionthe hermetic job used, and is on forhermetic(whose own install step is gone),mutants,contract-cell.ymlandflake-hunt.yml. That covers every job that runsscripts/contract.sh. The workflow lint and all 46deps/ci-scriptssteps pass with it..config/andscripts/contract.shchanged, so CI runs everything.🤖 Generated with Claude Code