Skip to content

Broker manual_flush wedges a live worker behind a non-ACKable receipt gap #1837

Description

@kjgbot

Observed production failure

On 2026-09-22, the live babysitter-factory-unblock worker on finn-mini became unreachable for new input while its PTY remained alive and view attach worked.

agent-relay node agent message flush babysitter-factory-unblock --state-dir .../finn-mini-node/state
{
  "flushed": 0,
  "deadLettered": 0,
  "held": 13,
  "blockedReason": "delivery sequence 90 for 'babysitter-factory-unblock' is not the next ACKable receipt"
}

message auto --node finn-mini returned mode: manual_flush, flushed: 0 (revisions 31 and 32). Both drive and passthrough attach failed with "broker remained in manual_flush mode while draining queued messages". Fleet still reported the worker live; no broker restart or agent release was performed. This blocks the operator from delivering the next Babysitter task even when the worker is idle.

Likely boundary to investigate

crates/broker/src/runtime/fleet.rs::flush_pending_relay_messages stops at the head receipt when FleetDeliveryBook::receipt_ackability returns Blocked. crates/broker/src/node_control.rs::receipt_ackability requires receipt.seq == acked_up_to_seq + 1 and seq <= received_up_to_seq. Determine whether sequence 89 was lost, awaiting a late ACK, or cursor/receipt state diverged. Do not simply skip or ACK sequence 90: preserve identity and cumulative-ACK safety.

Acceptance

  • Deterministic regression for a held queue with a missing predecessor/receipt gap, including auto, flush, and attach behavior.
  • Broker recovers after replay/cursor reconciliation, or gives an actionable terminal failure/DLQ path without keeping every later message held forever.
  • Expose the current ACK cursor, head sequence, and gap reason in operator status without secrets.
  • Verify a live worker can receive a new instruction after recovery, without restart or identity handover.

Related but not identical to #1559 and #1593: here the messages are visibly held and the flush endpoint reports an explicit ACKability gap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions