From 87001d7d380173c3d76246d4c0ecdd7b037a619f Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 9 Nov 2026 03:09:33 +0200 Subject: test: restore after tmux is stopped the ways a restart or logout stops it --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 81f859e..5df0473 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,7 @@ dingger does not need tmux running first; it attaches when a server appears. cargo test # engine tests + herdr state-machine tests tests/e2e.sh # end to end against an isolated tmux server tests/pi-live.sh # a real pi binary against dingger (new pi releases) +tests/shutdown.sh [dingger] [rounds] # restore after the ways an OS stops tmux ``` `tests/e2e.sh` starts its own tmux server, its own daemon (polling only every @@ -312,7 +313,8 @@ with why; cleared when seen or run again), names (the session's, not the terminal title's; named after the first run, renamed every 8 messages, yours kept, print runs and resumed old sessions named), screen detection without the -extension, restore, reloading an agent on an old extension (and refusing +extension, restore (after tmux and its real pis are stopped as a restart +stops them: SIGTERM to all at once, then SIGKILL), reloading an agent on an old extension (and refusing while busy or with a draft), drafts (reported, cleared, kept across a crash and put back by restore), cost (priced replies, counted once across a real `pi --fork`), context use (pi's footer's number, through a @@ -320,6 +322,16 @@ compaction), and exit. To try a release without installing it: `npm install --prefix /tmp/pi-next @earendil-works/pi-coding-agent@` (through `sfw`), then `tests/pi-live.sh /tmp/pi-next/node_modules/.bin/pi`. +`tests/shutdown.sh` stops tmux the ways a restart or logout can, each on +servers, a daemon and a state directory of its own, with fake agents: SIGTERM +to tmux; to the agents first; the daemon first; the terminal quitting first; +and, for 20 rounds each by default, SIGTERM and SIGKILL to everything at once +(tmux, its panes, the terminal's client, the daemon) in a random order at a +random moment. After each it logs in again (a fresh daemon if its own was +stopped; a terminal running `tmux new-session -As 0`) and checks the old +layout is offered and restoring brings back every session, window, pane, +directory, agent and command. + ## Layout - `crates/detect-core`: the detection engine and 22 manifests, from herdr. -- cgit v1.2.3