Files
orca/src
Brennan Benson 25128f58bf fix(agent-status): close four tri-state evidence gaps found in review (STA-4119)
Independent review of the snapshot/replay fix found four ways the tri-state could
report a positive "no background work" from evidence nobody reported, or stay
"never observed" forever. All four are the same failure in different places: the
new per-runtime observation marker was not kept in step with the inventory sets it
qualifies.

- Interrupt: clearing the inventory sets means "stop gating the pane", not "the
  provider reported an all-clear". The marker survived, so the resolver saw
  "observed, nothing running" and emitted a positive false over a process that may
  still be live. Interrupts now drop the marker in all three paths.
- Session cron: a scheduled cron is provider-owned work under the same PTY, but the
  resolver consulted only the background-shell set and a cron-only inventory never
  set the marker. Such a pane was unknown forever, or reported a false all-clear
  from stale state. Cron now both counts as an observation and resolves as work.
- Remote/relay: a host reports the inventory as a wire boolean, but the receiving
  runtime never recorded that an observation happened, so every remote pane
  resolved to unknown and a relayed all-clear could never make one eligible.
- Local-hook rollback: the save/restore dance that protects against nested or
  rejected payloads tracked three fields and not the marker, so a discarded payload
  could leave the pane marked observed with the sets rolled back.

Each is pinned by a test whose corresponding production revert makes it red.
2026-08-18 02:44:43 -07:00
..