Skip to content

v0.98.7

Choose a tag to compare

@github-actions github-actions released this 07 Jul 18:56
· 962 commits to main since this release

Fixed

  • syn-wait now waits for a single directed message and then exits, so a harness that
    re-invokes an agent when its background task ends is actually woken. The alias previously
    mapped to synapse arm with no wake limit, which re-arms internally and never exits: the
    wake it printed stayed in the process's block-buffered stdout and the agent was never
    re-invoked — a waiter that held presence but woke nobody. The alias now defaults to
    --max-wakes 1 (an explicit --max-wakes is still honoured) while keeping arm's
    self-healing reconnect, so a dropped connection or a hub restart re-arms transparently and
    only a real wake ends the wait. syn arm is unaffected and stays persistently armed.

Added

  • Directed-message backlog replay on reconnect: a client that declares mailbox: true and a
    since_seq cursor on its registration heartbeat is delivered the directed messages it missed
    while offline, replayed from the durable journal as ordinary chat frames marked replayed
    turning the manual syn-inbox catch-up into an automatic push on reconnect. Every chat frame
    now carries its durable journal seq, the stable cross-restart cursor a client resumes from
    and dedups on (the per-hub msg_id resets on restart, so it is not a durable cursor). Only
    messages directed at the client (by name, project, glob, or a role it holds) are replayed,
    never broadcasts, bounded by a per-reconnect scan cap; a hub with no durable journal does not
    replay. Payload-only — no new wire type, so the wire protocol version, the reserved envelope
    keys, and the federation consumer surface are unchanged.
  • Deferred delivery receipts for directed messages that arrive after a reconnect. When a
    receipt-requested directed message reaches no live recipient, the hub still answers
    delivered: false at once, but now remembers it under its durable journal seq in a bounded
    pending-receipt store. A reconnecting recipient that drains the message from its backlog
    acknowledges it with the new ACK verb (client→hub), and the hub revises the verdict by
    sending the original sender a second delivery_receipt marked delivered: true, deferred: true — closing the gap where a sender was told "not delivered" and never learnt the message
    arrived. The acking client is re-checked as a genuine recipient of the target before the
    receipt is issued, so a spoofed ack neither fabricates a receipt nor drops the pending one. The
    wire protocol version is bumped to 2; the ACK verb is additive and backward-compatible by
    construction — a client emits it only when the hub advertises version 2 or newer, and an
    older hub is never sent it, so no enforcement is added and the federation consumer surface is
    unchanged.
  • Client mailbox mode on the reusable SynapseAgent. Constructed with mailbox=True, the
    agent declares its since_seq cursor on every registration heartbeat so a mailbox-capable
    hub replays the directed backlog it missed while offline; it advances the cursor on each chat
    frame it sees and acknowledges every replayed frame, so the hub can confirm a deferred
    delivery receipt to the original sender. A seeded mailbox_since_seq and the read-only
    mailbox_cursor property let a caller persist the cursor across reconnects and resume the
    backlog where it stopped. Off by default — an ordinary agent's registration and dispatch are
    unchanged, and a mailbox agent talking to a hub that predates the ack verb simply withholds
    the acknowledgement.
  • A mailbox client may declare mailbox_for — the identity whose backlog to replay when it
    differs from the connection name — so a wake-listener connecting under a receive-only -rx
    name receives the messages directed at its bare identity rather than at the -rx name it
    connects under. Absent or blank, the hub replays the backlog for the connection name itself,
    unchanged; roles are still read from the connection the client bound them to.
  • synapse arm --mailbox wakes a persistent waiter on directed messages that arrived while it
    was disconnected. On each connect the waiter resumes from a per-identity since_seq cursor
    and asks the hub to replay the directed messages it missed during a reconnect or re-arm gap,
    so a message that landed in that gap wakes it on the next connect instead of waiting unread
    until an unrelated wake. The cursor is persisted under ~/synapse/mailbox-cursor/, keyed by
    the waited-on identity, so a re-arm resumes where it stopped rather than being replayed — and
    woken by — the whole retained backlog again. Off by default; a plain arm is unchanged.