wake/ack.sh: status --agent <name> silently reports a different lane — an agent checking its own queue is told it is empty while actionable claims wait
#949
Reference in New Issue
Block a user
Found by the consumer on the affected lane during #944 field verification. Severity: HIGH — this is a silent wrong answer, not a usage error.
Observed
True values for that lane at the same moment: 70 / 67 / 2, with an actionable claim pending.
Mechanism
The dispatcher is
status) cmd_status "$@" ;;— arguments are passed through and never parsed.--agentis implemented only byembed, where it bakes aWAKE_AGENT=prefix onto the emitted ack line; it has never been a lane selector. Lane resolution is purely${WAKE_AGENT:-default}at run time.An arbitrary bogus flag also yields
rc=0, so nothing signals the miss.Correct invocation is the environment variable:
WAKE_AGENT=<name> ack.sh status.Why HIGH rather than cosmetic
The lane it misresolves to is
default, which exists on at least one host (created 2026-07-25, every cursor zero, every file empty). So the wrong-lane read does not error — it returns a completely plausible "nothing pending".That is the same consumer-visible outcome as the ack-watermark defect (#946) reached by a different route, and worse in one respect: the watermark defect at least renders the entry before instructing you past it. This one reports the queue as empty.
It was nearly reported as ledger corruption. What prevented that was the reader independently holding the true value (
67) and noticing the contradiction. With no second instrument in hand, three zeros are indistinguishable from a genuinely empty lane — there is no self-consistency check that catches it.Fix — two parts, and the second matters more
statusshould accept--agent. The flag exists elsewhere in the same CLI, so its absence here is a false affordance.rc=2instead ofrc=0.Part (2) is the general fix. An accepted-and-ignored flag is precisely what converted this from a usage error into a silent wrong answer, and it covers the next flag someone reasonably assumes exists.
Acceptance
ack.sh status --agent <name>reports that lane, or exits non-zero.rc=2with a message naming the flag.Related: #946 (ack watermark advances past quarantined entries). Both produce a silently under-reported queue by different mechanisms.