Skip to content

feat(disk-hygiene): adopt HOOK_TELEMETRY_SINK on both wired hooks #1505

Description

@kyle-sexton

Problem

docs/conventions/hook-observability/README.md requires that every hook wired in a plugin's
hooks.json emit a HOOK_TELEMETRY_SINK envelope "for each meaningful outcome it produces (a check
that ran and returned ok / blocked / skipped-for-cause)", with the carve-out limited to "a pure
inapplicability short-circuit before any check logic runs".

disk-hygiene emits nothing. A search across plugins/disk-hygiene/ finds zero references to
HOOK_TELEMETRY_SINK or hook::emit_telemetry. That covers both wired hooks:

A guard failure found and reported is a meaningful outcome, so the inapplicability exemption does not
apply. Fleet telemetry silently omits the guard failures the detector exists to expose.

Why this is deferred rather than fixed in #1465

Every current emitter in the marketplace goes through the bash hooks/hook-utils.sh
hook::emit_telemetry helper (typos-format, ruff-format, markdown-format, powershell-format,
go-format, eol-normalizer, guardrails, claude-ops, desktop-notification, rate-limit-guard). There is
no Python telemetry emitter anywhere in the marketplace.

Emitting the envelope from guard_launch_monitor.py would stand up the fleet's first Python
telemetry producer — hand-rolled envelope construction plus fire-and-forget sink dispatch — inside a
module whose stated contract is stdlib-only with a near-zero failure surface and a "never fail
loudly" guarantee. That is a reuse-or-replace decision (reuse the established bash helper, or
deliberately stand up a second, parallel Python way and record the decision) that #1465's diff does
not settle. Adopting it on one of the plugin's two wired hooks while the primary guard still emits
nothing would also be half an adoption.

#836 (fleet OTel-envelope adoption) is closed, so this issue is the tracker.

Scope

Both wired hooks, not just the new one — a fix that instruments only guard_launch_monitor.py
leaves the plugin's primary safety gate silent and does not close this.

Re-open / close trigger

Closed when both disk-hygiene wired hooks emit HOOK_TELEMETRY_SINK envelopes for their meaningful
outcomes, through whichever mechanism the reuse-or-replace call selects, with the language choice
recorded if it is a new parallel Python path.

Source

Codex review finding (P2) on #1465,
plugins/disk-hygiene/skills/clean/scripts/guard_launch_monitor.py:258.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions