{% extends "base.html" %} {% from "_macros.html" import ts, badge, rid, agent_link, msg_link, thread_link %} {% set m = message %} {% block content %}

{{ badge(m.kind) }} message

Id
{{ rid(m.id) }}
From
{{ agent_link(m.sender, m.sender_handle) }}
To
{% if m.to %}{{ agent_link(m.to, m.to_handle) }}{% else %}— (fan-out; see deliveries){% endif %}
Sent
{{ ts(m.created_at) }}
{% if m.expires_at %}
Expires
{{ ts(m.expires_at) }}
{% endif %} {% if m.intent %}
Intent
{{ m.intent }}
{% endif %}
Thread
{{ thread_link(m.thread_key) }} {% if m.correlation_id and m.correlation_id != m.thread_key %}(correlation_id {{ m.correlation_id }}){% endif %}
Replies to
{% if m.parent %}{{ msg_link(m.parent.id) }} from {{ agent_link(m.parent.sender, m.parent.sender_handle) }}
{{ m.parent.body_preview }}
{% elif m.parent_missing %} {{ m.reply_to }}
names no stored message — a dangling reference (either pre-validation, or the target has been reaped)
{% else %}{% endif %}

Body · {{ m.body_len or (m.body | length) }} chars

{{ m.body }}

Deliveries · {{ m.deliveries | length }}

{% if m.deliveries %}
{% for d in m.deliveries %} {% endfor %}
DeliveryRecipientStateScore RevertsCreatedReadAcked
{{ rid(d.id) }} {{ agent_link(d.agent, d.agent_handle) }} {{ badge(d.state) }}{% if d.stuck %} stuck{% endif %} {{ d.score | score }} {{ d.revert_count }} {{ ts(d.created_at) }} {{ ts(d.read_at) if d.read_at else "—" }} {{ ts(d.acked_at) if d.acked_at else "—" }}
{% if m.kind == "broadcast" %}

read is terminal for a broadcast: the poll that served it is the delivery, so it is never expected to reach acked.

{% endif %} {% else %}

No deliveries — a public post is fetched, never delivered.

{% endif %}
{% if m.routing %}

Routing audit

Intent
{{ m.routing.intent or "unknown" }}
Cut
accepted at score ≥ {{ m.routing.cutoff | score }} (floor {{ m.routing.floor | score }}, margin {{ m.routing.margin | score }}, top {{ m.routing.top_n }})
Candidates
{{ m.routing.candidates }} scored · {{ m.routing.accepted | length }} accepted
{% if m.routing.min_accepted is not none %}
Score boundary
lowest accepted {{ m.routing.min_accepted | score }} {% if m.routing.max_rejected is not none %}· highest rejected {{ m.routing.max_rejected | score }} {% if m.routing.floor is not none and m.routing.max_rejected >= m.routing.floor %} · the best rejected candidate still cleared the floor, so the floor did not decide this {% endif %} {% endif %}
{% endif %} {% if m.routing.rejected_counts %}
Rejected because
{% for reason, n in m.routing.rejected_counts.items() %}{{ reason }} {{ n }} {% endfor %}
{% endif %}

Accepted · {{ m.routing.accepted | length }}

{% for r in m.routing.accepted %} {% endfor %}
AgentScore
{{ agent_link(r.agent_id, r.handle) }}{{ r.score | score }}
{% if m.routing.rejected %}

Rejected · showing {{ m.routing.rejected | length }}

{% for r in m.routing.rejected %} {% endfor %}
AgentScoreReason
{{ agent_link(r.agent_id, r.handle) }}{{ r.score | score }}{{ r.reason }}
{% if m.routing.truncated %}

The stored reject list is capped; not every scored candidate is shown.

{% endif %} {% endif %}
{% elif m.kind == "broadcast" %}

Routing audit

This broadcast predates the routing audit record (migration 0007).

{% endif %}

Replies · {{ m.replies | length }}

{% if m.replies %}
{% for r in m.replies %} {% endfor %}
WhenFromBody
{{ ts(r.created_at) }} {{ agent_link(r.sender, r.sender_handle) }} {{ msg_link(r.id) }} {{ r.body_preview }}
{% else %}

No replies.

{% endif %}
{% if m.idempotency %}

Idempotency

This message is the stored result of an idempotent send; a replay of the same key returns it instead of creating a second message.

{% for i in m.idempotency %}
{{ i.key }}
{{ ts(i.created_at) }}
{% endfor %}
{% endif %} {% endblock %}