Skip to content

fix(serve_harness): the per-run home wins over an inherited HIPFIRE_HOME - #709

Merged
Kaden-Schutt merged 1 commit into
masterfrom
fix/serve-harness-home-isolation
Sep 4, 2026
Merged

fix(serve_harness): the per-run home wins over an inherited HIPFIRE_HOME#709
Kaden-Schutt merged 1 commit into
masterfrom
fix/serve-harness-home-isolation

Conversation

@Kaden-Schutt

Copy link
Copy Markdown
Collaborator

Summary

spawn_serve isolates the daemon with HOME=<run home> + <run home>/.hipfire/config.toml, but inherits os.environ — and ConfigPaths::discover prefers HIPFIRE_HOME over $HOME/.hipfire. hw-gate exports HIPFIRE_HOME per lane (hw-gate.yml:207), so every gate daemon read the lane's pinned config (no [speculation] section) instead of the harness's mtp = "off"; the schema default auto then auto-attached a sibling .mtp head wherever one existed.

On #691's run (33900101473) the lanes diverged on host state: hiptrx has qwen3.8-27b.mq4v2.xt.mtp beside the symlink target → chain ran under MTP (drafter=mtp, one degenerate turn → fixture fail); hipx has no sidecar → AR, clean. The pre-flight printed mtp_mode: off on both — the harness's intent, not what the daemon resolved.

Evidence (hiptrx, base daemon 17ba7dfa, identical config.toml with mtp="off")

env result
HIPFIRE_HOME=<gate lane home> (inherited) MTP head loaded ×1
HIPFIRE_HOME=<run home>/.hipfire (this fix) no head

Change

One env entry: HIPFIRE_HOME=os.path.join(home, ".hipfire") in spawn_serve's daemon env. Scripts-only; run.py runs the harness from the PR checkout, so ladder PRs pick it up on rebase. Also removes a class of "which config did the daemon actually read" ambiguity from every harness user, not just the gate.

Which surface(s) does this touch?

  • docs / CI / scripts — scripts/serve_harness.py only

spawn_serve isolates the daemon by setting HOME=<run home> and writing
<run home>/.hipfire/config.toml — but it inherits os.environ, and
ConfigPaths::discover prefers HIPFIRE_HOME over $HOME/.hipfire. hw-gate
exports HIPFIRE_HOME per lane, so every gate daemon resolved the lane's
pinned config (no [speculation] section) instead of the harness's
`mtp = "off"`, and the schema default `auto` auto-attached a sibling .mtp
head wherever one existed. On #691's run (33900101473) that made the two
lanes diverge on host state: hiptrx has qwen3.8-27b.mq4v2.xt.mtp beside
the symlink target and ran the chain under MTP (one degenerate turn);
hipx has no sidecar and ran AR. The pre-flight printed `mtp_mode: off`
either way — the harness's intent, not what the daemon resolved.

Reproduced on hiptrx with the base daemon, same config.toml, `mtp="off"`:
inherited HIPFIRE_HOME -> "MTP head loaded"; HIPFIRE_HOME=<run home>/.hipfire
-> no head. The env now sets HIPFIRE_HOME to the run home explicitly.
@Kaden-Schutt
Kaden-Schutt merged commit 9213cd4 into master Sep 4, 2026
Kaden-Schutt added a commit that referenced this pull request Sep 4, 2026
revert: serve_harness HIPFIRE_HOME override (#709)
@Kaden-Schutt
Kaden-Schutt deleted the fix/serve-harness-home-isolation branch September 4, 2026 17:48
ghazni101 pushed a commit to ghazni101/hipfire that referenced this pull request Sep 5, 2026
…ness-home-isolation"

This reverts commit 9213cd4, reversing
changes made to e98b461.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant