Skip to content

feat(coverage): name configured agents that send no events - #304

Merged
blitzcrieg1 merged 4 commits into
masterfrom
feat/coverage-observed-recently
Oct 22, 2026
Merged

blitzcrieg1 merged 4 commits into
masterfrom
feat/coverage-observed-recently

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Refs #300, #302.

Why

Hook coverage was a file check: if the hook entry existed, the agent was covered. On the dogfood machine Codex sat on that green line while its last recorded event was 2026-07-16, first because its Windows sandbox could not authenticate (#302, fixed in #303) and independently because Codex skips hooks the developer has not approved (#300). An outside audit put it plainly: configured must never read as observed.

What

  • AuditTrailDB.last_event_by_source(): newest event timestamp per source app.
  • hook_coverage.silent(states, last_seen, now, days=7): configured (covered) agents with no event in the window. A cursor_cloud event does not vouch for local Cursor.
  • doctor: new hooks_observed check, reading the index read-only (mode=ro, never creates it). Warns, naming each silent agent and why it may be silent; OK lists the observed ones. A warning, not a failure: an unused agent is silent too. doctor --json gains hooks_last_seen and hooks_silent (additive).
  • Heartbeat: hooks_silent field, and the agents named in action.reason. Deliberately not degraded, for the same reason the beat already refuses to degrade on an agent that is not installed. A SIEM can alert on heartbeat.hooks_silent where silence is unexpected. The field-allowlist privacy test is updated with that justification: agent names only, no timestamps, counts or paths.
  • SECURITY.md: three limits now stated: an ingest-only token holder (Codex's sandbox included) can add false host-stamped events; Codex's sandbox cannot write the spool, so its events are lost while the recorder is down; configured is not recorded.
  • docs/agent-coverage.md: one line on what covered does and does not mean.

Evidence

Run against the real dogfood index on the day it was written:

WARN | Configured but no event in 7 days: codex. ...
OK   | Events observed in the last 7 days from: cursor, claude, antigravity

14 new tests: the window, never-seen and stale cases, non-configured agents ignored, cloud sources not counted, timestamp forms; doctor names silent agents, warns rather than fails, never creates a missing index, says nothing with no configured agents; the heartbeat names silent agents without degrading and survives an unreadable index.

Checks

Frozen files untouched; fingerprint 15846a0915769d4a. Ruff clean. Full suite locally: the three known local-only failures plus the README count (CI collects two fewer). README count 1870 to 1884.

Not in this PR

Codex's approval state itself, which cannot be read from disk, so #300 stays open. A spool the sandbox can write (#302).

🤖 Generated with Claude Code

Hook coverage was a file check: a hook entry on disk made an agent
`covered`. Codex sat on that line for three months on the dogfood machine,
last event 2026-07-16, first because its Windows sandbox could not
authenticate (#302) and independently because Codex skips hooks the developer
has not approved (#300). Nothing said so.

`doctor` now reads the trail index read-only and warns on every configured
agent with no event in seven days; `doctor --json` gains `hooks_last_seen` and
`hooks_silent`. The heartbeat carries `hooks_silent` and names those agents in
its reason, but does not turn `degraded`: an unused agent is silent too, and a
beat that degrades for that teaches a fleet to ignore it. Run here the day it
was written, it named Codex and passed Cursor, Claude Code and Antigravity.

SECURITY.md now states three limits it did not: the ingest-only token lets its
holder, Codex's sandbox included, add false host-stamped events; the sandbox
cannot write the spool, so its events are lost while the recorder is down; and
configured is not recorded. README test count 1870 -> 1884.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@blitzcrieg1
blitzcrieg1 merged commit 4d91975 into master Oct 22, 2026
11 checks passed
@blitzcrieg1
blitzcrieg1 deleted the feat/coverage-observed-recently branch October 22, 2026 19:29
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant