Commit 11c8816
ROB-3820: Forward chat-analytics fields through holmes_issue_chat (#2075)
* Forward chat-analytics fields through holmes_issue_chat
holmes_chat passes the full HolmesChatParams payload to /api/chat via
params.dict() (b14f68d), so source_ref and the other analytics fields
land on Holmes. holmes_issue_chat was missed: it built
HolmesIssueChatRequest with five hand-picked fields, silently dropping
source_ref, request_type, request_source, conversation_id,
conversation_source, is_internal, meta, plus enable_tool_approval,
tool_decisions, and additional_system_prompt.
Slack/Teams threaded chats on an existing alert hit /api/issue_chat,
which is why source_ref arrived from the relay populated and was
stored as NULL in HolmesUsageEvents.
Mirror the holmes_chat pass-through pattern: take params.dict() minus
runner-only/structurally-handled fields and splat the rest, then add
investigation_result and issue_type from params.context. Same
client/server-upgrade-without-middleware-changes property the
HolmesChat schemas docstring describes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Log chat-analytics fields before forwarding to Holmes
Diagnostic log on both /api/chat and /api/issue_chat paths so we can
verify what the runner actually forwards (source_ref, request_source,
request_type, conversation_id, conversation_source, is_internal). If
these show up in the runner log but land NULL in Holmes' usage events,
the gap is downstream of the runner.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Log raw action_params keys for holmes_* actions at receiver
Targeted info-level log at the websocket boundary to distinguish
"relay didn't send source_ref" from "something downstream stripped
it." Prints the full key list so we can see whether source_ref is
present at all when the relay hands off to the runner, plus the
analytics field values for direct comparison with the
holmes_chat forwarding log line.
Scoped to action names starting with holmes_ so the rest of the
action traffic stays at debug verbosity.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove diagnostic logging — issue traced to relay
The receiver-side and forwarding-side logs confirmed the relay was
omitting source_ref and the other chat-analytics fields from the
holmes_chat action_params on the Slack path. Fix lives in the relay
repo, not here. Reverting the diagnostic log lines now that the
investigation is done; keeping the holmes_issue_chat pass-through
fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b059129 commit 11c8816
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
267 | 268 | | |
268 | | - | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| |||
0 commit comments