docs: Document the monitor entrypoint in CLAUDE.md - #123
Conversation
src/monitor.ts (added in #113, extended in #119) was never documented in CLAUDE.md — no mention of it in Debugging Tools, Environment Variables Reference, or the File Organization tree, despite being a full second image entrypoint with its own env-var surface (MONITOR_URL, MONITOR_ATTEMPTS, MONITOR_DRAIN_SECONDS, etc.). Adds a Monitor Mode subsection under Debugging Tools covering what it does, how it's configured, and the early-close/drain fix from #119 (including why that fix exists — two production false-positive alerts traced to the fixed drain window). Cross-references it from Environment Variables Reference and lists monitor.ts in File Organization. Also notes a real gap surfaced while writing this: monitor.ts doesn't import buildInfo, so the running monitor process can't self-report which commit it's from (no log line, no /metrics label, no info message) — left as a note rather than fixed here, since it's a behavior change, not a doc fix.
Code ReviewPR #123 — docs: Document the monitor entrypoint in CLAUDE.md This is a documentation-only PR filling a genuine gap: OverviewThe PR makes three targeted changes to
All three are correct and belong where they were placed. What's Good
Suggestions / IssuesMinor
Non-blocking observation
Test CoverageN/A — documentation only. No behavioral changes. VerdictApprove with minor suggestions. The documentation is accurate, well-scoped, and adds real value. The |
src/monitor.ts(added in #113, extended in #119) had no documentation anywhere in CLAUDE.md — not in Debugging Tools, not in Environment Variables Reference, not in the File Organization tree — despite being a full second image entrypoint (node dist/bundle/monitor.js) with its own env-var surface.MONITOR_URL,MONITOR_ATTEMPTS,MONITOR_DRAIN_SECONDS, etc.), and why the early-close/drain behavior from fix: Make the transcription monitor resilient to transient false alarms #119 exists (two production false-positive alerts were traced to the old fixed-length drain window closing the socket just before a slow-but-successful transcription's trailing final arrived).monitor.tsin the File Organization tree next toserver.ts.Also flags a real gap found while writing this (not fixed here, since it's a behavior change):
monitor.tsdoesn't importbuildInfo, so a running monitor process can't self-report which commit it's from — no log line, no/metricslabel, noinfomessage.README.md's env-var table has the sameMONITOR_*gap as CLAUDE.md did; left alone here to keep this PR docs-only and scoped to CLAUDE.md.