diff --git a/docs/runbooks/althing-deploy.md b/docs/runbooks/althing-deploy.md index 05d5fd0..3c3cb92 100644 --- a/docs/runbooks/althing-deploy.md +++ b/docs/runbooks/althing-deploy.md @@ -318,9 +318,24 @@ edited directly and was *ahead* of the tracked copy; a reflexive `cp` from the repo would have destroyed the better version. The tracked copy is intent, the live path is reality, and reality is sometimes right. -Smoke test — Claude Code runs it in a **bare shell**, so unset the althing -env vars or you will test your own session's identity instead of the resolution -logic: +Smoke test — **strip the althing env vars, or you will test your own session's +identity instead of the resolution logic.** A hand-run inherits the exported +`ALTHING_HANDLE` from the session you run it in, so the seat's own directory and +a directory with no althing identity render identically and both look right. +That false pass caught two agents within one hour on 2026-09-02. + +⚠ **Open question — whether Claude Code's own invocation inherits the +environment is NOT established, and nothing here depends on it.** An earlier +version of this page asserted a "bare shell"; that claim was never verified and +the evidence points the other way. Measured 2026-09-02: this box's Claude Code +process carries `ALTHING_HANDLE` and `ALTHING_POST_OFFICE` in its own `environ` +(inherited from the `dev-launch` shell), and a spawned child would normally +inherit both — observed independently on two seats. Whether Claude Code scrubs +the environment before spawning the status-line command was not observed either +way. **Write code that does not depend on the environment being present**, which +`althing-statusline` already does: environment first, launch history second, and +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