Repository navigation
refactor(openrouter): isolate native Decision request policy - #188235
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 OpenRouter Decision model eligibility, input restrictions, request framing, and result decoding into a plugin-local codec. Example: A Boolean decision uses typesafe/jev-1.13 with the instruction “Is this urgent?”
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a coherent, maintainer-authored refactor with no introduced correctness or security defect found, and exact-head CI passes. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe OpenRouter plugin receives prepared Decision batches and model context from the host, applies provider-specific restrictions and routing, sends guarded System One HTTP requests, and returns validated outcomes and usage. flowchart LR
A[Decision host] --> B[OpenRouter adapter]
B --> C[Plugin local codec]
C --> D[Shared System One codec]
B --> E[Guarded HTTP transport]
E --> F[OpenRouter System One]
F --> C
C --> A
Technical reviewBest possible solution: Retain one plugin-local codec for native policy and translation while the existing adapter continues to own routing and guarded transport. Do we have a high-confidence way to reproduce the issue? No user-facing bug is claimed; source comparison supports the stated behavior-preserving extraction, and no target code was executed during this review. Is this the best way to solve the issue? The extraction establishes a focused native-policy owner, reuses shared encoding and validation, migrates all predicate callers, and removes the replaced implementation without compatibility machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5310270e46cf. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +27. Total +27 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:18 AM ET / 10:18 UTC. |
6c1a53e to
defb385
Compare
0e38dad to
15f8b35
Compare
defb385 to
44028d8
Compare
15f8b35 to
32fb243
Compare
44028d8 to
196c913
Compare
196c913 to
94d220f
Compare
|
Merged via squash.
|
…w#188235) * refactor(liquid-ai): separate Decision preparation and execution * refactor(openrouter): isolate native Decision request policy
What Problem This Solves
OpenRouter native Decision wire translation and input restrictions are mixed with routing configuration and HTTP execution.
User Impact
No user-visible behavior or configuration change. Part 10 of the Decision refactor stack, based on part 09.
Why This Change Was Made
Move native model/input checks, request framing, and result decoding into one plugin-local codec. Keep routing and inherited privacy merging in the adapter. Migrate both private model-predicate callers directly; no compatibility wrapper or SDK export is needed.
Three production files, +107/-80 lines. Existing provider/index/catalog/System One and registered integration tests are retained; the fixture includes the new module.
Evidence
git range-diff.6c1a53e6980dfeb61f5f426edf8d2479ddf8e231, 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:
94d220f4e1d0c35e91d5891765daff3442817515; current-head CI passed at94d220f4e1d0c35e91d5891765daff3442817515. 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
Conflict-driven restack against main
fdba74e2a71. First landing head:defb3853cf56e6efd78340cba45f1f16fbd0901a. Prior CI/build evidence above records the earlier heads; previous landing-head CI is pending. The slice is patch-identical to its previously reviewed implementation; its ancestry now preserves the current main reconciliation.Restack after part01 landed
Part01 merged as
e5b24c1b164a1a57f49e80f676a99f5dd96db865. Main-targeted part02 then exposed a stacked squash ancestry conflict before merge dispatch. Replaying its commits onto pinned main3d7b4c47e9c8eab5c10dc98e9d9c6d316dc9c7c2and restacking the suffix resolved it without code edits. Every commit patch remains identical bygit range-diff; the allocation guard passes. Earlier head:44028d8eb1d26784d141334c1c2d0bddd4f2d1b2; that head's CI is pending. Earlier CI above remains historical evidence.