Skip to content

refactor(baseten): separate Decision protocol and execution - #188243

Merged
vincentkoc merged 4 commits into
mainfrom
refactor/decision-12-baseten-provider
Oct 31, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
refactor/decision-12-baseten-provider

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Baseten Decision evaluation mixes native request/result conversion, prepared host context, and HTTP execution.

User Impact

No user-visible behavior or configuration change. Part 12 of the Decision refactor stack, based on part 11.

Why This Change Was Made

Extract the Baseten codec and give its private executor explicit lifetime, model and credential facts plus synchronous transport preparation. The plugin retains eligibility and native protocol policy. Keep the existing lazy runtime wrapper, strict legend/token validation, bearer suppression, credential reflection protection, response bounds and awaited transport release.

Two production files, +213/-165 lines. The growth defines a private boundary; no new framework, configuration, retry, cache or SDK surface is added.

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 8ccb1d12b3628251ea2fd6088439973b639c570c, 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: d88085dd7a2464dabd5d917dd7150cc2998e052c; current-head CI passed at d88085dd7a2464dabd5d917dd7150cc2998e052c. 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: 197353f5eb5795283ec5fe69a46090090825b8cc; 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.

The reviewed main reconciliation retains the canonical System One decoder.

@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 Baseten Decision encoding and decoding from HTTP execution and narrows the private executor’s inputs.

Example: Evaluate a refund request with elephant-1 and Boolean, choice, and urgency questions.

  • Before: One runtime module converts the rubric, performs HTTP execution, and validates the answers.
  • After: A private codec converts the rubric and answers while the executor preserves the same request and result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-equivalent with green exact-head CI; runtime confidence is limited to supporting tests and source inspection.
Proof confidence 🦐 gold shrimp (3/6) Evidence consists of source comparison, existing mocked provider tests, and exact-head CI rather than a shipped-entry-point run; this maintainer-authored internal refactor is outside the ordinary contributor proof gate and does not materially change authority.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: Maintainer-authored direction supports this bounded separation of protocol and execution responsibilities while preserving existing contracts.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the focused extraction preserves existing behavior, and review found no actionable introduced defect.

Priority: P3
Reviewed head: 8ccb1d12b3628251ea2fd6088439973b639c570c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not exercise the extracted runtime through a shipped Decision entry point against Baseten.
Agent review details

How this fits together

The Baseten plugin receives a prepared Decision batch, model, credentials, and caller lifetime from the host, sends a guarded System One request, and returns a validated outcome.

flowchart LR
  A[Decision host] --> B[Lazy Baseten adapter]
  B --> C[Private executor]
  C --> D[Baseten codec]
  C --> E[Guarded HTTP transport]
  E --> F[System One endpoint]
  F --> E
  D --> G[Validated Decision outcome]
Loading

Technical review

Best possible solution:

Retain this private extraction with the existing host authority, lazy loading, protocol validation, and transport lifecycle owners.

Do we have a high-confidence way to reproduce the issue?

This PR claims a behavior-preserving refactor rather than a reproducible product bug; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The extraction gives protocol conversion one plugin-local home and narrows execution inputs without adding competing policy, persistent state, retries, or SDK surface.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4a2143b81d64.

Provenance checked

  • Baseten request encoding and result validation keeps the original intent (bff1d86: Provide native System One support for elephant-1 and mammoth-1 while preserving typed answers, backend identity, and token usage.)
  • Baseten prepared transport and execution lifetime keeps the original intent (bff1d86: Use prepared authentication, guarded HTTP, deadlines, live dispatch admission, and physically awaited cleanup under the existing Decision host.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit bff1d86 adds extensions/baseten/decision-provider.runtime.ts:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bff1d869fcef; files: extensions/baseten/decision-provider.runtime.ts)

PR surface

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

View PR surface stats
Area Files Added Removed Net
Source 2 213 165 +48
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 213 165 +48

Labels

Label changes:

  • add P3: This is an internal refactor with no intended user-visible behavior, configuration, or public API 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, configuration, or public API 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-11-openrouter-execution branch from d5746a7 to 14b7d2f Compare October 30, 2026 13:37
@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-11-openrouter-execution branch from 14b7d2f to d6fa822 Compare October 30, 2026 13:58
@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-11-openrouter-execution branch from d6fa822 to 1a4176a Compare October 30, 2026 14:28
@vincentkoc
vincentkoc changed the base branch from refactor/decision-11-openrouter-execution to main October 31, 2026 03:04
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: openai extensions: openrouter extensions: liquid-ai Plugin: liquid-ai size: XL and removed size: M labels Oct 31, 2026
@vincentkoc
vincentkoc force-pushed the refactor/decision-12-baseten-provider branch from 197353f to d88085d Compare October 31, 2026 03:06
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation extensions: openai labels Oct 31, 2026
@vincentkoc
vincentkoc merged commit 7d5130f into main Oct 31, 2026
116 of 117 checks passed
@vincentkoc
vincentkoc deleted the refactor/decision-12-baseten-provider branch October 31, 2026 03:42
@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
…#188243)

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: baseten Extension: baseten 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