Repository navigation
AriadneMounts: budget tests that don't depend on runner speed - #1605
Merged
Merged
Conversation
ABusyMountIsHeldToItsBudgetWhileTheOthersRun gave the busy mount 5000 steps a frame. Each frame's pump stops at its own backstop (kPumpMaxSeconds, 0.1 s, half of it CPU time) whatever the mounts' budgets, and a mount the backstop cut short has not spent its budget, so it is not held that frame. The loaded Debug coverage runner of #1595 fit 4000 to 5000 of the busy loop's steps in a pump, so the mount was held some frames and not others: not held at the end, no notice, no Quit in the Budgets window. The budget is now 250 steps (500 after Allow more), several times under that; the checks scale with it. TheShippedExamplesKeepWithinTheLocalBudget held every example to the local default's 25 ms a frame, which is wall-clock time: a loaded machine stretches a frame without bound while it runs something else. Each entry's budget.time is now 0, so a hold is its steps' or its memory's, still checked at the defaults in every build. The seconds are checked in an optimized build only, on every frame but each example's 5 busiest.
transfix
enabled auto-merge (squash)
November 28, 2026 01:34
transfix
added a commit
that referenced
this pull request
Nov 28, 2026
package-linux / libcvc-debug failed on AriadneMounts.ABusyMountIsHeldToItsBudgetWhileTheOthersRun and on the runtime test's slice256 and threads_auto variants: the wall-clock budget checks that #1605 makes independent of runner speed. #1605 is a single commit (345d0be) to src/cvc/tests/ariadne_runtime_test.cpp. When it squash-merges, master gets the identical change, so this branch still merges clean and its own diff is unchanged.
transfix
added a commit
that referenced
this pull request
Nov 28, 2026
transfix
added a commit
that referenced
this pull request
Nov 28, 2026
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.
Two
AriadneMountstests from SH1 (#1566) failedpackage-linux / libcvc-debugon #1595, which changes only docs (run 46067080370, job 140734893768).ABusyMountIsHeldToItsBudgetWhileTheOthersRunfailed 9 of 9 tries andTheShippedExamplesKeepWithinTheLocalBudget2 of 9. Both depended on runner speed. This PR changes only the tests. The runtime's budget semantics andkPumpMaxSecondsare unchanged.1.
ABusyMountIsHeldToItsBudgetWhileTheOthersRunCause. The busy mount had a budget of 5000 steps a frame and no time limit. Each frame's pump (
pump_frame→sync_run(kPumpMaxSteps, kPumpMaxSeconds)) also stops at its own 0.1 s backstop, whatever the mounts' budgets. The backstop is atime_budget: 50 ms of wall clock, then 50 ms of the thread's CPU time. When the backstop ends a pump before the mount spends its 5000 steps, the mount isn't parked, soframe_account::last_heldis false for that frame. On #1595's runner a pump fit 4000 to 5064 of the busy loop's steps. So the mount was held some frames and not others:Confirmed locally. The MSVC Release build runs 5000 busy steps in about 0.65 ms, so the 0.1 s backstop never binds there. With
kPumpMaxSecondstemporarily set to 0.0011 s (a scaled stand-in for the slow runner; not committed), a pump fit 2500 to 3300 steps. The old test then failed with #1595's exact set:b->heldfalse,budget.held"0", no notice, emptyon, and Quit never stopping the mount.Fix. The budget is now
kSteps = 250(500 after Allow more), several times under what the slow runner fit in a pump. The checks scale with it:mostis at mostkSteps + 64and at leastkSteps * 4 / 5,max_stepsmatches, and Allow more makes it2 * kSteps. The test still checks that the mount is held, not killed; that the other mount runs every frame; that the notice comes once; that Allow more doubles the budget; and that Quit stops it. Under the same 0.0011 s backstop the new test passed 5 of 5, held every frame.2.
TheShippedExamplesKeepWithinTheLocalBudgetCause. Every example was held to the local default's 25 ms a frame, and a mount's seconds are steady-clock time per step. A loaded machine stretches a frame without bound while it runs something else. On #1595,
nav_fleet_swarm.arimeasured 9.5 to 28.6 ms in its busiest frame in the Debug coverage build. It was held at 28.6 ms in one try and at 11.9 ms in another, where the held frame was probably the one frame the test doesn't sample.Choice: steps and memory checked strictly in every build; seconds checked in an optimized build only, on every frame but each example's 5 busiest.
budget.timeis 0, so a hold can only come from steps or memory. Those are still checked at the defaults in every build:EXPECT_FALSE(held), plus steps under a quarter of the default.NDEBUG, and sanitizer builds are excluded, as instate_exec_async_calls_test. A Debug build prints its seconds but doesn't check them.ms/usualcolumn (all but the 5 busiest frames), and the summary line prints it next to the busiest.Verification (CMPS-A91453, MSVC 14.44 Release, Windows 11)
CVC_EXEC_SLICE_STEPS=256and withCVC_EXEC_THREADS=auto: 10/10 each.ms/usualcolumn stayed at or under 0.65 ms. Slice-256 and threads-auto passed 10/10 each with load for at least part of those runs.ariadne_runtime_test: 380/380. Slice-256 whole binary: 380/380.CVC_EXEC_THREADS=auto, filter-AppLockManager.*: 373/373.git-clang-formaton the changed lines: clean.package-linux / libcvc-debugjob is the check there.