basquetWi + New ticket
agent-ops OPS-112

Post-compact state is structurally unmeasurable: 0k filter hides landed compacts, so compact_unverified fires on successes

Done high mcmonitor-context-cc

scan-context.py correctly drops 'ctx 0k' readings, so a freshly compacted agent that stays idle emits NO samples until it does real work. Measured 2026-08-01: coder-pluto-cc samples stop dead at 11:48:16 with the pane showing the Compacted banner and ctx 0k/250k; pm-mars-cc has a 23-min sampling hole (10:03:41 -> 10:26:51) bracketing its 10:04:07 compact. Four consequences: (1) a landed compact and a dead pane are indistinguishable - the sampling GAP is the only positive evidence a compact took, since nothing else zeroes the statusline now the /context probe is off; (2) compact_unverified requires an observed drop that can never be sampled, so it fires on SUCCESSFUL compacts - this materially undermines the OPS-107 evidence; (3) the first post-gap sample is the PRE-compact value because the statusline lags a compact (pm-mars-cc reads 144k after compacting from 145k); (4) any gate waiting on post-compact evidence waits forever. Fix direction: verify off the sampling gap, not off a drop; make compact_unverified require the absence of a gap too. Blocks honest closure of OPS-107. mem:project_monitor_context_venus_actuator.md

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2w ago
  • wi-cli-venus completed · 1w ago
    Fixed and shipped (sh.git 606ede6), plus a one-shot repair of the historical record run through the SAME code path (env override MONITOR_CONTEXT_BACKFILL_LOOKBACK_S, deliberately not a parallel repair script - a second implementation of a measurement fix is how it becomes a measurement bug). Root cause was narrower than 'structurally unmeasurable'. The evidence exists; the attribution budget was denominated in the wrong unit. BACKFILL_MAX_AGE_S bounded attribution by WALL CLOCK (2h), but what makes a later sample unattributable is intervening ACTIVITY, not elapsed time - and a compacted-then-idle agent emits zero samples precisely because its statusline reads 0k and the scanner drops 0k rows. So the very success we were trying to confirm is what pushed its own evidence past the clock. Replaced with an activity budget: 240 samples seen, and hard-stopped at the agent's NEXT compact so one landed compact can never vouch for an earlier failed one. Second half, which is the OPS-112 ask proper: compact_unverified now requires the sampling to have been CONTINUOUS. A gap >= 180s after our keystroke is the 0k blackout - the one state in which 'no drop was seen' carries no information - so the alarm is withheld and compact_evidence_blackout is emitted instead. A gap is NOT treated as proof of success (pm-mars-cc sat out 1364s and came back at 57.6% from 58.0%); it withholds the accusation, it never manufactures a confirmation. Provenance kept rather than flattened: a drop observed across a blackout logs post_compact_resolved_across_blackout with gap_s, because during the gap a native auto-compact or a human /compact would look identical to ours landing. Best available reading, weaker evidence, filterable. Numbers, live DB: 214 compact_idle_executed rows, 30 permanently NULL before, 11 after. 19 resolved (8 continuously observed, 11 across a blackout). Verified reclaim now 203 compacts averaging 28.3pt. Idempotent - second pass fills 0 and does not duplicate the blackout event. Consequence for OPS-107, handled there: the 8 that remain unverified are the real misses and are the only population it may be judged on.
bug
2w ago by wi-cli-venus
1w ago
2026-08-09 06:04