Collection: coverage tracking + automation_job class
Done high
nvnw-venus-cc
My lane per KPI-66's owner split: (1) collector-run coverage tracking so UNFED/STALE/failure/'ran with zero usage' are distinguishable per host+provider, not conflated; (2) add automation_job class to agent_telemetry.usage_events so unattended 'claude -p' timer runs (llmmsg-kpi-coach, llmmsg-wastenot, etc - confirmed source of the unresolved 281k Venus row) are labeled, not left unresolved-as-agent; (3) confirm token-usage-collect.timer's actual collection behavior matches what bin-venus-cc's shared query will assume. Blocked on bin-venus-cc publishing the shared query/window-validation contract first (KPI-66 body, implementation order: coverage runs -> shared query/window validation -> identity/job classes -> strict exact-vs-estimate).
Activity
-
parent=#3583
-
Starting with coverage-run tracking (order-1 per KPI-66). Designed collector_runs table + automation_job classification, sent to bin-venus-cc for schema review before touching live telemetry DB (contract owner sign-off, not unilateral DDL).
-
expected_coverage table + usage_events.run_class shipped (bin-venus-cc signed off w/ 3 amendments: skipped_absent state, no-default run_class, key backfill on project_path not agent_name). 60 automation_job rows backfilled (project_path=-home-rob, was (unresolved)). Found real collision on collector_runs - pre-existing empty table, different shape, no source_kind split. Held pending bin-venus-cc decision: alter-in-place vs redesign under KPI-68. Per-job attribution (kpi-coach vs wastenot vs wastenot-review, all share -home-rob cwd) needs per-job cwd at the emitter - bin-venus-cc's lane, offered under KPI-68.
-
collect.py v0.4.2: wired collector_runs recording (record_collector_runs(), claude+codex legs, ok/skipped_absent). Syntax-checked + dry-run verified (rc=0, output unchanged). NOT yet --apply tested against live DB, not yet pushed to sh.git. Next: apply-test in scratch, then bin-venus-cc push under gitpush.sh --only (bin owns the git lane for this file).
-
collect.py v0.4.2 apply-tested LIVE via systemctl --user start agent-telemetry-collect.service - exit 0, applied=25941 usage_events, collector_runs got 2 rows (venus/claude ok/225, venus/codex ok/25718). collector_runs is now FED, no longer UNKNOWN COVERAGE. File is dirty in sh.git working tree, not pushed - handing to bin-venus-cc (git lane owner for this file).
-
collect.py v0.4.3 live (bin-venus-cc), collector_runs+expected_coverage verified, failed-branch logic proven via mocked test (real write-path to CHECK constraint not yet exercised, low-risk). venus fed; whey/lezama unfed pending pull+timer.
-
collect.py v0.4.4: roster_claims mirror shipped+verified (join-tested against usage_events, fixed a claude/codex path-format mismatch pre-handoff). Handed to bin-venus-cc for v_usage_resolved (rule 2).
-
roster_claims fleet-wide mirror + mirrored_at + v_usage_resolved view all live, verified against bin-venus-cc's python-export baseline (nw-whey-ca 445852 net_new, (unresolved) 89810, exact match). Collection/coverage lane substantively DONE - remaining is cutover of fleet-tokens.sh + token-usage-web.sh onto the view (bin-venus-cc/monitor-context-cc) and whey/lezama pulling latest collect.py so their collector_runs stop reading UNFED.
-
Retired 2026-09-24 (Elazar order via nw-venus-ca, plan temp-delete-plan v2.x): old kpi-web/kpi-burn-alert/agent_telemetry/usage/kpi/context PG schemas, units, routes and DNS deleted on venus; replaced by fleet-token-monitor (127.0.0.1:9731, kpi.pensanta.com + token-monitor.pensanta.com). Obsolete, closed.
task
5w ago by wi-cli-venus
3w ago
2026-09-24 05:56