Repository navigation
fix(decisions): reserve capacity for requested evaluations - #174266
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR reserves one provider slot for requested evaluations by limiting optional prefilter work to three concurrent requests. Example: Three optional evaluations occupy a provider's four-slot capacity.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses current decision-provider contention, and source review found no actionable introduced production bug. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Decision runtime validates evaluation options and selects a provider; the provider host owns admission, cancellation settlement, and health, returning typed answers or an unavailable outcome. flowchart LR
A[Automatic tool prefilter] --> C[Decision runtime]
B[Explicit evaluations and plugins] --> C
C --> D[Provider host admission]
D --> E[Decision provider]
E --> F[Physical settlement]
F --> D
D --> G[Answers or unavailable outcome]
Technical reviewBest possible solution: Keep capacity reservation in the existing provider host while preserving requested-call defaults, tool-retaining fallback, and physical-settlement accounting. Do we have a high-confidence way to reproduce the issue? Current-main source admits four overlapping prefilter evaluations through the shared host, after which an explicit evaluation receives overloaded; this read-only review did not execute target code. Is this the best way to solve the issue? A typed distinction enforced by the existing admission owner solves the contention problem without parsing purpose strings, introducing a queue, or releasing canceled providers' slots prematurely. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c3798aeb0892. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +8, Tests +92, Docs +7. Total +107 across 8 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 10:03 AM ET / 14:03 UTC. |
88e6284 to
eb884fc
Compare
eb884fc to
7a1db6c
Compare
|
Merged via squash.
|
…174266) * fix(decisions): reserve capacity for requested evaluations * test(decisions): avoid shadowing provider callback
What Problem This Solves
Optional tool-prefilter decisions can occupy every provider slot, leaving no capacity for an explicitly requested evaluation.
User Impact
Optional assistance leaves the fourth physical slot available for requested decisions. Under contention the prefilter skips evaluation and retains tools. Existing callers remain requested work by default and retain the four-request limit.
Why This Change Was Made
Add an optional typed
priorityvalue to the existing Decision runtime options and enforce it at the provider host's admission owner. Purpose strings remain diagnostic text, not admission policy. Existing physical-settlement ownership continues to retain slots after cancellation until the provider finishes.This is an additive SDK option, not a configuration key. No queue, concurrency setting, provider route, or timeout default is added.
The original promotion preserved the actual squash of #174027 and the merged credential-isolation repair. During landing, main advanced and introduced a real documentation conflict. This replacement is based on the exact observed conflict anchor
3dd7f576829fd8ec1fd395acb59f3d4f9e999166; it preserves the existing V2 documentation and adds V1/V2 integration coverage rather than treating the new runtime as an unchanged context.Evidence
1948aee4628d603069662f6274f033016cb86ab8. Root reviewed the full replacement diff and V2 integration, then the mechanical cleanup-variable rename described below. The commits are signed and the source checkout is clean. Fresh scoped autoreview covered the replacement; formatting and diff checks passed.eb884fc15c83c5c15b99467fe3097e1989840551passed CI, attempt 1, with 47 successful jobs and 26 skipped. Registered admission tests passed 5/5; applicable Decision/prefilter coverage, build, lint and type checks passed. This is prior-head evidence, not proof for the replacement.7a1db6cd8aa0a5860765f1902a331ba499d2dcc3completed CI, attempt 1: 46 successful jobs, 26 skipped, one failed lint job plus its aggregate. Actual Bun shards passed V2 runtime 18 cases, admission 5 cases, prefilter 11 cases and runtime siblings; packaged build and all type checks passed. The real failure waseslint(no-shadow)in the new V2 test's cleanup loop. Current head renames that local binding fromcallbacktoreleaseGate, with no production or test-behavior change. Fresh exact-head CI is required; the failed parent run is not labeled green.1948aee4628d603069662f6274f033016cb86ab8passed CI, attempt 1: 48 successful jobs, 26 skipped, no failures. Actual tested merge12a2265fcomposed this head with main971085d5d7b88caa5a2fa8872c4e2243f84b29df. The actual Bun shards passed V2 runtime 18 cases (job), runtime 52 (job), admission 5 (job), and prefilter 11 (job). The corrected lint gate, packaged build, and all type checks passed. The earlier rejected immediate merge intent remains preserved for explicit native replacement recovery; publication itself did not retry that merge.88e6284589a6524f4c7381cd177e891b0db5a0a0retained an inherited three-alias test-type failure, matched to scheduled main run38875037669and source blobc729c259dda6ea40dd81954a607d17c4a13986e1. That prior attempt is not claimed as successful or as current-head proof.