Upstreams the 2026-07-09 live hot-fix on web1 into the framework SSOT, plus brings the one genuinely untracked tmux tool under source control.
send-message.sh — unique per-invocation paste buffer. The script used a fixed tmux buffer name (__mosaic_send) shared by every concurrent sender on a tmux server. Concurrent invocations raced: load-buffer overwrote a peer's payload, and paste-buffer -d deleted the buffer underneath a peer — cross-delivering or dropping messages. This bit the fleet during the 2026-07-09 simultaneous restart (standing briefs swapped between agent sessions; one agent received another's role brief). Buffer name is now __mosaic_send_$$_$(date +%s%N). Also adds explicit delete-buffer cleanup when both paste attempts fail (named buffers are exempt from tmux buffer-limit eviction, so orphans would accumulate forever) — found in review.
auto-submit-drafts.sh — now tracked. Coordinator draft-flush watchdog; until now existed only as a loose file in the deployed ~/.config/mosaic/tools/tmux/ with no source-control home. Verbatim import.
test-send-message-socket.sh — concurrency regression lock. 5 parallel sends to 5 distinct panes on an isolated -L socket; asserts every pane got exactly its own payload (no drop, no cross-delivery). Verified to fail 3/3 runs against the pre-fix script and pass post-fix.
README.md — file list updated (auto-submit-drafts.sh, agent-send.test.sh).
Why now
The fix currently exists only in the live deployed copy on web1. The next framework redeploy (already queued for the agent-send --class go-live) would overwrite it with the still-racy upstream version and silently reintroduce the cross-delivery bug. This PR makes the SSOT carry the fix before that happens.
Verification
bash -n + shellcheck clean on changed scripts (sole warning SC2034 attempt is pre-existing, untouched code).
agent-send.test.sh: 11/11 pass.
test-send-message-socket.sh (incl. new concurrency lock): pass; pre-fix script fails it 3/3.
Independent review (author ≠ reviewer): APPROVE; the one should-fix (buffer leak on failed paste) remediated and re-verified.
Notes for merge/deploy
Preserves the upstream -L socket / EFFECTIVE_TARGET structure — no behavior change vs. main other than the buffer naming + failure-path cleanup.
After merge, the framework redeploy propagates this to hosts; live web1 copy already carries the buffer fix (hot-fix by Mos), so redeploy converges rather than regresses.
## What
Upstreams the 2026-07-09 live hot-fix on web1 into the framework SSOT, plus brings the one genuinely untracked tmux tool under source control.
1. **`send-message.sh` — unique per-invocation paste buffer.** The script used a fixed tmux buffer name (`__mosaic_send`) shared by every concurrent sender on a tmux server. Concurrent invocations raced: `load-buffer` overwrote a peer's payload, and `paste-buffer -d` deleted the buffer underneath a peer — cross-delivering or dropping messages. This bit the fleet during the 2026-07-09 simultaneous restart (standing briefs swapped between agent sessions; one agent received another's role brief). Buffer name is now `__mosaic_send_$$_$(date +%s%N)`. Also adds explicit `delete-buffer` cleanup when both paste attempts fail (named buffers are exempt from tmux `buffer-limit` eviction, so orphans would accumulate forever) — found in review.
2. **`auto-submit-drafts.sh` — now tracked.** Coordinator draft-flush watchdog; until now existed only as a loose file in the deployed `~/.config/mosaic/tools/tmux/` with no source-control home. Verbatim import.
3. **`test-send-message-socket.sh` — concurrency regression lock.** 5 parallel sends to 5 distinct panes on an isolated `-L` socket; asserts every pane got exactly its own payload (no drop, no cross-delivery). **Verified to fail 3/3 runs against the pre-fix script and pass post-fix.**
4. `README.md` — file list updated (`auto-submit-drafts.sh`, `agent-send.test.sh`).
## Why now
The fix currently exists **only in the live deployed copy** on web1. The next framework redeploy (already queued for the `agent-send --class` go-live) would overwrite it with the still-racy upstream version and silently reintroduce the cross-delivery bug. This PR makes the SSOT carry the fix before that happens.
## Verification
- `bash -n` + shellcheck clean on changed scripts (sole warning SC2034 `attempt` is pre-existing, untouched code).
- `agent-send.test.sh`: 11/11 pass.
- `test-send-message-socket.sh` (incl. new concurrency lock): pass; pre-fix script fails it 3/3.
- Independent review (author ≠ reviewer): APPROVE; the one should-fix (buffer leak on failed paste) remediated and re-verified.
## Notes for merge/deploy
- Preserves the upstream `-L` socket / `EFFECTIVE_TARGET` structure — no behavior change vs. main other than the buffer naming + failure-path cleanup.
- After merge, the framework redeploy propagates this to hosts; live web1 copy already carries the buffer fix (hot-fix by Mos), so redeploy converges rather than regresses.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Upstream the 2026-07-09 live hot-fix from web1: send-message.sh used a fixed
tmux buffer name (__mosaic_send) shared by all concurrent senders on one
server — load-buffer overwrote load-buffer and paste-buffer -d deleted
underneath peers, cross-delivering or dropping messages. Bit the fleet during
the simultaneous restart (standing briefs swapped between sessions). Buffer
name is now unique per invocation (PID + nanoseconds).
Also brings auto-submit-drafts.sh (coordinator draft-flush watchdog, until now
only a loose file in the deployed ~/.config/mosaic/tools/tmux/) under source
control, and extends test-send-message-socket.sh with a concurrency lock:
5 parallel sends to distinct panes, asserting no drop and no cross-delivery.
The lock fails 3/3 runs against the pre-fix script and passes post-fix.
Without this, the next framework redeploy would regress the live fix.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Upstreams the 2026-07-09 live hot-fix on web1 into the framework SSOT, plus brings the one genuinely untracked tmux tool under source control.
send-message.sh— unique per-invocation paste buffer. The script used a fixed tmux buffer name (__mosaic_send) shared by every concurrent sender on a tmux server. Concurrent invocations raced:load-bufferoverwrote a peer's payload, andpaste-buffer -ddeleted the buffer underneath a peer — cross-delivering or dropping messages. This bit the fleet during the 2026-07-09 simultaneous restart (standing briefs swapped between agent sessions; one agent received another's role brief). Buffer name is now__mosaic_send_$$_$(date +%s%N). Also adds explicitdelete-buffercleanup when both paste attempts fail (named buffers are exempt from tmuxbuffer-limiteviction, so orphans would accumulate forever) — found in review.auto-submit-drafts.sh— now tracked. Coordinator draft-flush watchdog; until now existed only as a loose file in the deployed~/.config/mosaic/tools/tmux/with no source-control home. Verbatim import.test-send-message-socket.sh— concurrency regression lock. 5 parallel sends to 5 distinct panes on an isolated-Lsocket; asserts every pane got exactly its own payload (no drop, no cross-delivery). Verified to fail 3/3 runs against the pre-fix script and pass post-fix.README.md— file list updated (auto-submit-drafts.sh,agent-send.test.sh).Why now
The fix currently exists only in the live deployed copy on web1. The next framework redeploy (already queued for the
agent-send --classgo-live) would overwrite it with the still-racy upstream version and silently reintroduce the cross-delivery bug. This PR makes the SSOT carry the fix before that happens.Verification
bash -n+ shellcheck clean on changed scripts (sole warning SC2034attemptis pre-existing, untouched code).agent-send.test.sh: 11/11 pass.test-send-message-socket.sh(incl. new concurrency lock): pass; pre-fix script fails it 3/3.Notes for merge/deploy
-Lsocket /EFFECTIVE_TARGETstructure — no behavior change vs. main other than the buffer naming + failure-path cleanup.🤖 Generated with Claude Code