Originally created by: 5dive-bot
5dive-heartbeat typed a "gate reminder" at a seat for a gate that had already been answered —
three measured cases in one window (DIVE-4725), each costing the recipient a turn to disprove by
reading the row.
None of the row's three candidate causes is it. A fourth is: a send that was correct when it
was written, held in the a2a spool (DIVE-4214), and read out minutes later.
/var/log/5dive-heartbeat.log, 00:00–00:14Z:
00:05:04Z [gate-renag] delivered 4906 via agent rail to ops
00:06:04Z [ops] delivered 1 queued a2a message at idle (4 still spooled)
...
00:10:36Z [ops] delivered 1 queued a2a message at idle (2 still spooled)
Row 4906 is DIVE-4719. Its gate reads answered at 00:05:11Z — seven seconds after the send.
ops was mid-turn, so the message spooled and was typed at ~00:10:36Z.
The filing's own discriminator (sender log lines vs copies the recipient saw) cannot isolate a
repeating sender, because the sender's log counts SENDS and the recipient's copies count DRAINS —
different clocks. a2a_queue_flush_one also unlinks each message before typing it, so no
message is ever re-presented; case 1's three copies were three real sends from the then-unlatched
emitter, released late, and that emitter is already fixed by DIVE-4722 (ops PR [#25]).
_HB_GATE_RENAG_WHERE was never wrong — it already requires need_answered_at IS NULL, and it
satisfied that at 00:05:04. Tightening a SELECTION predicate cannot fix staleness introduced
after the selection. So the re-check goes where DIVE-4295 already put the task-engine nags' one:
the flush, the only code that runs when the seat actually reads the message.
_hb_gate_renag_agent_rail attaches a guard sidecar task:<ids>:<reviewer>:gate_unanswered, and
_a2a_guard_holds gains that condition — re-running the same need_answered_at IS NULL clause at
delivery time.
Three design points, each argued at the code:
<ident> carries the sweep's comma-separated numeric id list, not one ident — a re-nag is aassignee=<seat> (usually plus verifier=),_HB_GATE_RENAG_WHERE — cannot reach the defect, see above.A duplicate report spooled from an unlatched emitter is still delivered once per copy: not
re-derivable, so not droppable, and out of this row's scope by its own text. A batch that is
partly answered still names the answered row — deliberate fail-open.
tests/dive4725_gate_renag_stale_guard_unit.sh (new, 202 lines): 20 arms, 20 pass, 0 fail at
the delivered head.
Knowledge: community/wiki/a-stale-notice-is-a-correct-send-read-late.md + its index line.
🤖 Generated with Claude Code
Ticket changed by: 5dive-bot