feat(orchestrator): radio receipts inline (005 phase B)

Requirement 005: every radio message in the Stream and the radio log shows the avatars of the agents that read it, with read time and an ack badge where a receipt exists; receipt rows no longer appear as entries of their own, and the sender shows once. Read times come from seen marks, stamped only after a fresh presence pass no older than two sighting intervals; a stored time before its row is refused. An operator message links to its relay row through the ts radio.py prints first on stdout right after store(), checked against an exact row (sender Operator, relay text, targets, no to_sessions); a ts shared by two rows shows no readers. radio.py clips printed addresses; the hub keeps the first stdout line whole. Accepted MEDUSA false positives: MM-SCAN-058 at server.py:73, JB-SCAN-641 and JB-SCAN-616 at radio.py:389 (clip, the output sanitizer), FLA-SCAN-055 at radio.py:109. Committed below the 90/5 bar on the operator's word; the receipts e2e runs through the queue.

🎯 Fix: 89 %
💥 Break: 6 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 84
🚦 Gate: ⛔ fix 89 % < 90, break 6 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-13 17:19:39 +00:00
1 parent 92f5087eed
commit 30b2a32095
25 files changed
+1432 -87

No files matched your search

+31 -1
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import functools
import threading
import time
from dataclasses import dataclass
@@ -29,6 +30,15 @@ from .messaging import Messaging
from .names import Names
from .offices import Offices
from .presence import SNAPSHOT
from .receipts import (
NAMES,
READS,
SIGHTING,
ReceiptNames,
ReceiptReads,
sight,
sighting_pass,
)
from .redirects import Redirects
from .requesting import Requesting
from .resources import RESOURCES, SAMPLES
@@ -43,7 +53,7 @@ from .tasking import Tasking
from .timeline import Timeline
from .transcripts import Transcripts
from .tree import TREE_HEARTBEAT, Tree
from .view import View
from .view import RADIO_WINDOW, View
from .voicenotes import VoiceNotes
@@ -90,6 +100,8 @@ class Hub(Mcp, Reviewing, Asking, Messaging, Choosing, Approving, Denying, Reque
log: Log
batches: Pending
names: Names
receipt_names: ReceiptNames
receipt_reads: ReceiptReads
watch: Watch
tree: Tree
agent_sessions: Path
@@ -117,6 +129,22 @@ class Hub(Mcp, Reviewing, Asking, Messaging, Choosing, Approving, Denying, Reque
return f"{signing.origin_of(self.public_port)}/"
def sighting(hub: Hub, stop: threading.Event) -> threading.Thread:
"""Args:
hub: the hub whose receipt stores record the host snapshot's names
and the first sighting of each read row.
stop: ends the thread once set.
Returns:
The started daemon thread that runs sighting_pass() every SIGHTING
seconds, whether or not a page builds the state.
"""
step = functools.partial(sighting_pass, hub.scripts.skills, hub.council, hub.receipt_names, hub.receipt_reads, hub.agent_sessions, RADIO_WINDOW)
thread = threading.Thread(target=sight, args=(step, hub.receipt_reads, stop, SIGHTING), name="receipt names", daemon=True)
thread.start()
return thread
def open_hub(council: Path, pages: Path, public_port: int, state: Path, host_state: Path, transcripts: Path, scripts: Runner, templates: Path, places: Places, model: Model, engines: Engines, approvers: Path, redirects: Redirects) -> Hub:
uploads = state / "uploads"
uploads.mkdir(exist_ok=True)
@@ -141,6 +169,8 @@ def open_hub(council: Path, pages: Path, public_port: int, state: Path, host_sta
log=Log(state / "log.jsonl"),
batches=Pending(),
names=Names(state / "names.json"),
receipt_names=ReceiptNames(state / NAMES),
receipt_reads=ReceiptReads(state / READS),
settings=settings,
redirects=redirects,
watch=Watch(),