console: one sequential loop; host tests in one binary

The console reads a line, runs it to the end, and prints the result,
with and without a terminal. Notifications print while a command runs.
Ctrl-C during a command stops only the wait. 314 lines (was 480).

All host integration tests are modules of cli/tests/host/, so they run
in one parallel pool, and the probes build once. Warm, the 184 host
tests take 24 s (was about 45 s as seven binaries in sequence), and
cargo test --workspace takes 45 s.
This commit is contained in:
2026-10-23 09:14:26 +01:00
parent e3935031ac
commit 1617dfc1ee
12 changed files with 377 additions and 559 deletions
+2 -1
View File
@@ -5,7 +5,7 @@ Keep it that way.
## Priorities
1. **Correct.** Every behavior in `PROTOCOL.md` has a test in `cli/tests/`.
1. **Correct.** Every behavior in `PROTOCOL.md` has a test in `cli/tests/host/`.
2. **Simple and short.** Prefer the obvious code. No abstraction for one
caller. No configuration that nobody asked for.
3. **Readable.** A new reader must understand a file without the others.
@@ -37,6 +37,7 @@ Keep it that way.
```sh
nix flake check -L # all tests below; CI runs this on every push
nix develop -c cargo test --workspace # fast with a warm cache: run it during development
nix develop -c cargo test -p sausage --test host -- core:: # one topic of the host tests
nix develop -c cargo build --release -p agent --target wasm32-wasip2
nix develop -c cargo clippy --workspace
```