Repository navigation
refactor(baseten): separate Decision protocol and execution - #188243
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 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.
Review scores
ProductKind: Refactor · Worth it: Yes 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +48. Total +48 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. |
d5746a7 to
14b7d2f
Compare
8ccb1d1 to
9b0a439
Compare
14b7d2f to
d6fa822
Compare
9b0a439 to
ced7804
Compare
d6fa822 to
1a4176a
Compare
197353f to
d88085d
Compare
|
Merged via squash.
|
…#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
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
git range-diff.8ccb1d12b3628251ea2fd6088439973b639c570c, 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:
d88085dd7a2464dabd5d917dd7150cc2998e052c; current-head CI passed atd88085dd7a2464dabd5d917dd7150cc2998e052c. 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:
197353f5eb5795283ec5fe69a46090090825b8cc; 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.The reviewed main reconciliation retains the canonical System One decoder.