Skip to content

fix(coord): broadcasts addressed the roster's DISPLAY LABEL, not the recipient's path - #384

Open
wshallwshall wants to merge 2 commits into
mainfrom
claude/builder-sessions-stopped-49daca
Open

fix(coord): broadcasts addressed the roster's DISPLAY LABEL, not the recipient's path#384
wshallwshall wants to merge 2 commits into
mainfrom
claude/builder-sessions-stopped-49daca

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

mail.ps1 -To all built its target list from the roster's Worktree field -- a bare leaf name -- instead of Cwd.

ConvertTo-BoxKey (scripts/coord/mail-key.ps1:49) hashes the FULL PATH but slugs the LEAF, so a bare label mints <leaf>-<hash-of-label> beside the real <leaf>-<hash-of-path>. Same visible name, different key, and no reader ever drains it.

Both of the signals a sender would check look healthy: an ls of box/ shows a plausibly-named directory, and the sender is told "Queued 1 message(s)".

Measured

40 messages stranded across 10 boxes    against 4 real receipts, over two days
every broadcast this repo has ever sent

The single-recipient branch never had the defect because it runs Resolve-Path -- which is exactly why direct sends worked and the channel looked healthy throughout.

Two changes

  • the broadcast loop reads Cwd. Its self-exclusion test also compared a bare name to an absolute path, so it never matched and self-exclusion rested entirely on IsSelf. Against Cwd it finally does the job it was written to do.
  • a target gate that throws unless every target is an absolute existing directory. Deliberately redundant with both branches, because ConvertTo-BoxKey accepts any string and returns a plausible key for it.

Scope

files    scripts/coord/mail.ps1  (+43/-3)
docs/, BACKLOG    ZERO
gates at commit   ledger, leak guard, secrets -- all passed

49 stranded messages were relocated into their reader boxes by hand (40, plus a later batch of 9), verified delivered: receipts written, seen-counts moved, one landing in a live drain.

Operational note: the fixed file was copied into the primary checkout and 8 live worktrees ahead of this merge, so those trees show mail.ps1 as modified until it lands. Once on main those copies are redundant and can be dropped. Verified by the Lander before push: the copy in this seat's worktree is byte-identical to the commit.

…recipient's path

scripts/coord/mail.ps1 -To all built its target list from the roster's `Worktree`
field, which is a bare leaf name ("builder-1-session-d229ce"). The addressable
value is `Cwd`. ConvertTo-BoxKey slugs the LEAF but hashes the FULL PATH, so a
bare label mints "<leaf>-<hash-of-label>" beside the real "<leaf>-<hash-of-path>":
same visible name, different key, no reader ever drains it.

Every broadcast this repo has sent went into such a box. Measured 2026-08-13:
40 messages stranded across 10 boxes against 4 real receipts in two days,
including an OWNER-AFK "keep working" broadcast to all 8 seats that nobody
received. The single-recipient branch never had the bug because it runs
Resolve-Path, so direct sends worked and the channel looked healthy.

The failure is silent: an ls of box/ looks correct, and the sender is told
"Queued 1 message(s)".

Two changes:

  - the broadcast loop reads Cwd. Its self-exclusion test also compared a bare
    name against an absolute path, so it never matched and self-exclusion rested
    entirely on IsSelf; against Cwd it now works as written.

  - a target gate before any key is derived: every target must be an absolute,
    existing directory or the send throws. Redundant with both branches on
    purpose, because ConvertTo-BoxKey accepts any string and returns a
    plausible key for it, and the next caller to build targets a third way will
    not remember this.

The 40 stranded messages were relocated to their reader boxes out of band.
@wshallwshall
wshallwshall enabled auto-merge (squash) August 14, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant