diff --git a/docs/runbooks/althing-deploy.md b/docs/runbooks/althing-deploy.md index 3c3cb92..1812685 100644 --- a/docs/runbooks/althing-deploy.md +++ b/docs/runbooks/althing-deploy.md @@ -337,11 +337,37 @@ way. **Write code that does not depend on the environment being present**, which a seat started outside `dev-launch` has no handle in either place. Test with the variables stripped regardless, because that is the harder case: - printf '{"workspace":{"current_dir":"/tmp"}}' \ - | env -u ALTHING_HANDLE -u ALTHING_POST_OFFICE bash scripts/claude-statusline-command.sh + probe() { # $1 = cwd, $2 = what you expect + got=$(printf '{"workspace":{"current_dir":"%s"}}' "$1" \ + | env -u ALTHING_HANDLE -u ALTHING_POST_OFFICE \ + bash scripts/claude-statusline-command.sh) + printf 'got [%s] wanted [%s]\n' "$got" "$2" + } + probe /tmp '' # no althing identity + probe /home/lkraven/development/eshpfi-management '🔔 …' -Want: empty althing segment for a directory with no identity, `🔔` in a seat's -own directory, `📵` against an unreachable address. +⚠ **Print what you got beside what you wanted, on the same line.** Expected +values in trailing comments are what produced the false pass that caught two +agents inside an hour on 2026-09-02: `/tmp` rendered `🔔` and both of us read it +as "fine" rather than "that directory has no identity and should be empty." A +plausible value in the right shape is the hardest kind of wrong to see, and the +only thing that reliably catches it is the wanted value sitting on the same line +as the got value. + +### ⚠ The outage probe: a refused port does NOT test the timeout + +`📵` has two causes and they take different paths. Measured 2026-09-02 on +nh3-dev: + +| address | elapsed | what it proves | +|---|---|---| +| `http://10.100.50.40:9999` — refused port on a **live** host | **0.079 s** | the glyph, and nothing about the deadline | +| `http://10.100.50.199:8390` — **unrouted** host, black-holes | **2.065 s** | the 2 s budget actually fires | + +A refused port answers instantly with an RST, so the fast probe returns `📵` +without ever approaching the timeout. Use **both**, and know which is which — +letting the fast case imply the slow one is how a status line that hangs the +prompt ships with a green test beside it. ## Rollback