How Museion discovers the hermes binary #36

Closed
opened 2026-08-29 09:36:26 +02:00 by AlexKucera · 1 comment
Owner

Part of #12

Blocked by: #35 (closed — fact base in its resolution comment)

Question

How does Museion discover the hermes binary at launch — probe a candidate-path list, resolve through a login shell (zsh -l -c 'command -v hermes'), a settings field the writer can override, or a combination? And what does the gate show when discovery finds nothing? #35's resolution supplies the documented probe order and layout facts to decide against.

[Generated by AI]

Part of #12 Blocked by: #35 (closed — fact base in its resolution comment) ## Question How does Museion discover the `hermes` binary at launch — probe a candidate-path list, resolve through a login shell (`zsh -l -c 'command -v hermes'`), a settings field the writer can override, or a combination? And what does the gate show when discovery finds nothing? #35's resolution supplies the documented probe order and layout facts to decide against. [Generated by AI]
AlexKucera added the wayfinder:grilling label 2026-08-29 09:36:26 +02:00
AlexKucera self-assigned this 2026-09-03 10:43:11 +02:00
Author
Owner

Resolution

Discovery is deterministic re-resolution every launch — no cached input, no override — folded into the health check as one iterate-until-pass loop. Decided point by point:

  1. Probe list — full six-path order from #35, Homebrew/root included. A found working binary beats purity; the probes are file-exists checks. Order: ~/.local/bin/hermes → ~/.local/bin/hermes-acp → ~/.hermes/hermes-agent/venv/bin/hermes → /opt/homebrew/bin/hermes, /usr/local/bin/hermes → /usr/local/lib/hermes-agent/venv/bin/hermes.
  2. Login-shell fallback — last resort only. One zsh -l -c 'command -v hermes' shot fires only after every absolute probe misses, before declaring not-found. Fast path stays ~0 ms.
  3. No persistence input. Every launch re-resolves; a cached path is never discovery input. What gets recorded in state.json is #39's business — this leaves it free to record the resolved path as output.
  4. No user override in M0. Probe list + shell fallback covers documented installs; add a settings field when a real user hits a wall (YAGNI).
  5. Iterate until --check passes. First candidate in probe order that exists and passes acp --check wins; the resolved path is always shown. Candidates exist but all fail → gate fails, reporting the first (highest-priority) candidate's stderr. Nothing found anywhere → gate fail with install instructions (exact presentation is #38's).

Shape this hands the build

  • Discovery + health are one loop, not two phases: probe → exists? → run acp --check (stdin closed, 5 s timeout) → pass = resolved; fail = next candidate. Version comes from the resolved binary via acp --version.
  • Timing: healthy installs pass on candidate 1 (~0.4 s). Pathological worst case (all six exist, all fail) is ~5 s per failing candidate — the ceiling is N×5 s, not 5 s.
  • Gate states for #38 to design against: pass (resolved path + version), found-but-failing (stderr, re-check), not-found (install instructions, re-check).

[Generated by AI]

## Resolution Discovery is **deterministic re-resolution every launch — no cached input, no override** — folded into the health check as one iterate-until-pass loop. Decided point by point: 1. **Probe list — full six-path order from #35, Homebrew/root included.** A found working binary beats purity; the probes are file-exists checks. Order: `~/.local/bin/hermes` → `~/.local/bin/hermes-acp` → `~/.hermes/hermes-agent/venv/bin/hermes` → `/opt/homebrew/bin/hermes`, `/usr/local/bin/hermes` → `/usr/local/lib/hermes-agent/venv/bin/hermes`. 2. **Login-shell fallback — last resort only.** One `zsh -l -c 'command -v hermes'` shot fires only after every absolute probe misses, before declaring not-found. Fast path stays ~0 ms. 3. **No persistence input.** Every launch re-resolves; a cached path is never discovery *input*. What gets recorded in state.json is #39's business — this leaves it free to record the resolved path as *output*. 4. **No user override in M0.** Probe list + shell fallback covers documented installs; add a settings field when a real user hits a wall (YAGNI). 5. **Iterate until `--check` passes.** First candidate in probe order that exists and passes `acp --check` wins; the resolved path is always shown. Candidates exist but all fail → gate fails, reporting the **first (highest-priority) candidate's stderr**. Nothing found anywhere → gate fail with install instructions (exact presentation is #38's). ### Shape this hands the build - Discovery + health are **one loop, not two phases**: probe → exists? → run `acp --check` (stdin closed, 5 s timeout) → pass = resolved; fail = next candidate. Version comes from the resolved binary via `acp --version`. - Timing: healthy installs pass on candidate 1 (~0.4 s). Pathological worst case (all six exist, all fail) is ~5 s per failing candidate — the ceiling is N×5 s, not 5 s. - Gate states for #38 to design against: **pass** (resolved path + version), **found-but-failing** (stderr, re-check), **not-found** (install instructions, re-check). [Generated by AI]
Sign in to join this conversation.