Files
z b3d1c57042 fix: make the test suite hermetic (HANZO_API_KEY, discovery cache)
Two holes, both caught by the suite's own gates:

- tests/cli.rs: the hanzo() helper isolated HOME and the XDG dirs but
  not HANZO_API_KEY, and Seam::open reads a machine key at the point of
  use. An ambient key made the signed-out test signed in, reproducing the
  Nov 14 CI failure exactly ('no surface answered' instead of the login
  hint). The helper strips the key now; the test passes with one set.

- Makefile: the issuer tests fetch the live discovery documents and
  cache them through dirs::cache_dir, which with XDG_CACHE_HOME unset is
  $HOME/.cache — so make test wrote the runner's HOME and the gate in
  hanzo.yml refused it (forge run #85 on the PR #72 merge: hanzo.ai,
  hanzo.id, lux.id). The cache now lives under target/test-cache, the
  same move the gate already makes for CARGO_HOME and RUSTUP_HOME.
  Verified by replicating the gate's writable-HOME run locally: make
  test exits 0 and the temp HOME is empty afterwards.
2026-11-21 15:46:48 -08:00
..