Repository navigation
fix(tier3): reserve measured usage for in-flight attempts - #595
Merged
Merged
Conversation
Use the largest measured per-attempt usage to reserve concurrent work and wait for fresh accounting before admission. Release reservations on all completion paths, wake admission waiters on cancellation, and expose reservation metadata. Document admission-boundary limits and cover concurrent lifecycle behavior. Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Serialize one calibration unit and enforce measured per-attempt estimates even when no work is in flight. Distinguish estimate-based exhaustion in not-run records, metadata and budget summaries, and update concurrency tests and documentation. Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
chrisknvidia
requested review from
mosheabr,
rmalani-nv and
rng1995
as code owners
November 15, 2026 01:03
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
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.
Summary
each attempt using the largest measured usage in each bounded dimension.
projection still exceeds the cap, deny the unit rather than using the old
below-cap fallback. Preserve the budget-exhausted reason and add estimate
provenance to not-run attempts and the canonical budget summary.
cancellation. Expose calibration waits, estimate denials and unestimated
admissions in metadata.
can still exceed estimates: there is no hard currency ceiling.
This branch is independent of the budget-reporting fix.
Verification
make lintmake testmake buildFocused checks actually run:
571 passed, 3 skipped, 2 deselected, with two existing Click warnings.
Real Docker/Harbor comparison with the same 95,000-token S7 configuration:
the revision started 4 of 12 attempts, left 8 not run, and used
62,990 tokens with no observed excess. The retained base run started
8 attempts and used 133,336 tokens, exceeding the cap by 38,336. All four
admitted revision attempts were scored, with no execution or judge failures;
the process exited 0.
The calibration pair fully finished before the next pair started. Admission
then stopped below the cap because the next pair's 47,814-token estimate
would exceed remaining capacity. This demonstrates the intended denial in
this run, not a general overshoot guarantee: actual usage can exceed estimates.
Release Impact
CHANGELOG.md