Repository navigation
feat(telemetry): add the Claude Code telemetry adapter (2/4, GRO-305) - #27
teallarson wants to merge 10 commits into
Conversation
Inactive while TELEMETRY_ENABLED is false; the adapter itself comes in hooks/telemetry-adapters/claude-code.mjs. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Port PR #13 Claude hook mapping into hooks/telemetry-adapters/claude-code.mjs with contract event fixtures and captureTelemetry coverage. Telemetry remains off; generated hooks.json is unchanged. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Ignore hooks/telemetry-adapters/ in the top-level telemetry filename filter. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Document connector service inference, Bash hook if/extraArgs, and Claude opt-out switch semantics. Build manifest rows without duplicate telemetry entries; rename the hook-group test to describe behavior. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1c51f07. Configure here.
teallarson
left a comment
There was a problem hiding this comment.
Independent final review at 1c51f07f115d5b3965b133368e542b37b13719ae: ready for human review with telemetry OFF.
Independent mapping/opt-out review: 21 focused tests, typecheck, generation and all 19 literal enabled-fixture shell commands silent while OFF. No remaining code finding.
Ready-for-review CI passed tests, all four client checks and the required aggregate gate; current-head Cursor Bugbot is green. Final combined heads plus main 18c7c99 passed 170/170 tests, zero skips, typecheck, four validators and 13 generated outputs. Independent combined privacy/release/adapter-removal review found no new blocker.
Windows, live client delivery and production ingestion remain activation prerequisites. No merge, release or collection enablement is authorized by this review. Descriptions preserve own-base review maps and limitations; Teal will inspect and request human reviewers.
— Strider 🐦⬛, Teal's agent · approved by Teal
Part of GRO-305 · issue
What/why
This connects Claude Code callbacks to the shared measurement pipeline: relevant prompts identify possible opportunities, tool callbacks record attempts/calls/failures, and operator completion records bounded status. Future reports compare selected opportunities with observed Arcade invocation by turn, extending what server call logs can show. Callback wiring and opt-outs are prepared, but no telemetry hooks are installed while collection is OFF.
See #26’s shared measurement diagram for local classification, privacy filtering and the current OFF gate, and #29’s reporting diagram for opportunity versus observed invocation and the client grouping limits.
Codebase changes
The Claude adapter translates hook inputs, declares client opt-outs and intended hook rows, and identifies tools without duplicating the shared event pipeline. Its registration remains inactive while the foundation's hard-OFF gate is false; reverting this slice leaves the foundation and Copilot slice intact.
Review map: foundation
26710300→ head1c51f07f, usinggit diff --numstat base...head; this excludes every foundation change. The copied enabled-hook manifest is a test fixture, not a shipped generated-output change; categories are exclusive.Proof
1c51f07f3035324: zero differences; enabled Claude fixture byte-identical to PR13's manifestAdditional notes
Merge #26 first, #27/#28 in either order, then #29. The three leaves currently target the foundation branch; after its squash merge, retarget/replay their own changes onto main and revalidate changed heads. Hold the generated release PR until the complete stack lands. Merging the release PR versions and tags the inactive build; it does not enable collection.
Activation requires a separate reviewed change and collection/privacy approval, verified Windows and live-client hook/opt-out delivery, and validated production ingestion and retention. Gateway telemetry remains canonical.
These are fixture/validator checks, not live Claude sessions, IDE or desktop Code delivery, Cowork opt-outs, or production ingestion. Existing keyword and tool-alias coverage limits remain; observations cannot establish complete routing recall or task success. Implementation run; merge foundation first, then Claude/Copilot in either order, and reporting/docs last.