Skip to content

docs(plans): plan the test-suites work: the contract suite on nextest, a load suite, profiling - #234

Merged
aRustyDev merged 1 commit into
mainfrom
docs/test-suites-plan
Nov 16, 2026
Merged

aRustyDev merged 1 commit into
mainfrom
docs/test-suites-plan

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

A plan for the three items the crates-layout plan left for later: the contract suite onto nextest, a load suite at crates/testing/suites/load, and crates/testing/profiling/. It's in .agents/plans/test-suites/ (README.md, PLAN.md): five pull requests, each with what it changes and how it is verified.

Decisions (owner, 2026-11-16)

  • The load suite is nextest tests in a new crate, thrust-load-tests, named load_… and run by a load profile. The two probes (bench, bench_scale) leave thrust-contract-tests, where they are binaries. As tests they use the suite's library as a dev-dependency, which ADR-0009 rule 6 and check-layout.sh allow. As binaries they could not.
  • The first profiling workload is the real router in-process: the v1 routes over the memory adapters, through oneshot. dhat-rs writes its heap profile; samply writes its CPU profile through a nextest wrapper script.
  • The plan changes scripts and crates now. The CI-split plan's phases 2, 12, 13 and 14 wire the workflows later.

Measured for the plan

On main at 958be99, with cargo-nextest 0.9.140:

  • Every pass maps exactly. Each of contract.sh's 11 passes selects the same tests, name for name, as a nextest filterset. The control is main's filterset with one alternative dropped, which selects 77 tests where libtest selects 71.
  • main on a real native-memory target:
    • cargo test: 71 passed in 5.1 s.
    • nextest: 71 passed in 4.5 s, with JUnit tests="71" failures="0", so the count needs no text parsing.
    • nextest, with the OIDC tests grouped: 71 passed in 6.4 s.
  • What changes under nextest's one process per test: the mock identity provider, the suite's one piece of process-wide state, binds a fixed port. Two compat_oidc_* tests running at once can collide on it, so the plan puts them in a test group of one. The OIDC adapter fetches the key set on every call, so a key per process is safe.
  • One grouped run never reached the tests. The port contract.sh picked answered /_info with OK, and the script's own guard stopped it. That is the port-picking race behind the exit-4 flake; the plan leaves it for a fix of its own.

Plan files only, so plan-ci.py runs no job on this PR.

🤖 Generated with Claude Code

…, a load suite, profiling

The three items the crates-layout plan left for later, planned as five
pull requests in .agents/plans/test-suites/, with the owner's decisions of
2026-11-16:
- the load suite is nextest tests in a new crate, thrust-load-tests
  (crates/testing/suites/load), using the contract suite's library as a
  dev-dependency, which ADR-0009 rule 6 allows;
- the first profiling workload is the real router in-process, with a dhat
  heap profile and a samply CPU profile through a nextest wrapper script;
- the plan changes scripts and crates now, and the CI-split phases wire
  the workflows later.

Measured for the plan, on main at 958be99 with cargo-nextest 0.9.140:
- each of contract.sh's 11 passes selects the same tests as a nextest
  filterset, name for name. Control: main's filterset with one
  alternative dropped selects 77 tests where libtest selects 71;
- main on native-memory under nextest: 71 passed, JUnit tests="71"
  failures="0", in 4.5 s against cargo test's 5.1 s;
- the one process-wide piece of state is the mock identity provider on a
  fixed port. Under nextest's one process per test, the compat_oidc_ tests
  can collide on that port, so they get a test group of one. The OIDC
  adapter fetches the key set on every call, so a key per process is
  safe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit 7be2a33 into main Nov 16, 2026
14 checks passed
@aRustyDev
aRustyDev deleted the docs/test-suites-plan branch November 16, 2026 21:48
aRustyDev added a commit that referenced this pull request Nov 16, 2026
… (stage 0.2) (#236)

research/0018-gate-spike.md records what the spike (draft #232, closed) measured: five
designs against seven scenarios, and eleven facts, in two identical samples. The choice
is A+: every called workflow ends with a `verdict` job, and gate requires the callee's
result to be success and its `verdict` output to be pass. It was right on all seven
scenarios; the control (the calling job's result only) was wrong on three, the same
without the output on one, and re-actors/alls-green on two.

The measurements corrected the plan, and PLAN.md and phases/0001-foundation.md say so:

- A calling job is success when at least one job inside it succeeded, even if a planned
  sibling was skipped; with nothing inside run it is skipped. The plan had said success
  when every job inside was skipped.
- A callee's workflow-level concurrency deadlocks the run and starts no job (the group is
  built from the caller's name), and a permission its caller did not grant stops the run
  from starting, so no gate would report.
- An if that cannot be evaluated skips the job without failing it.
- actionlint refuses a broken call contract, but only inside a git repository.

Also recorded: flagship.yml (#229) on the inventory, and the test-suites plan (#234),
whose pull requests edit commands inside jobs that Phase 1 moves.

Docs only: plan-ci.py plans no job for this diff.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
aRustyDev added a commit that referenced this pull request Nov 17, 2026
PR 5 merged in #272, so all five pull requests are merged. The status
table says so, gives the plan's own merge (#234), and points at what the
plan left for later.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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