04 · Smoke-exec cascade
scripts/smoke-exec.sh is a cascading shell script that exercises every
primitive lakeshore daemon exec supports. Cheap, comprehensive, and
unforgiving — it bails on the first failure so you fix one thing at a
time.
Exercises
In order, one check per aspect of the exec wire:
- Exactly one live daemon is registered (or
$LAKESHORE_DAEMONnames one). - Minimal stdout round-trip —
echo hi. - stderr stays separated from stdout.
- Exit code propagation —
exit 7gives the CLI rc 7. --envpassthrough.--stdin -piping.- Filesystem write/read on the daemon.
--timeoutenforcement — the wire's-2, which bash reports as 254.- Long-poll spanning multiple poll windows (
sleep 40). python3on the host.
Requires
- A control plane reachable at
$LAKESHORE_URL(or a savedlakeshore auth loginwhen it's unset). - Exactly one live daemon registered in the namespace. The script
first runs
daemon cleanup --older-than 5m --yesto reap stale rows, then refuses to guess on zero or multiple.
Set LAKESHORE_DAEMON=<id-or-label> to skip that discovery entirely
and target a specific daemon.
Run
The script prefers the local build at lakeshore/dist/cli/index.js so
you test what's under iteration. Set LK=lakeshore to run the
globally-installed npm package instead.
Expected output
A green ✓ and a label per check, ending in
✓ all N checks passed against <url>. Any red ✗ stops the cascade
and the script exits 1.
If it fails
| Check | Symptom | Likely cause |
|---|---|---|
| 1 | no live daemons registered | The nymph pane stopped — restart it, or set LAKESHORE_DAEMON. |
| 1 | N live daemons — refuse to guess | An earlier run left daemons registered. Kill the extras (lakeshore daemon kill --prefix ... --yes) or set LAKESHORE_DAEMON. |
| 1 | daemon list reachable failed | The control plane is down, or auth isn't configured. |
| 4 | wrong exit code | Exit-code propagation broken between the daemon, the control plane, and the CLI. |
| 8 | expected 254 or -2, got … | Timeout handling. The daemon either ran past the deadline or surfaced its own error code instead of the wire's -2. |
| 9 | long-poll check failed | The CLI's poll window or the control plane's long-poll budget regressed. |
Status
Manual. Tracked via the script's exit code.