Repository navigation
refactor(typesafe): evaluate Decisions directly with V2 contracts - #188251
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. |
a399bb2 to
67445ed
Compare
|
Codex review: needs maintainer review before merge. What this changesTypeSafe evaluates prepared Decision V2 requests directly and shares a documented admission predicate with the existing V1 converter. Example: Evaluate a Boolean question with typesafe/jev-latest.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored refactor removes the private V1 execution bridge without an identified behavior regression, and the reviewed head's CI gate is green. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Decision host supplies prepared model, credential, deadline, and admission facts to the TypeSafe plugin, which sends a native System One request and returns validated typed answers. flowchart LR
A[Decision host] --> B[Prepared TypeSafe provider]
B --> C[Shared admission predicate]
C --> D[Native request codec]
D --> E[Guarded TypeSafe client]
E --> F[System One endpoint]
F --> G[V2 result validation]
G --> A
Technical reviewBest possible solution: Retain the direct V2 executor, canonical compatibility predicate, and unchanged native transport and response-validation owners. Do we have a high-confidence way to reproduce the issue? This is a refactor rather than a reported runtime bug; source inspection confirms the private V1 bridge exists on main. Is this the best way to solve the issue? The change uses existing compatibility, System One encoding, and native validation owners without adding a competing execution path. 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 +3, Tests +66, Docs +6, Other +2. Total +77 across 10 files. Added test files: 0. View PR surface stats
Review metrics
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
67445ed to
9629343
Compare
ed26e87 to
d34dfbe
Compare
e0125ce to
22c13fc
Compare
22c13fc to
9e6d8eb
Compare
9e6d8eb to
1e75597
Compare
|
Merged via squash.
|
What Problem This Solves
TypeSafe's prepared V2 provider converts requests and results through a private V1 evaluator. Removing that bridge alone would silently widen accepted JSON kinds and question counts.
User Impact
No user-visible behavior or configuration change. Part 15 of the Decision refactor stack, based on part 14.
Why This Change Was Made
Encode the native TypeSafe request directly and validate the mapped result as V2. Reuse the existing System One question encoder. Keep lazy schema validation, prepared credentials/config identity, dispatch admission, cancellation, transport and native result semantics unchanged.
Extract
isDecisionBatchV1Representablein the canonical compatibility owner and expose it on the existing Decisions SDK subpath. The canonical converter and native provider share this predicate, retaining explicit JSON-scalar rejection and the 256-question ceiling without constructing a V1 request. Existing codecs/exports remain supported; no subpath or configuration is added. Document the additive predicate.Evidence
git range-diff.67445ed872fddbd944b067d638d80eb19ffc68a3, 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:
1e755970e1bece179536db8fa663f19cfd6c3702; current-head CI passed at1e755970e1bece179536db8fa663f19cfd6c3702. Native landing targets main after the preceding slice merged. Replayed only this slice onto verified landed part14c993c8f2a51aba66a3b2be6fed3c68d00ae64bdbafter observed squash-ancestry conflicts in the TypeSafe codec and adapter. The predecessor's affected source and shared compatibility/SDK contracts are byte-identical to their landed form. The own-slice range remains patch-identical bygit range-diff, with a valid commit signature. Prior passing CI41163008432 at9e6d8eb4679fd04408da2661877ef4d970549aedremains historical evidence; fresh CI and native admission are required for this head.Earlier landing evidence
Earlier head:
22c13fc3cfb92d636a884c20805f1f4f656e14dc; 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.