Repository navigation
Harden capacity readiness, quote expiry and request sizing - #943
Gajesh2007 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c418446d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
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. Nice work! 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". |
|
Superseded by #1051, which carries this change and its regression coverage into the coordinator subsystem layout. The replacement passed the relevant local race tests, build/lint checks, and independent source review. Please review #1051; closing this older implementation to keep one active version of the change. The branch and review history are retained. No change has been merged to master by this closure. |
Capacity operations had three discrepancies: expiry cleanup could strand a live quote collector; public readiness could advertise a provider/model pair that routing rejects; and prompt-plus-output arithmetic could overflow below a known token limit. Fix those paths using the existing delivery and routing policies, and share request-size and dedicated-pattern normalization.
Before:
After:
The request-size helper preserves negative-prompt normalization and the default output allowance. Two nonnegative
intcounts fit inuint64; only the displayedRequestTokensfield saturates at the largestintwhen the sum is unrepresentable. Unknown budgets retain fail-open behavior. Capacity inventory remains visible while readiness includes the existing public model gates and fleet-wide breaker/ejection fallback. Only affected models run the shared candidate scan with a minimal positive text reservation; healthy-but-busy peers suppress fail-open, and the read-only scan never commits or claims capacity. No wire schema, model reserve, quality-cap default, or pooled-KV numerical policy changes.All eight assigned capacity/servability production files were inspected. Stable shared/private pool reconstruction, per-class solo-rate resolution, rejection ordering and inline KV-rate storage were retained. The focused normalization removes duplication; the correctness fixes and regression coverage increase the overall diff.
Validation:
GOTOOLCHAIN=go1.25.0 go test -race ./coordinator/registry -count=1: PASS, 24.679s. Added explicit inventory-preservation assertion then reran its race test: PASS, 1.473s.CI limitation: the Threat Model Review job fails before reviewing source because its Anthropic API key returns HTTP401 (invalid key). Local race validation above is complete; credentials were not changed.