Repository navigation
v0.0.18 — One command, a whole fleet
v0.0.18 — One command, a whole fleet
Until now send took one peer. Five machines meant five commands, five PINs to
remember, five logs to read, and no single answer to "did it work?".
zapsend send ./run-42.tar.zst --to gpu-box,edge-1,edge-2 --json{
"ok": true, "command": "send", "count": 3, "failed": 0,
"bytes": 1048576, "delivered": 3145728,
"peers": [
{"name": "gpu-box", "ok": true, "alias": "gpu-box", "ip": "100.64.0.7", "port": 53317, "bytes": 1048576},
{"name": "edge-1", "ok": true, ...},
{"name": "edge-2", "ok": true, ...}
]
}bytes is the file, delivered is what the fleet actually absorbed. Exit code
0 only when every name got the files.
What it does when something is wrong
A fleet push must not be all-or-nothing. One dead machine should not cost the
other four their delivery, and it must not be silent either:
sending 1 file(s), 19 B to 2 peer(s)
→ w1 (10.0.2.2:53485)
✓ w1
✗ nope: not in the hosts file — `zapsend trust nope --ip <addr>` first
{"ok":false,"failed":1,"delivered":19,...}
{"error":"1 of 2 peer(s) failed","ok":false}
Exit 1, the good delivery stands, the bad name is named. A peer that times out
or refuses is reported the same way, with its error attached to its own entry.
Decisions worth naming
- Names come from the hosts file, not from discovery. A scan answers "who is
nearby?" and a human picks one; that is the opposite of unattended.zapsend trustonce per machine, then a list works forever. - Sequential, not parallel. One uplink shared by three simultaneous uploads
is slower for everyone, and a fleet push is usually logs and artifacts. When
there is a real case for parallel, it becomes--parallel N, not the default. - Each host keeps its own remembered PIN.
--pinoverrides all of them for
the odd fleet that shares one. - A single name keeps the old JSON shape.
{"peer": {...}}with nopeers
array, so nothing that already parsessend --jsonbreaks.
Verified
Windows build, WinPE 10.0.26100.1742 under QEMU, two names pointing at one Linux
peer: both delivered, delivered 38 for two 19-byte files, exit 0; then
--to w1,nope → w1 delivered, nope reported, exit 1, and the files were
found on the Linux side.
Linux suite: 25 checks for fan-out (delivery to all names, dead peer, untrusted
name, single-name JSON shape), plus the rest unchanged — 15 unit, 31 compat, 28
json, 25 pull-resume, 29 hosts, 19 pull, 17 resume.
Still missing for a real fleet
pull --from all (the other half), watch (push what appears), and sync
(send only what changed). Fan-out is the first of those three because everything
else composes on top of it.