Conversation
…ll, WebSocket and diagnostic site (Wave 3b of #3233) (#3237) Every remaining request-constructing model.call / callStream / gateway.chat site passes logContext: { correlationId } from the request, run or job in scope; WebSocket sessions resolve one id per connection at upgrade; diagnostic sites that minted a fresh id per failure thread the request/run/job id or mint once per operation and set parentCorrelationId; the buffered chat path and grounded QA share emitGatewayErrorDiagnostic with the streaming path. A correlation id that is honestly unknown is the shape-valid sentinel UNKNOWN_CORRELATION_ID instead of the 7-character "unknown", which the diagnostic writer's sanitizer rewrote to its invalid-id marker. Op catalog and package coverage baseline regenerated; no floor lowered. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Your free Security trial is over. An organization admin can activate billing to continue. |
|
Warning Review limit reached
Next review available in: 14 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (86)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Superseded by #3247, which now integrates this branch together with the other open logging-epic branches (Wave 3b, Wave 4a incl. all 16 review repairs, Wave 5, reviewer-audit repairs) into one pull request at the repository owner's request — each separate merge restarted the full gate matrix on the others. This branch's commits are merged into #3247 unchanged ( |



Summary
Wave 3b of epic #3233 — the call-site half of Wave 3 (Wave 3a, #3241, shipped the gateway-layer contract). Every remaining production site in
keiko-serverthat constructs a model request now passeslogContext: { correlationId }from the request, run or job in scope, so a gateway retry, circuit-breaker transition or provider error line carries the same id as the BFF request that triggered it; WebSocket sessions resolve one id per connection; diagnostic sites that minted a freshrandomUUID()per failure thread the request/run/job id, or mint once per operation and setparentCorrelationIdwhen the spawning request is known.What ships
model.call/callStream/gateway.chatsites in 18 files (chat send and regenerate, streaming, grounded QA folder/hybrid/multi-source, coding sidecar, QI runs, memory salience, …) passlogContext— pinned per site by tests that fail when the field is removed.voice-live-dictation,voice-realtime): one id resolved athandleUpgradeviaresolveCorrelationId, used by every diagnostic on that connection.parentCorrelationId(shape-guarded; an out-of-shape value is dropped, never written under a marker).GatewayErrordiagnostic the streaming path emits (emitGatewayErrorDiagnostic); the remainingconsole.warndiagnostics in the chat-compaction path route throughemitServerDiagnostic.correlation-threading.e2e.test.ts, against the realcreateUiServerhandler): the same id on the http request line,gateway.chat.completedand the response header; a forcedRateLimitErroryields a diagnostic with that id andretryAfterMs; a scripted 429-then-200 fetch drives the real retry path under one id; two diagnostics on one WebSocket share the connection's id.How this was built and checked
The Wave 3 implementation (nine work items, acceptance test, three adversarial reviewers, fixer, completion pass) was split for review load: 3a carried the contract and UI, this PR carries the 91 call-site files, re-applied onto
devafter #3241 merged. Conflicts with 3a's review repairs (the diagnostic-writer sanitizer, the tool-bridge id mapping) were resolved with the tests as arbiter — no assertion weakened — and the op catalog regenerated.Also in this PR: a correlation id that is honestly unknown is the shape-valid sentinel
UNKNOWN_CORRELATION_ID("unknown-correlation-id") at all eight fallback sites (gateway-error-diagnostic.ts,chat-handlers.ts,coding-sidecar-gateway.ts×4,gateway-setup.ts,voice-handlers.ts) instead of the 7-character"unknown", which failedisValidCorrelationIdand was rewritten by the diagnostic writer's sanitizer into itsinvalid-correlation-idmarker — misreporting "no id available" as "malformed id". Regression test incoding-sidecar-gateway.test.tsfails against the bare literal.Resolves #3237
Refs #3233
Scope
Reuse And No-Duplication
GatewayCallRequest.logContext,resolveCorrelationId,emitGatewayErrorDiagnostic,serverDiagnosticFromError).Delivery Board
Parent Epic: #3233and is attached as a GitHub sub-issue of it.devpush, force-push, finding dismissal, or required-gate bypass occurred.Product Impact
Update Impact
docs/release/release-impact-runbook.md.improvements.normal.0.2.0; first shipped in the nextdevprerelease after 0.3.15.<stateDir>/logs/server.log(additive fields).no-action-required.Verification
Required:
npm run gates:sonarwas run on this diff and reported no finding.npm run check:ui-i18n— no UI production source changed.Local verification:
check:package-surface:assembled).Review And Closure
Risk Notes
ModelPort/ChatModelimplementation compiles unchanged.parentCorrelationIdis additive; a top-level request never sets it.