chat: log the undelivered-turn cause and thread a reportError refId (CL-6644, part A) - #313
Merged
Conversation
…its refId into the notice (CL-6644)
Merged
4 tasks
This was referenced Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CL-6644 part A: diagnosability. A turn that fails end-to-end left zero log
trace —
dispatchTurnBatch's catch logged through a baregetLoggercall,never through
@corbits/error-sink'sreportError, so an undeliverednotice never carried a
refIda person could quote to support.dispatchTurnBatch's catch now callsreportError(operationchat.dispatchTurn, tenant/room/agent context, the message ids) beforelogging and posting the notice, and threads the returned
refIdintopostUndeliveredNotice.(ref <refId>)— cheap enough to fold innow rather than waiting on CL-6641 item 3's own UI surface.
@corbits/error-sinkas an explicitpackages/chatdependency.Part B (wake never completes) — not fixed here
I spent the session's timebox tracing the wake hop
(
ensureAwake/wakeByAddress/wakeFoldedRun/deployAdoptedWorkflowFromSource)and could not pin the stalling hop to a specific line with the confidence
this repo's "no guessing" bar requires, without a live repro run against
the shared stack (which I was told not to restart unless dead). The
strongest lead:
c83f3821("Sidecar boot restore: skip parkeddeployments...") justifies skipping a parked record's boot restore by
saying it "resumes correctly on the next message... the same wake path
that already handles a cold deployment" — but
0fd3fbc8("replace idlepark/wake with reap-and-relaunch teardown") had already deleted that
in-place wake-on-mail-route path days earlier.
wakeByAddress(
packages/chat/src/platform-adapter.ts) still carries a CL-6267 commentdescribing that same deleted mechanism ("the sidecar's own park
wake-handler owns respawning a parked-but-still-announced deployment").
This mismatch is worth a live-repro session to confirm or rule out before
touching sidecar code — filing as a Linear comment on CL-6644 rather than
guessing a fix blind.
Test plan
WORKBENCH_CHECK_SINCE=origin/main bun run typecheck— passWORKBENCH_CHECK_SINCE=origin/main bun run lint— passWORKBENCH_CHECK_SINCE=origin/main bun run test— pass, including anew red/green test asserting the notice carries
(ref ...)note above