All-zero sessions are now invisible to every context view - the disappearing-gauge case needs its own detector
Created by pm-llmmsgsrv-cc 2026-09-12 so a knowingly-accepted tradeoff does not sit unowned in a ticket comment. WHAT CHANGED: nw-venus-cc added WHERE ctx_tokens <> 0 to context.v_latest (ONEDB-20). v_latest is the base of both v_active and v_over_cap, so a session whose samples are ALL failed reads is now ABSENT from all three rather than showing as zero. ONEDB-20's own description had explicitly warned against filtering v_latest for exactly this reason; the patch stands anyway because the unfiltered DISTINCT ON (host,session_id) ORDER BY ts DESC was the larger hole. nw-venus-cc has acked the ordering miss and logged the tradeoff on ONEDB-20. EXPOSURE, MEASURED by pm-llmmsgsrv-cc 2026-09-12 rather than argued: 2h window - 1 of 30 sessions is all-zero (coder-venus-cc, session 60f68884, 2 samples, both sample_flag=zero_read, an agent Elazar deliberately shut down). 4 of 30 have at least one zero sample. 24h window - 0 of 33 all-zero. So the warned-about case is LIVE but currently benign, and it is entirely composed of an orderly shutdown, not a stuck agent. Re-run to recheck: SELECT agent, host, left(session_id,8), count(*) n, min(ts)::timestamp(0), max(ts)::timestamp(0), string_agg(DISTINCT coalesce(sample_flag,'(null)'),',') FROM context.samples WHERE ts > now() - interval '2 hours' GROUP BY 1,2,3 HAVING sum((ctx_tokens<>0)::int)=0; WHY IT STILL NEEDS A DETECTOR: the dangerous case is a session that is genuinely STUCK and whose reads all fail - it looks identical in the data to an orderly shutdown, and it now warns by DISAPPEARING, which is the one signal no dashboard renders. A gauge that reports a problem by going absent is not a gauge ([[silence-default-wrong-for-census]], [[empty-sentinel-conflates-failure-with-negative]]). Filtering it out of v_latest was correct for the ranking views and wrong as a place to put the only record of it. SCOPE: a SEPARATE check, not a change to v_latest - do not re-litigate the filter. Something that enumerates sessions with recent samples where every sample is zero_read, and distinguishes the two causes it cannot distinguish today. The orderly-shutdown discriminator is the open design question and it is why this is not a one-liner: roster absence is not death ([[roster-absence-is-not-death]]), and the hub has no shutdown-vs-death signal, so the check may only be able to report the ambiguity honestly rather than resolve it - that is an acceptable outcome, an unreported one is not. ROUTED to monitor-context-cc: you own context.samples emission and the actuator lane, and you already carry the zero_read flag semantics. nw-venus-cc explicitly declined to design it blind. Not blocking ONEDB-20, which is blocked on ONEDB-21 (bin-venus-cc, schema.sql reconciliation).
Activity
-
Subject deleted 38bdd55 (2026-09-24, Elazar, 'retire agent telemetry tracking stack') - whole context-actuator/telemetry stack trashed (context-monitor.sh, tick.py, monitor-context.sqlite, analyze-agent-context.sh, scan-context.py, kpi-views.sql, token-usage-collect.sh, collect.py, schema.sql, units). Verified missing on disk, not inferred from the commit list alone. Nothing left to fix.