Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 8:59 AM ET / 12:59 UTC. ClawSweeper reviewWhat this changesThe PR allows Gateway HTTP handlers to create a child diagnostic span from a valid W3C Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 6 items remain Keep this PR open: it remains the active implementation candidate for the linked feature request, but it adds a security-sensitive inbound trust boundary and still lacks redacted after-fix real Gateway/proxy evidence. The patch appears bounded and CI-backed; a maintainer should confirm the product direction and require live behavior proof before merge. Priority: P3 Review scores
Verification
How this fits togetherGateway HTTP requests establish the diagnostic trace context that downstream hooks, agent runs, logs, and model-call spans inherit. This change accepts an upstream trace only at the trusted-proxy boundary, then passes a child request context into the existing HTTP handler. flowchart LR
A[Reverse proxy or orchestrator] --> B[Gateway HTTP request]
B --> C{Direct peer trusted?}
C -- No or invalid header --> D[Fresh diagnostic trace]
C -- Trusted valid traceparent --> E[Child request trace]
D --> F[Gateway request handler]
E --> F
F --> G[Hooks, agent runs, logs, model spans]
Decision needed
Why: The code introduces a new inbound observability behavior at a security-sensitive proxy boundary; implementation correctness does not decide whether this capability belongs in the default Gateway product surface. Before merge
Agent review detailsSecurityNone. PR surfaceSource +25, Tests +80, Docs +31. Total +136 across 4 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the direct-peer trust gate and fresh-trace fallback, then land only after a maintainer sponsors the HTTP-only scope and a redacted real proxy-or-orchestrator run proves trusted child-span continuation plus untrusted fallback. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: this PR adds a new HTTP trace-continuation capability, and the supplied focused tests describe the intended trusted and fallback behavior. Is this the best way to solve the issue? Unclear: reusing AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against aaab981ab097. 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 (1 earlier review cycle)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Closes #112979
AI-assisted implementation prepared with Codex.
What Problem This Solves
OpenClaw Gateway HTTP requests always started a new diagnostic trace, so an offline evaluation runner or external orchestrator could not correlate an agent invocation with its existing Langfuse or OpenTelemetry trace through standard W3C propagation.
Why This Change Was Made
HTTP requests now continue a valid W3C
traceparentonly when the direct TCP peer matchesgateway.trustedProxies. OpenClaw creates a new request span beneath the upstream parent, preserving the trace ID and flags; untrusted, missing, duplicate, or malformed headers retain the existing fresh-trace behavior.The first change is intentionally HTTP-only. It does not add configuration, change Gateway payloads, or propagate
tracestate/baggage, and it leaves WebSocket trace behavior unchanged.User Impact
Operators can attach OpenClaw HTTP agent runs to upstream experiment and workflow traces without vendor-specific protocol fields. Concurrent offline experiments can therefore remain separated by their upstream trace identity.
The OpenTelemetry documentation also explains the trusted-proxy setup and requires proxies to remove client-supplied
traceparentvalues before injecting trusted context.Evidence
server-http.request-trace.test.ts: 4 tests passed, covering:node node_modules/vitest/vitest.mjs run src/gateway/server-http.request-trace.test.ts --config test/vitest/vitest.gateway-server.config.ts --maxWorkers=1oxfmtcompleted for both changed TypeScript files.git diff --checkpassed.The local repository wrapper could not complete its broader changed-surface delegation because dependency hydration repeatedly stalled on optional native packages; hosted CI remains the full-suite authority.