Repository navigation
test: split oversized test files by topic and name tests by behavior - #529
Merged
Merged
Conversation
…ne nextest profile Tests use one thread per CPU; real-process tests share a two-thread group so their exit confirmation is not starved, and only the ~15 slowest tests get priority. Soak tests form a group the pull-request gate leaves out and `cargo xtask check --full` runs. The hand-picked test-exact steps become a nextest `platform` profile whose selection CI diffs against .config/platform-tests/<os>.txt; the two Windows jobs merge into one. `cargo xtask lint` requires every Windows- or macOS-only test to be listed. Adds a 14-day quarantine list with a lint, a gate exclusion and a non-blocking stress job, starting empty. The devcontainer job runs only when its inputs change or off pull requests; the minimal core profile runs as its own job.
…p instead of doc comments
…he always-None harness parameter
…harness test and the ignored R4 diagnostic
…he novel-read runtime run
…l compaction test
…stead of migrating them Schema 25 shipped in v0.0.1. Steps 1-24 only served unreleased builds, so they go together with their tests, and opening an older store now fails with SessionRuntimeError::UnsupportedStoreSchema.
Seeds at unreleased schemas (27, 29-31, 40-42, 45-49, 51-57, 60-63) move to the nearest released schema below them (26, 28, 39, 43, 50, 58). Tests whose seeded state never existed in a released store (goal rows before 58, the experimental 48 notice build) are deleted.
With an active goal the scheduler queues a goal-origin run as soon as the goal is set. Under load it was claimed before the fixture's prompt, so the report counted the prompt's tool events (zero) while the goal run did the work. The fixture now follows the queued goal run, with a per-run turn cap that fits the scripted workload.
One checked goal now covers the real kills, waits, outages, interleaved prompts, achievement through the check, and then a replacement goal that runs out its deadline, which the unchecked soak used to prove.
The perf run keeps its 560 paced 1 KiB chunks. The test streams 8 KiB chunks with no pause, which still commits over 512 events, the gate it checks. The captured-output timeout test waits 100 ms instead of 1 s.
The in-run compaction scripts spawned about 640 shells only to produce 6 KB results. A test tool now returns the same stored bytes (the bounded 2,051-byte shell result), so every test compacts exactly as many times as before. The verbatim-goal test runs 30 turns instead of 72, which still compacts five times per row.
A 5 s limit made each case wait 5 s. On one loaded core the run needs about 520 ms to reach the hung summarizer (22 ms unloaded), so 500 ms failed under stress while 2 s passed 40 of 40.
Each run reads three 90 KiB notes instead of one, so the window-less session crosses the point where stale reads must be shed after about 40 runs instead of 140. The assertions are unchanged.
Moves test items verbatim into sibling modules (no mod.rs). Paths in nextest filters, platform lists, worker re-exec strings and the legacy-sleeps baseline follow the new module paths; test names are unchanged.
Drops the ab1-ab6, ac4 and t20 prefixes, renames the ab2_contract, ab2_header_authority and t20 modules, and updates the nextest filters, platform lists and worker re-exec strings that named them.
Collaborator
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Stacked on #528. (#528 has merged; this PR merges
origin/mainand targetsmain.)Change
Test-only. These are moves and renames: no assertion, fixture body or test logic changed.
E3: split oversized test files by topic (sibling
foo.rs+foo/, nomod.rs):qq-core sessions/tests.rs: side-question tests and helpers →tests/side_questions.rs. Owned-summary tests →tests/compaction/owned_summaries.rs. Fixtures used by only one topic module now live in that module.sessions/tests/goals.rs→goals/{notices,spend,driver,policy}.rs.sessions/tests/compaction.rs→compaction/{auto_compaction,pruning,folding,in_run,exact_inputs,owned_summaries}.rs.sessions/tests/delegation.rs(5.4k, not in the finding but over the limit) →delegation/{spawning,lifecycle,write_children,budgets,depth,audits}.rs.tools.rsmod tests→tools/tests.rs+tools/tests/{dispatch,argument_repairs,read,search,tree,edit,shell}.rs. Paths to the real tool modules inside those files are now written ascrate::tools::<tool>::, because the test module names shadow them.qq-core lib.rsmod testsandmod ab1_audit_regression→src/tests.rs+src/tests/{summaries,instructions,tool_loop,truncation,checkpoints,retries,mcp,delegation,external_tools,audit_regression}.rs.lib.rsgoes from 11.3k to 1.8k lines.src/headless.rstests →src/headless/tests.rs+src/headless/tests/{foreground_goal,resume,output,cancellation,budgets,delivery_history}.rs.qq-host runtime.rstests →runtime/tests.rs+runtime/tests/{clients,resolved_models,spawn_validation,goal_policy,catalog,providers,plans,plan_compilation}.rs.Every test file touched is now under 3,000 lines except
sessions/tests/runs.rs(3,179), which grew by about 600 lines of runs-only fixtures.sessions/tests.rsis down to 2,949 lines of shared fixtures.E4: name tests by behavior. 105 tests drop their
ab1_–ab6_,ac4_ort20_prefix. 102 of them just lose the prefix, because the rest of the name already describes the behavior. Three get a new name:ab4_inspection_only_descriptor_differs_from_prompt20_identity→inspection_only_descriptor_differs_from_prompt_version_20t20_strict_refuses_only_unprefixed_contained_reads_and_keeps_hints→strict_builtin_preference_refuses_only_unprefixed_contained_reads_and_keeps_hintsab3_native_zero_row_window_returns_a_budget_error→native_zero_row_window_returns_a_budget_error(Windows only). Dropping the prefix alone would leavezero_row_window_…, which reads like the separatetools::readtest of a similar name.Modules
runtime::prompt::ab2_contract,ab2_header_authorityandtests::t20becomecontract_tests,header_authority_testsandtests::dispatch_corrections. No collisions.References updated.
.config/nextest.toml(real-process, priority and platform filters),.config/platform-tests/{windows,macos}.txt, the worker re-exec test paths passed torun_worker/--exact(tools::tests::shell::commands_see_…,runtime::tests::providers::google_…_child, and the renamedinherited_path_…,verified_exec_…,verified_process_…,verified_image_…workers),xtask/src/legacy-sleeps.txt(same 11 sleeps at new paths and lines), and ADR 0014'sheadless::tests::output::…path..config/quarantine.tomlis empty..github/workflows,docs/guide,docs/runbooks, andxtaskcheck.rs,perf.rs,smoke.rsandlint.rsname none of these tests. The oneab2_string left is a made-up name insidecheck.rs's nextest-output parser fixture. Ther4_names inperf.rsare perf metric and worker function names, not tests.grep -rnfinds no other old name.Verification
origin/mainvs this head after the merge.cargo nextest list --workspace --all-featuresonorigin/main, with the map below applied, is exactly the sorted list on this head. 704 tests change (602 path-only, 102 renames). Three more Windows-only tests (one renamed in place, two moved and renamed) are verified against the source, since Linux can't list them.cargo nextest show-config test-groupshas the same real-process and soak membership before and after, modulo the map..config/platform-tests/*.txtresolves to afnat that module path, and everytest(=…)in.config/nextest.tomlnames a listed test or a platform-list entry.cargo xtask lintpasses, platform rule included. The OS-side list check (.github/scripts/platform-tests.sh) runs in theci:fullplatform jobs..rsfiles before and after the split matches, apart from the removedmod tests {, the dedent and the newmod/use super::*lines.cargo nextest runon all 704 moved or renamed tests: 704 passed. That includes the re-exec workers, which fail if their path string is wrong.cargo xtask check --full: passed on d53ffc4 (fmt, lint, clippy, 3,002/3,002 tests, minimal provider profile).Known impact
None for users. Rerun commands and filters that named old paths need the new ones from the map. There is no Windows toolchain here, so the Windows-only
#[cfg(windows)]tests that moved (tools::tests::read::native_*,tools::tests::shell::{dropped_windows_shell_waiter…, windows_shell_timeout…}) were checked against the source, not compiled. Theci:fullWindows job compiles them.Rename and move map (707 tests, grouped by old module => new module)