Repository navigation
feat(telemetry): add telemetry reporting and document the default-off telemetry (4/4, GRO-305) - #29
teallarson wants to merge 11 commits into
Conversation
Seeds docs/telemetry.md and scripts/telemetry-docs.mjs from PR #13 for the reporting and docs slice to rewrite. 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>
Implement scripts/telemetry-report.mjs with contract validation, legacy exclusion, and host-specific turn/session stage counts. Add fixtures and tests for the reporter and generated telemetry tables. Rewrite maintained docs for TELEMETRY_ENABLED=false: no hooks, no transmission, gateway as canonical telemetry, and local aggregation guidance. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Exercise captureTelemetry sequences through buildReport when adapter files exist; skip per host on the reporting-only branch. Document final adapter behavior, opt-out semantics, VS Code script guard, and CI coverage limits. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Strip export rows to contract fields before validation so timestamp, uuid, and PostHog properties do not invalidate rows. Add regression test; fix support-matrix PreToolUse matcher and minor report nits. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Only ignore envelope fields and unknown $ properties before validation; prompt/cwd and other contract violations stay invalid. Document behavior and add regression tests. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
teallarson
left a comment
There was a problem hiding this comment.
Independent review of the current telemetry-OFF draft. Findings below remain valid at this exact head; no implementation, approval, merge or collection enablement is implied.
— Strider 🐦⬛, Teal's agent · approved by Teal
…ze parse errors - attempt_observed_outcome_unknown now checks arcade and other_arcade separately, so an outcome on one category cannot hide an attempt on the other. The limits list and docs state that other_arcade pools connections and that calls are not paired individually. - The CLI catches unparseable input and prints only its own message with the failing line number, never the input, and exits nonzero. - Replace the one-off live-run anecdote in docs/telemetry.md with the generic guidance about attempts with unknown outcomes. Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
|
@cursor review — Strider 🐦⬛, Teal's agent · approved by Teal |
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 4993224. Configure here.
teallarson
left a comment
There was a problem hiding this comment.
Independent final review at 4993224250fb25ca14e5506011ec7968fa69b823: ready for human review with telemetry OFF.
Independent report/privacy review: 15 focused tests; isolated-branch adapter skips run successfully in the combined stack. All three earlier findings are corrected. Accepted nonblocking limitation: leading blank JSONL lines can offset the diagnostic physical line number; raw input remains private.
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
Linear ticket: GRO-305
What/why
The local reporter compares selected app-related work with observed Arcade activity: Claude by turn and Copilot by session. This prepares an estimate of likely opportunity with or without invocation, complementing gateway logs that cannot reveal uncalled opportunities. Classification and delivery gaps mean ‘no call observed’ does not prove a missed necessary call. This PR also documents the proposed collection contract; collection remains OFF.
Report flow
The reporter operates on supplied exports, independently of collection. Opportunity means locally classified app-related work. Here, invocation evidence includes attempts and failures:
no_call_observedmeans zero Arcade attempt/call/failure rows, not the inverse ofapp_action_called. Claude attempts may have unknown outcomes; Copilot has no attempt hook. Missing delivery can look like absence, and Claude turns must not be combined with Copilot sessions into one rate.Codebase changes
scripts/telemetry-report.mjsvalidates export rows against the shared contract, ignores export metadata and PostHog$properties, and groups observations by host/plugin/telemetry version. It keeps unknown outcomes separate forarcadeand pooledother_arcade, and malformed input exits nonzero with a sanitized diagnostic that never echoes the row. Fixture tests cover counts, leaked fields, cross-category outcomes and real-adapter cross-checks; the two adapter checks skip on this isolated branch and run on the combined stack. Maintained docs describe the inactive build, client coverage, privacy and measurement limits; contract-derived tables remain generated.Review map uses
git diff --numstat foundation...head, excluding foundation changes;docs/telemetry.mdincludes generated tables inside a maintained document.Proof
4993224218c7c99: 170/170 tests, zero skips, typecheck/four validators and generation checks, with Node 22.23.2 and macOS pwsh 7.6.6Additional 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.
Gateway telemetry remains canonical; plugin observations supplement the offline routing evaluation and cannot establish per-call pairing or outcomes within pooled connections. The current acceptance checklist remains at PR13's pinned head, with an earlier version on
backup/pr13-ffc22e8-20261006; one-off logs/checklists stay outside this product diff. Accepted minor limitation: leading blank lines can offset the JSONL error line number, while input stays private and no report is produced. Windows/live-client delivery and production ingestion are untested; the old integration refaf9dd52is historical and final validation uses a fresh unpushed combined tree.Linear Issue: GRO-305