From e9605df6ff18beb7c29a0ccf693f42a2d2000c1c Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Wed, 2 Sep 2026 10:36:49 -0700 Subject: [PATCH] docs(althing): the fast outage probe never touched the timeout it claimed to test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My smoke test used a refused port on a live host and presented it as the check for the 2 s budget. Measured: it returns in 79 ms, because a refused port answers instantly with an RST. It verifies the glyph and nothing about the deadline. An address that black-holes — an unrouted LAN host — takes 2.065 s and is the one that exercises it. Both are now in the page with what each actually proves, because letting the fast case imply the slow one is how a status line that hangs the prompt ships with a green test beside it. Found by forseti in their own copy of the same probe and confirmed here rather than adopted. The smoke test also moves from expected-values-in-trailing-comments to printing `got [x] wanted [y]` on one line. The comment form is the shape that produced the false pass that caught two agents inside an hour, and the expected-value column is what caught it — so the page should use the thing it recommends. --- docs/runbooks/althing-deploy.md | 34 +++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) 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