Repository navigation
refactor(clawrouter): prepare caller-bound Decision catalog grants - #188244
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 separates ClawRouter catalog eligibility from inference execution and passes prepared caller inputs directly to the shared OpenAI executor. Example: Evaluate clawrouter/openai/gpt-6-luna with an eligible router key.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored refactor open in its existing stack; the pinned diff preserves current behavior and introduces no actionable defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe bundled ClawRouter Decision adapter receives a typed batch and host-prepared credentials, transport, deadline, and admission callback; it checks the caller's catalog before returning the shared executor's typed outcome. flowchart TD
A[Prepared Decision context] --> B[ClawRouter adapter]
B --> C[Caller scoped catalog request]
C --> D[Exact Luna eligibility predicate]
D --> E[Shared OpenAI executor]
E --> F[Native Decisions endpoint]
F --> G[Typed Decision outcome]
Technical reviewBest possible solution: Retain the plugin-local catalog boundary and reuse the shared inference executor while preserving per-call credentials, admission checks, and cleanup. Do we have a high-confidence way to reproduce the issue? No bug is claimed; source comparison supports behavioral equivalence, and no target code was executed during this read-only review. Is this the best way to solve the issue? The extraction keeps authorization policy plugin-owned, removes its inline predecessor, and supplies exactly the inputs already projected by the shared compatibility entry point. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4a2143b81d64. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +42. Total +42 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
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 30, 2026, 6:41 AM ET / 10:41 UTC. |
8ccb1d1 to
9b0a439
Compare
242df74 to
cbc12ff
Compare
9b0a439 to
ced7804
Compare
cbc12ff to
5ca9472
Compare
ced7804 to
197353f
Compare
5ca9472 to
6aa1a01
Compare
6aa1a01 to
514c67c
Compare
|
Merged via squash.
|
…penclaw#188244) * refactor(liquid-ai): separate Decision preparation and execution * refactor(openrouter): isolate native Decision request policy * refactor(openrouter): prepare Decision routing before execution * refactor(baseten): separate Decision protocol and execution * refactor(clawrouter): prepare caller-bound Decision catalog grants
What Problem This Solves
ClawRouter Decision evaluation combines per-caller catalog authorization with prepared inference execution.
User Impact
No user-visible behavior or configuration change. Part 13 of the Decision refactor stack, based on part 12.
Why This Change Was Made
Extract the native catalog predicate and a private catalog executor. The adapter prepares caller-bound credentials and transport, awaits catalog cleanup, then explicitly projects prepared inference inputs to the existing OpenAI executor. Catalog access stays per call, credential and endpoint; no grant cache or transferable authorization handle is introduced.
Two production files, +115/-73 lines. Model ownership, fixed inference routing, endpoint normalization, redirect policy, body bounds, reflection checks, terminal authority errors and physical release are preserved.
Evidence
git range-diff.242df7470c8319ea99a272984c1ba5a882c80f33, including the configured runtime, type, lint and guard lanes.5b235dd694af030aeb75e1ec6e831b71ce4b745c. Shared SDK source-audit evidence, the advisory API-report timeout and broader manual-campaign limitations are recorded in part01.Landing update
Current head:
514c67cdcb48ca6185f65f3b51abefbc8b693cd2; current-head CI passed at514c67cdcb48ca6185f65f3b51abefbc8b693cd2. Native landing targets main after the preceding slice merged. The own-slice commit range is patch-identical after replay onto verified landed part08dda109cacbbefd3a6dfcc442ac97e2107b6c62c8. This resolves the part09 squash-ancestry conflict and gives fresh CI a protected-main baseline. All16 replayed ranges were checked withgit range-diffand valid commit signatures. Prior CI is historical evidence at its recorded head; native review, preparation and merge checks remain required.Earlier landing evidence
Earlier head:
6aa1a01451497b116abfee41e431a87e79ac69ba; that head's CI is pending. After part04 landed, the remaining stack was replayed onto its actual protected-main commit63dbee6a514580948082dc20cb930c7e748c019eto resolve the named CI/base-context gap in part05. All 20 commit ranges remain patch-identical bygit range-diff; the allocation guard passes. Earlier CI/build evidence above remains historical. Each slice lands through the native main-targeted review, preparation, and merge workflow after its predecessor.