Repository navigation
refactor(decisions): separate OpenAI protocol from guarded execution - #188228
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. |
99fb786 to
cb577ec
Compare
|
Codex review: needs changes before merge. What this changesThis PR extracts the OpenAI Decisions codec and adds an explicit prepared-input executor while preserving the existing SDK helper. Example: Evaluate a Boolean question about a damaged parcel.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored refactor open: the extraction preserves existing behavior, and no actionable code defect was found. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherOpenAI and ClawRouter Decision providers supply prepared route, credentials, transport policy, and lifetime facts to a shared SDK runtime that sends guarded HTTP requests and returns typed answers. flowchart LR
A[Decision provider] --> B[Prepared execution inputs]
B --> C[Shared SDK executor]
C --> D[OpenAI protocol codec]
C --> E[Guarded HTTP transport]
E --> F[Decision endpoint]
F --> D
D --> G[Typed outcome]
Technical reviewBest possible solution: Keep one protocol codec and one guarded executor, retaining the supported context helper as a projection into that executor. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; source comparison supports the stated extraction without establishing runtime execution. Is this the best way to solve the issue? The extraction is coherent and minimal: protocol logic moves once, guarded execution retains ownership, and the existing public helper preserves compatibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5310270e46cf. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +48, Docs +7. Total +55 across 3 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:13 AM ET / 10:13 UTC. |
cb577ec to
56e8dd6
Compare
33fd5fd to
b1049a6
Compare
56e8dd6 to
1404ebf
Compare
1404ebf to
85390ca
Compare
b1049a6 to
0ec7a48
Compare
|
Merged via squash.
|
…penclaw#188228) * refactor(decisions): centralize scoped consumer execution * refactor(decisions): keep consumer evaluation receipts opaque * refactor(decisions): avoid shadowing consumer runtime names * refactor(decisions): separate OpenAI protocol from guarded execution
What Problem This Solves
The shared OpenAI-compatible Decision helper mixes wire translation with a broad prepared host context and guarded HTTP execution.
User Impact
Provider behavior and the two existing SDK functions remain supported. This adds an explicit prepared-input executor on the existing SDK subpath; no new subpath, dependency, or configuration is introduced. Part 06 of the maintainer-directed stack, based on part 05.
Why This Change Was Made
Move protocol support, request encoding, and response decoding into a dependency-light Decision codec. Keep guarded execution in the existing SDK family runtime, with explicit route, auth, transport, and lifetime inputs. The supported context-based helper delegates to that executor. Existing HTTP boundary tests retain their interception point.
Evidence
git range-diff.cb577ec3e0daee4a81dcc83cc402759ae9f3080c, 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:
85390caf12cfbdcfb39890af776f3b4b90465e3f; current-head CI passed at85390caf12cfbdcfb39890af776f3b4b90465e3f. Native landing targets main after the preceding slice merged. 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.Earlier required-gate interruption
CI41071228246 failed its required aggregate job124119194233. The check annotation states
check-lint-hosted-core-shard finished with abandoned (selected=true). Its missingcheck-lint-core-2job/check124117307936 still projects queued, with no completion or annotations. The inspected56-job page contains24successful jobs and no failed test/lint/type shard; coverage for the missing lint shard is unproven. The failure classifier says the jobs have not all completed. The initiating platform condition remains unlocalized; no rerun or inherited-failure exception is claimed.