Repository navigation
ci: stop a test near its time limit - #12993
Merged
Merged
Conversation
Each nextest profile now reports a test as slow at its step's per-test limit in .config/test-budgets.yaml and stops it at twice the limit, or three times in the test step, instead of after up to five minutes. A nemoclaw-build test fails when a profile's slow-timeout period and its budget drift apart. Closes #12979
Contributor
…limit # Conflicts: # .config/test-budgets.yaml # docs/contributing/testing.md
cv
enabled auto-merge (squash)
October 11, 2026 11:34
This was referenced Oct 11, 2026
cv
added a commit
that referenced
this pull request
Oct 11, 2026
Part of #12876. Follow-up to #12993, which closed #12979 before it covered the contract budgets from #12990. ## Failure #12990 gave each provider's contract tests a per-test limit in `.config/test-budgets.yaml`: 22 s for `fabric-provider::contract`, 10 s for `nemoclaw-provider::contract`, and 12 s for `openshell-provider::contract`. Nextest still stopped those tests at the `lifecycle` profile's 180 s, and the drift test from #12993 checked only the step budgets. ## Decision An override in the `lifecycle` profile for each budgeted binary, filtered by `binary_id(=NAME)` so the filter repeats the budget's key, reports its tests as slow at the binary's limit and stops them at twice that limit. That is the same margin the profile's other tests get: | Binary | Per-test limit | Stopped after | Slowest test seen, any platform | |---|---|---|---| | `fabric-provider::contract` | 22 s | 44 s | 15.0 s on linux_amd64 | | `nemoclaw-provider::contract` | 10 s | 20 s | 9.8 s on windows_amd64 | | `openshell-provider::contract` | 12 s | 24 s | 7.1 s on windows_amd64 | The times come from the lifecycle JUnit reports of the last 37 Rust runs. `each_nextest_profile_stops_a_test_near_its_per_test_limit` now also fails in three cases: - a budgeted binary has no override; - an override's period differs from its binary's limit, or it stops a test later than three times that limit; - an override has no binary budget. `Budgets::binaries` lists the binary budgets for that check. The testing guide and the budget file's header describe the overrides. ## Validation - The extended drift test failed before the overrides (`the lifecycle nextest profile has no slow-timeout override with filter "binary_id(=fabric-provider::contract)"`) and passes with them. - In a scratch crate, the pinned nextest 0.9.144 applied a `binary_id(=hang::contract)` override: the test was flagged as slow at 2 s and stopped as `TIMEOUT [4.004s]`. - `cargo nextest list --profile lifecycle` lists `fabric-provider::contract` under that binary ID, and all four profiles parse. - The `nemoclaw-build` `ci::`, archive, and timing tests pass, along with `cargo fmt --all --check` and `cargo clippy --locked --workspace --all-targets -- -D warnings`.
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.
Closes #12979
Failure
.config/test-budgets.yamllimits each test to 8 s in the test step, 90 s in each lifecycle partition, and 180 s and 120 s in the live suites, butcargo cichecks the limit only after the step finishes. Nextest stopped a test only after 300 s in theciandlifecycleprofiles, 600 s inlive-docker, and 1200 s inlive-kind, so a hung test held a runner for minutes before CI reported it.Decision
Each profile in
.config/nextest.tomluses its step's per-test limit as theslow-timeoutperiod, so nextest reports a test as slow at the limit, and stops it at a multiple of the limit. The multiple is the margin for macOS, Windows, and local runs, which only report budgets:testlifecyclelive-dockerlive-kindThe times come from the JUnit artifacts of the last 37 Rust runs. The
teststep needs three times its limit: its slowest macOS test,journey_tree_preview::minimum_inline_fixture_prints_the_questions_it_can_materialize, takes nearly twice the limit, so twice would leave about 7% headroom.each_nextest_profile_stops_a_test_near_its_per_test_limitfails when a profile's period differs from its step'stest_seconds, or when a profile stops a test later than three times the limit. It resolvesinheritsand addstomlas a dev-dependency ofnemoclaw-build, the version and featuresnemoclaw-sdkalready uses. The testing guide and the budget file's header explain how the two limits relate.The per-binary limits for provider contract tests from #12990 are out of scope. Those tests still stop at the
lifecycleprofile's 180 s, not near their 10 to 22 s limits.Validation
the ci nextest profile reports a test as slow after 30 s, but the test step allows 8 s per test) and passes after it.ciprofile, the pinned nextest 0.9.144 reported a 60 s sleeping test asSLOWat 8 s and 16 s, thenTIMEOUT [ 24.005s]. It wrote<failure type="test timeout"/>andtime="24.005"to the JUnit report.a_test_nextest_stops_is_named_with_its_time_and_limitparses that JUnit shape and checks that the budget check names the test astook 24.0 s; the limit is 8 s. This is the linecargo ciprints and adds to the job summary, enforced on Linux and reported on other platforms. Nextest also fails the step on every platform.cargo nextest listaccepts all four profiles.cargo fmt --allandcargo clippy --locked --workspace --all-targets -- -D warningspass.