Repository navigation
refactor(typesafe): isolate Decision and local protocol codecs - #188248
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 moves TypeSafe question, result, image, and local-server conversions into a plugin-local codec. Example: A local Kev evaluation uses score criteria [null, "Urgent"].
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored extraction preserves existing behavior, has passing current-head CI, and introduces no actionable correctness findings. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe TypeSafe plugin translates prepared Decision batches into System One requests; its lazy client validates inputs, performs guarded HTTP, validates responses, and returns typed answers. flowchart LR
A[Prepared Decision batch] --> B[TypeSafe provider]
B --> C[Plugin codec]
C --> D[Lazy validated client]
D --> E[Guarded HTTP]
E --> F[Jev or Kev server]
F --> D
D --> C
C --> B
Technical reviewBest possible solution: Keep the codec private and preserve the existing provider and client owners throughout the staged refactor. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor with no reported product defect to reproduce; no target code was executed during this read-only review. Is this the best way to solve the issue? The extraction gives two existing callers one private conversion module, removes the replaced inline code, and preserves the V1 contract until the separate V2 cutover. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 37410f5f464f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +25. Total +25 across 3 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:46 AM ET / 10:46 UTC. |
8130530 to
ed26e87
Compare
242df74 to
cbc12ff
Compare
ed26e87 to
d34dfbe
Compare
5ca9472 to
6aa1a01
Compare
5227038 to
f144f88
Compare
|
Merged via squash.
|
…law#188248) * 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 * refactor(typesafe): isolate Decision and local protocol codecs * fix(typesafe): preserve readonly Decision encoder inference
What Problem This Solves
TypeSafe Decision preparation and its native client contain inline question, result, image and local-server wire conversions.
User Impact
No user-visible behavior or configuration change. Part 14 of the Decision refactor stack, based on part 13.
Why This Change Was Made
Move the native mappings to one plugin-local codec. Keep catalog facts, credentials, prepared configuration, HTTP, timeouts, admission and response lifecycle in their existing owners. Native schema validation remains in the lazy client. The V1 bridge remains unchanged for the next slice to remove separately.
Three production files, +150/-123 lines. No new public SDK surface, configuration or framework. Existing transport, image, expressive-contract and lazy-registration tests remain.
Evidence
git range-diff.81305304ba6caac258e0822001527381f4d9dbb3, 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:
f144f882eae4bcbf2755701fdf0051fc97e6ad8c; current-head CI passed atf144f882eae4bcbf2755701fdf0051fc97e6ad8c. 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:
5227038b6527fccfc55ed2542449782f75bf8337; 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. TypeSafe retains its inline executor and native V2 execution without a V1 round trip.