chore(backend): remove DEBUG CAPTURE status logs from websocket handler#111
chore(backend): remove DEBUG CAPTURE status logs from websocket handler#111Meganeuridae wants to merge 1 commit into
Conversation
…et handler
`handler.ts` has four parallel DEBUG CAPTURE blocks — initial generation,
regenerate, edit, and continue — each of which persists the raw provider
request + model response on the first generated branch so researchers can
later inspect what was sent and what came back via the "show debug data"
UI. The feature is real and load-bearing; the logging around it was not.
Each block had multiple `console.log('[DEBUG CAPTURE] …')` lines that
narrated routine flow ("Capturing debug data for branch …", "Raw request
available: true", "Updating message branch …", "Debug data saved", etc.)
on every assistant turn. 14 such lines across the four blocks, all
removed. The actual feature code (computing actualFormat, building
debugRequest/debugResponse, persisting via db.updateMessageBranch, the
'message_edited' websocket notification) is untouched.
`console.error('[DEBUG CAPTURE] Failed to capture debug data:', …)`
remains at the catch sites of all four blocks — those are real failure
signals, not status narration. (Will get the safeErrorLog treatment in
a separate sweep once anima-research#109's `utils/safe-log.ts` lands.)
The "DEBUG CAPTURE:" header comment on the first and fourth blocks was
also replaced with a more useful one-liner that says what the block
actually does, since the old comments mostly just restated the inline
console.log narration.
Backend `npm run build` passes; no behavior change to the debug-capture
feature itself.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Greptile SummaryRemoves 14
Confidence Score: 5/5Safe to merge — purely removes verbose status logs with no changes to feature logic or error handling. Every functional line in the four debug-capture blocks (building the request/response objects, the DB write, the WebSocket notification, and the catch-site error log) is left intact. The only removals are console.log narration lines and an else branch that contained nothing but one of those logs. No files require special attention.
|
| Filename | Overview |
|---|---|
| deprecated-claude-app/backend/src/websocket/handler.ts | 14 verbose console.log narration lines removed from four DEBUG CAPTURE blocks; feature code, error-logging, and all DB/WS operations are unchanged. |
Reviews (1): Last reviewed commit: "chore(backend): remove DEBUG CAPTURE sta..." | Re-trigger Greptile
handler.tshas four parallel DEBUG CAPTURE blocks — initial generation, regenerate, edit, and continue — each of which persists the raw provider request + model response on the first generated branch so researchers can later inspect what was sent and what came back via the "show debug data" UI. The feature is real and load-bearing.The logging around it was not. Each block carried multiple
console.log('[DEBUG CAPTURE] …')lines that narrated routine flow on every assistant turn:14 such lines across the four blocks, all removed. The actual feature code (computing
actualFormat, buildingdebugRequest/debugResponse, persisting viadb.updateMessageBranch, the'message_edited'websocket notification) is untouched.console.error('[DEBUG CAPTURE] Failed to capture debug data:', …)remains at the catch site of all four blocks — those are real failure signals, not status narration. They'll get thesafeErrorLogtreatment in a separate sweep once #109'sutils/safe-log.tslands.The header comment on the first and fourth blocks was also rewritten to say what the block actually does, since the old
// DEBUG CAPTURE: Capture debug data for the first branch after completionwas mostly redundant with the inline console.log narration that's now gone.Scope / risk
Single file, surgical removal. +15/-27. Backend
npm run buildpasses. No behavior change to the debug-capture feature — the only thing that changes is how much each assistant turn writes to stdout.🤖 Generated with Claude Code