fix(coord-send): stop rejecting dot-prefixed repo names

coord-send.sh:154 guarded the --to target with a `.*` case arm, which
rejects every leading-dot name instead of just `.` and `..`. A
dot-prefixed name is a real repo identity (basename of a git toplevel
under a hidden directory, e.g. ~/.claude) and was reported unreachable
by morning-driver via coord message 20260809T103138Z. Narrowed the
guard to reject exactly `.` and `..`, matching the equivalent guards
already used elsewhere in this file and in coord-done.sh.

coord-count.sh and coord-sweep.sh both enumerate the mailbox root with
a bare "$COORD"/* glob, which by construction never matches a
dot-prefixed directory - confirmed empirically before this change.
Fixing only the send-side guard would have let a dot-prefixed mailbox
receive mail that neither script could ever report or close on its
grace window. Both now also glob "$COORD"/.[!.]* to reach hidden
mailboxes without matching "." or "..".

coord-selftest.sh: 183 -> 191 checks, section 30 covers the fix and
both enumeration paths. Doc counts (README badge, CLAUDE.md) updated
to match; the catalog's mirrored badge is untouched pending release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CHmf1VfCvaYXamJxe5y6Vt
This commit is contained in:
Kjell Tore Guttormsen 2026-08-09 21:09:23 +02:00
commit f425a11311
6 changed files with 57 additions and 8 deletions

View file

@ -64,7 +64,12 @@ owes_reply() {
# Glob expansion under LC_ALL=C is already name-sorted. An unmatched glob
# expands to the literal pattern, which fails the -d test and is skipped.
for d in "$COORD"/*; do
# Two patterns, not dotglob: a bare "$COORD"/* never matches a dot-prefixed
# directory (e.g. .claude, a real repo's mailbox), and dotglob would also hand
# back "." and ".." plus stray dotfiles like .DS_Store - both filtered here
# only by luck of also failing -d. ".[!.]*" matches exactly the hidden
# directories, excluding "." and "..".
for d in "$COORD"/* "$COORD"/.[!.]*; do
[ -d "$d" ] || continue
name="$(basename "$d")"
# Reserved engine namespace (_broadcast): storage, not a correspondent.