Skip to content

refactor(clawrouter): prepare caller-bound Decision catalog grants - #188244

Merged
vincentkoc merged 5 commits into
mainfrom
refactor/decision-13-clawrouter-provider
Oct 31, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
refactor/decision-13-clawrouter-provider

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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

  • Independent fresh source review and local committed-range ClawSweeper review completed with no unresolved actionable findings. Corrective changes were reviewed separately; mechanical restacks were checked with git range-diff.
  • Exact-head ordinary CI passed at 242df7470c8319ea99a272984c1ba5a882c80f33, including the configured runtime, type, lint and guard lanes.
  • Aggregate production build passed at final production head 5b235dd694af030aeb75e1ec6e831b71ce4b745c. Shared SDK source-audit evidence, the advisory API-report timeout and broader manual-campaign limitations are recorded in part01.
  • Pinned local formatting, limited standalone lint, content hooks and diff checks passed. Local dependencies failed qualification, so no local project runtime pass is claimed.

Landing update

Current head: 514c67cdcb48ca6185f65f3b51abefbc8b693cd2; current-head CI passed at 514c67cdcb48ca6185f65f3b51abefbc8b693cd2. Native landing targets main after the preceding slice merged. The own-slice commit range is patch-identical after replay onto verified landed part08 dda109cacbbefd3a6dfcc442ac97e2107b6c62c8. This resolves the part09 squash-ancestry conflict and gives fresh CI a protected-main baseline. All16 replayed ranges were checked with git range-diff and 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 commit 63dbee6a514580948082dc20cb930c7e748c019e to resolve the named CI/base-context gap in part05. All 20 commit ranges remain patch-identical by git 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.

@vincentkoc vincentkoc self-assigned this Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 30, 2026 10:12
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Check that key's /v1/catalog, then call /v1/native/openai/v1/decisions.
  • After: The same requests use the same credentials, with catalog checking isolated in a private function.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is coherent and source-equivalent with green exact-head CI; available behavioral evidence remains at the harness level.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, behavior-preserving refactor is outside the ordinary contributor proof gate and does not materially change authority; retained production-path harness coverage and successful exact-head CI support the source review without establishing a live service run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction separates catalog authorization from inference without adding configuration, persisted state, public APIs, or competing policy owners.

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
Reviewed head: 242df7470c8319ea99a272984c1ba5a882c80f33

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point run is supplied; retained loopback and registered-host coverage supports this behavior-preserving maintainer refactor.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Native catalog predicate and caller-scoped authorization keeps the original intent (1217586: Enable native Luna Decisions only when the effective router credential grants the exact supported model and route.)
  • URL normalization dependency keeps the original intent (b66f583: Keep URL normalization independent of provider runtime loading.)
  • Inference execution and terminal authority errors keeps the original intent (1217586: Reuse the native OpenAI Decisions implementation while preserving prepared transport, deadlines, cancellation, and terminal authority failures outside the catalog catch.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b66f583 adds extensions/clawrouter/base-url.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b66f583c78ad; files: extensions/clawrouter/base-url.ts)

PR surface

Source +42. Total +42 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 115 73 +42
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 115 73 +42

Labels

Label changes:

  • add P3: This is an internal refactor with no intended user-visible behavior or configuration change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is an internal refactor with no intended user-visible behavior or configuration change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 6:41 AM ET / 10:41 UTC.

@vincentkoc
vincentkoc force-pushed the refactor/decision-12-baseten-provider branch from 8ccb1d1 to 9b0a439 Compare October 30, 2026 13:37
@vincentkoc
vincentkoc force-pushed the refactor/decision-13-clawrouter-provider branch from 242df74 to cbc12ff Compare October 30, 2026 13:38
@vincentkoc
vincentkoc force-pushed the refactor/decision-12-baseten-provider branch from 9b0a439 to ced7804 Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-13-clawrouter-provider branch from cbc12ff to 5ca9472 Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-12-baseten-provider branch from ced7804 to 197353f Compare October 30, 2026 14:27
@vincentkoc
vincentkoc force-pushed the refactor/decision-13-clawrouter-provider branch from 5ca9472 to 6aa1a01 Compare October 30, 2026 14:28
@vincentkoc
vincentkoc changed the base branch from refactor/decision-12-baseten-provider to main October 31, 2026 03:04
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: openai extensions: openrouter extensions: baseten Extension: baseten extensions: liquid-ai Plugin: liquid-ai size: XL and removed size: S labels Oct 31, 2026
@vincentkoc
vincentkoc force-pushed the refactor/decision-13-clawrouter-provider branch from 6aa1a01 to 514c67c Compare October 31, 2026 03:07
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation extensions: openai labels Oct 31, 2026
@vincentkoc
vincentkoc merged commit 5ce7a59 into main Oct 31, 2026
118 of 119 checks passed
@vincentkoc
vincentkoc deleted the refactor/decision-13-clawrouter-provider branch October 31, 2026 03:46
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: baseten Extension: baseten extensions: clawrouter Extension: clawrouter extensions: liquid-ai Plugin: liquid-ai extensions: openrouter P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant