Skip to content

fix(hogli): trustworthy telemetry signals#60312

Merged
rnegron merged 3 commits into
masterfrom
worktree-hogli-telemetry-sweep
May 27, 2026
Merged

fix(hogli): trustworthy telemetry signals#60312
rnegron merged 3 commits into
masterfrom
worktree-hogli-telemetry-sweep

Conversation

@rnegron
Copy link
Copy Markdown
Member

@rnegron rnegron commented May 27, 2026

Problem

hogli telemetry is alive but noisy: the CI disable gate checks only CI while the is_ci label checks six providers (so CI runs leak in and inflate installs), bare hogli emits a command_completed with no matching command_started, the telemetry:* commands track themselves, and a non-zero exit_code can't tell a real failure from a Ctrl-C.

Changes

  • One source of truth for CI detection (telemetry.is_ci()) shared by the gate and the is_ci label. Depot CI runners set CI/GITHUB_ACTIONS so they're already covered; DEPOT_TOKEN intentionally not gated (also on dev laptops).
  • Both events gated through a shared _should_track() (requires a subcommand, excludes telemetry:on/off/status) so they form matched pairs.
  • New outcome property (success/error/interrupted) so signal kills read distinctly from failures.

How did you test this code?

Agent-authored (Claude Code), automated tests only — no manual testing. 24 new tests; full hogli + hogli-commands suites pass (883). ruff and ty clean.

Publish to changelog?

no

🤖 Agent context

Authored by Claude Code; human author owns review/merge. Began as a check-in on whether the feature still produces useful data (queried the DevEx project via PostHog MCP, mapped the emit surface), which surfaced these fixes. CI logic kept in core telemetry.py per the framework boundary in tools/hogli/CLAUDE.md. Scoped out: duration_s is ~0 for umbrella commands (needs sub-step timing) and ephemeral identity churn — both noted for follow-up.

@rnegron rnegron marked this pull request as ready for review May 27, 2026 19:57
@rnegron rnegron added the stamphog Request AI review from stamphog label May 27, 2026
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team May 27, 2026 19:57
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean internal tooling fix by the owning team: consolidates CI detection into a shared is_ci() helper used consistently across telemetry gating and event properties, excludes telemetry management commands from tracking, and adds an outcome classifier for exit codes. Well-tested with no production-code impact.

@rnegron rnegron merged commit 20f6b67 into master May 27, 2026
175 checks passed
@rnegron rnegron deleted the worktree-hogli-telemetry-sweep branch May 27, 2026 19:59
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 27, 2026

Reviews (1): Last reviewed commit: "Merge branch 'master' into worktree-hogl..." | Re-trigger Greptile

@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 27, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-27 20:30 UTC Run
prod-us ✅ Deployed 2026-05-27 20:43 UTC Run
prod-eu ✅ Deployed 2026-05-27 20:46 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI review from stamphog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant