repo-mailbox/scripts
Kjell Tore Guttormsen 9aa9e07d75 fix(engine): never deliver a broadcast back to its own sender
A --broadcast landed in _broadcast/inbox with no seen-set entry for the
sender, so the announcing repo got its own announcement injected at its
next session start. Pure noise: the sender already knows its own news.

coord-send now records the delivered filename in _broadcast/seen/<sender>
at delivery time, reusing the existing per-repo seen set rather than
introducing a second exclusion mechanism. Filtering on the from: field at
read time was rejected: from: is sender-controlled, so it would let any
repo suppress a broadcast for another by forging the field.

The seen file is keyed by the RAW sender name because coord-inbox keys it
by the unsanitized repo name; using SAFE_FROM would silently miss for
names like "my repo". A raw name in a path needs a guard, so senders
containing a slash or equal to . / .. skip the marking instead.

Selftest 64 -> 68 checks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvTviFeoMCKJcALATRempy
2026-07-25 06:11:26 +02:00
..
coord-done.sh feat(engine): harden mailbox CLIs for v0.2.0 2026-07-24 19:57:40 +02:00
coord-inbox.sh feat(engine): harden mailbox CLIs for v0.2.0 2026-07-24 19:57:40 +02:00
coord-selftest.sh fix(engine): never deliver a broadcast back to its own sender 2026-07-25 06:11:26 +02:00
coord-send.sh fix(engine): never deliver a broadcast back to its own sender 2026-07-25 06:11:26 +02:00