Repository navigation
fix(opencode-go): attach stable session routing per turn - #143558
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. Reviewed September 10, 2026, 3:02 AM ET / 07:02 UTC (Revision 5). ClawSweeper reviewWhat this changesAdds automatic OpenCode Go session-routing headers to managed and standalone Chat Completions and Responses requests while preserving explicitly configured headers. Merge readiness✅ Ready for maintainer review Keep open: the sessionless request gap remains on current main, and the earlier merged fix does not cover it. Prior correctness findings are resolved; no new actionable defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s model transports turn agent and simple-completion requests into provider API calls. The OpenCode Go plugin supplies routing identity, which the transports attach before sending requests. flowchart LR
A[Agent or simple completion] --> B[Model transport]
B --> C{Explicit session header?}
C -->|Yes| D[Preserve configured identity]
C -->|No| E[OpenCode Go provider hook]
E --> F[Conversation ID or generated turn ID]
D --> G[Provider API request]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +55, Tests +180. Total +235 across 10 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep native Go routing identity in the provider hook, with explicit headers authoritative and sessionless requests receiving a per-call fallback. Do we have a high-confidence way to reproduce the issue? Yes, at the source level: a sessionless Go request without an explicit header exits the current-main resolver without routing identity. The PR reports matching live HTTP 400 failures; this review did not execute provider requests. Is this the best way to solve the issue? Yes. Reusing the documented provider hook reaches both affected transport families while preserving caller configuration and avoiding a new public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b280237832a0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
d97491e to
ab1a305
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…3558) * fix(opencode-go): send stable session routing header * fix(ai): apply provider turn state to simple completions * test(agents): isolate retry projection transport state
Summary
x-opencode-sessionthrough provider turn state for native OpenCode Go endpointsRelease-validation evidence
Full Release Validation run 34418806238 failed all six OpenCode Go live probes with HTTP 400 because sessionless requests lacked
x-opencode-session. The shared provider turn-state hook now reaches both affected transports while explicit configured identity retains precedence.Failing job: https://github.com/openclaw/openclaw/actions/runs/34418865241/job/102691864264
Test plan
provider-transport-session-headers.test.ts(14 passed; real fetch-egress coverage for both transports and explicit header precedence)extensions/opencode-go/index.test.ts(39 passed)pnpm check(passed)