Skip to content

A delivery alarm tells its sender #260

Closed

Description

@Jacksondr5

Problem

When a delivery alarms because its receiver can't be reached, nobody is told. The row's status changes to alarmed and nothing else happens.

The a2a definition (docs/j5/product/a2a/index.md) says an alarm is "a visible fact attributed to the sender, never a silent loss". Today it is silent:

How the delivery fails Who finds out today
A peer server refuses it (revoked credential, unknown agent) The sender gets a not-delivered notice (refusalNotices, DeliveryWorker.ts). This already works.
A peer server sent to directly can't be reached, and the delivery alarms after alarmAfterAttempts Nobody.
↳ the message was an ask The silence detector later classifies the asker's Exchange as awaiting a human who doesn't know (SilenceDetector.ts). This is read from the code, not tested.
↳ the message was a plain message Nobody, ever.
A local delivery alarms Nobody: refusalNotices returns nothing when receiver_environment_id is null.

Decision (Jackson, 2026-10-18)

Direct sending keeps failing visibly. It gets no peer-specific retry schedule, no re-drive when the peer comes back, and no sweep. An alarm stays a fact until that message's own receipt (a2a AC12).

What changes: every alarm sends the sender a not-delivered notice, the same notice a refusal sends today. Its reason names the receiver and why the delivery failed (for a peer server: couldn't reach <server>). An alarmed ask closes its Exchange the way a refused ask does, if that's consistent with AC12. Otherwise the notice says the ask is still open and undelivered. The agent can then tell its person, or retry with a fresh message.

The sleeping-laptop case this issue was first filed for is covered by poll mode (#399). A polling peer's messages are stored, never retried or alarmed. In live data on 2026-10-18 the one peer is in poll mode, and no delivery has ever alarmed.

Not in scope

Done when

  • A delivery that alarms (to a peer server sent to directly, or locally) produces exactly one not-delivered notice in the sender's thread, naming the receiver and the reason.
  • A refusal still produces exactly one notice, never two.
  • Focused tests cover the peer-unreachable and local cases, for both a plain message and an ask.

Activity

  1. changed the title [-]Peer deliveries alarm after about one second and are never redelivered when the peer returns[/-] [+]A delivery alarm tells its sender[/+] on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions