Document the admission-denial envelope - #72
Merged
Merged
Conversation
Sibling doc-only change to gpu-reservation-app: every reservation admission gate there now classifies its denial, so a client can tell a busy cluster from a request that can never be admitted. A denial from an admission gate carries three fields beside the human-readable detail — a published `code` naming the gate, a `retryable` bit, and an optional `not_before` for the denials that clear at a computable instant — plus a Retry-After header mirroring not_before. The status codes are unchanged, so a controller that reads only detail is unaffected; §4 now documents which denials are worth retrying, the full code vocabulary, and the rule that an absent or unrecognised code must be read as retryable. No controller code changes here. Consuming the envelope — dropping a structurally infeasible pod out of the JIT retry loop and surfacing its reason, and withholding it from the ondemand-admission offer set — is a separate effort. RESERVATION-API.md and LOG-FIELDS.md are byte-identical shared artifacts; the manifest matches the app repo's. This also carries the app side up to the on-demand cancellation-grace paragraph that had landed only here, so the two copies agree again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kSKGcRQQh4kNZBe7TJTVf
agt
marked this pull request as ready for review
August 22, 2026 22:16
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.
Sibling doc-only change to agt/gpu-reservation-app#319, which classifies every reservation admission denial so a client can tell a busy cluster from a request that can never be admitted.
RESERVATION-API.mdandLOG-FIELDS.mdare byte-identical shared artifacts — these are the same copies that land in the app repo, with a matchingSHARED-ARTIFACTS.sha256.Why it matters here
The contract told this controller that a
409means "not feasible right now — the controller may retry later". Five gates behind that status never clear by waiting: non-membership, an unattached GPU class,max_gpus_per_reservation,max_reservation_hours, and a group past itsvalid_until. A pod refused for one of them is re-offered on every tick forever, burning a create round-trip and alease.deniedWARNING each round without ever reaching a human.What the docs now say
An admission denial carries three fields beside the human-readable
detail:coderetryablenot_beforeRetry-After)§4 gains a "Which denials are worth retrying" section with the contended / scheduled / structural table, the full code enum and what each gate is, and the compatibility rule: an absent or unrecognised
codemust be read as retryable. Status codes are unchanged, so this controller is unaffected until it opts in.LOG-FIELDS.mddocuments theretryablefield and records thatreason=on the four*.deniedevents is that same published denial code — so an app line and a controller line join on the exact string.Drift reconciled
RESERVATION-API.mdwas already out of sync between the two repos: this side's on-demand cancellation-grace paragraph never landed in the app. Each manifest recorded its own copy, so both passed--checklocally while differing from each other. The app has now adopted this side's text, and the two copies agree again.No controller code changes
Consuming the envelope — dropping a
retryable: falsepod out of the JIT retry loop and surfacing its reason as a pod event or annotation, and withholding it from theondemand-admissionoffer set — is a separate effort, as agreed.Testing
pytest tests/— 1432 passed, includingtest_shared_artifacts.pyandtest_log_grammar.pyagainst the updated dictionary.Generated by Claude Code