fix(coord): broadcasts addressed the roster's DISPLAY LABEL, not the recipient's path - #384
Open
wshallwshall wants to merge 4 commits into
Open
fix(coord): broadcasts addressed the roster's DISPLAY LABEL, not the recipient's path#384wshallwshall wants to merge 4 commits into
wshallwshall wants to merge 4 commits into
Conversation
…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
enabled auto-merge (squash)
August 14, 2026 03:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mail.ps1 -To allbuilt its target list from the roster'sWorktreefield -- a bare leaf name -- instead ofCwd.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
lsofbox/shows a plausibly-named directory, and the sender is told "Queued 1 message(s)".Measured
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
Cwd. Its self-exclusion test also compared a bare name to an absolute path, so it never matched and self-exclusion rested entirely onIsSelf. AgainstCwdit finally does the job it was written to do.ConvertTo-BoxKeyaccepts any string and returns a plausible key for it.Scope
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.ps1as 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.