Skip to content

fix(bin): pin a Treehouse that supports the private pool root flag - #3

Merged
gkalyan merged 1 commit into
mainfrom
fm/fm-spawn-isolation-ci
Sep 21, 2026
Merged

gkalyan merged 1 commit into
mainfrom
fm/fm-spawn-isolation-ci

Conversation

@gkalyan

@gkalyan gkalyan commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Intent

CI on this repository is red on the required "Behavior tests (Herdr)" lane, and it has been since the last merge to main. Every pull request raised from now on inherits that red and cannot go green, so nothing can land until it is repaired.

The captain's merge of the merge-guard change (pull request 2) is blocked behind exactly this, and its pipeline run was deliberately cancelled rather than allowed to repair unrelated code, so that work is parked waiting on this repair. The captain's standing instruction on that one is "merge it when CI is green"; this task is what makes green reachable.

This is repairing existing breakage, not building anything new.

What Changed

  • bin/fm-install-treehouse.sh moves the pinned Treehouse from v2.0.1 to v2.3.0, swapping the four per-platform archive SHA256 checksums (linux amd64/arm64, darwin amd64/arm64) and refreshing the version references in the usage header, download-ceiling note, archive-layout note, and --version comment.
  • Adds a comment in the installer explaining the pin is a capability floor, not just reproducibility: bin/fm-spawn.sh acquires a secondmate home's worktree via treehouse get --root (from fm_treehouse_home_pool_root in bin/fm-wake-lib.sh), and --root/TREEHOUSE_ROOT only exists from v2.2.0 — below that the acquire fails with unknown flag: --root and every secondmate spawn is refused by the worktree-isolation assertion. Records "never move this pin below v2.2.0".
  • docs/architecture.md gains one line in the secondmate-home section stating the v2.2.0 --root requirement and the resulting refusal behavior when an older Treehouse is installed.

Risk Assessment

✅ Low: The change is a single CI tool pin bump whose four checksums match the official v2.3.0 checksums.txt byte-for-byte, whose archive layout and --version string satisfy the installer's own gates, and whose entire CLI surface used by the repo (get/--lease/--lease-holder/--root, return --force/--if-lease-*, prune --all --yes --root) plus the pool state layout are unchanged from the previous pin.

Testing

I stood the repair up the way CI does: ran bin/fm-install-treehouse.sh for real (live download, checksum verify, version assertion) and put the resulting binary on PATH for the lane's treehouse-dependent behavior tests. The red lane's root cause reproduces exactly at the tool boundary — the previous pin v2.0.1 answers treehouse get --root with unknown flag: --root, which is the acquire bin/fm-spawn.sh has issued for secondmate homes since the last merge — while the new pin performs a real leased acquire into the home-private pool root; v2.1.0 rejects and v2.2.0 accepts, confirming the v2.2.0 floor the comment and docs claim. All four pinned archives hash to the published release bytes, including the linux-amd64 asset the ubuntu lane actually installs. With the pinned binary, the workspace-per-home, presentation and autodetect real-Herdr scripts all completed green (43 assertions, exit 0), and the installer refuses a tampered checksum, a version mismatch, and an unsupported platform. One scenario could not be driven live: reproducing the whole lane failing end-to-end with the old pin, because the spawned pane inherits PATH from the machine's already-running herdr server, and shadowing that would mean restarting the user's server or replacing their global treehouse binary — out of bounds here. No UI surface is involved, so evidence is CLI transcripts rather than screenshots. Transient artifacts (temp install dirs, scratch pool roots under ~/.treehouse-homes created by the fixtures) were removed; the worktree is clean.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
CI's pinned installer fetches, verifies and installs Treehouse, and the installed binary reports the pin ✅ pass live bin/fm-install-treehouse.sh <tmpdir> — real GitHub download + SHA-256 + treehouse --version -> v2.3.0 (evidence 01-install-pinned-treehouse.txt)
Every pinned archive checksum matches the real published release, including the linux-amd64 asset the ubuntu lane installs ✅ pass live Downloaded all four v2.3.0 assets and hashed them; all four match the pins, and the linux-amd64 archive contains an x86-64 ELF binary (02-pinned-asset-checksums.txt)
A secondmate home's private-pool acquire (treehouse get --root) succeeds on the new pin and yields an isolated worktree under that root ✅ pass live treehouse get --lease --no-fetch --root <private-root> on the installed v2.3.0 leased .../.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1/proj, a real checkout of the scratch project (03-capabil…
Adversarial: the previous pin refuses the very acquire fm-spawn.sh now issues (the red lane's root cause) ✅ pass live Real v2.0.1 binary (checksum identical to the base commit's pin): treehouse get --root ... -> unknown flag: --root, exit 1 (03-capability-floor-root-flag.txt)
Adversarial: the documented v2.2.0 capability floor is exact, not approximate ✅ pass live v2.1.0 -> unknown flag: --root; v2.2.0 -> flag accepted (08-root-flag-version-floor.txt)
The Herdr lane's treehouse-dependent behavior tests pass with the installer-produced binary ✅ pass live bin/fm-test-run.sh on workspace-per-home (10 ok, exit 0), presentation e2e and autodetect smoke (exit 0, failed=0) with PATH pinned to the installed v2.3.0 (04-, 06- evidence files)
Adversarial: the installer refuses a corrupted download, a binary that is not the pin, and an unsupported platform ✅ pass live Tampered copies in /tmp: checksum mismatch refuses with no binary installed; a pin claiming v2.2.0 over the v2.3.0 binary refuses; Plan9-sparc is named and refused (07-installer-guards.txt)
End-to-end reproduction of the red lane: the whole real-Herdr spawn failing while only the old pin is reachable ⏸️ untested no Needs either a disposable Linux runner where the old pin is the only treehouse on the system PATH, or authority to stop and restart this machine's herdr server with a controlled PATH / replace ~/.loca…
Evidence: Pinned installer run: live download, checksum verify, install, version assertion

Source: Pinned installer run: live download, checksum verify, install, version assertion

fm-install-treehouse.sh: downloading treehouse-v2.3.0-darwin-arm64.tar.gz from https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-v2.3.0-darwin-arm64.tar.gz
fm-install-treehouse.sh: installed treehouse v2.3.0 to /tmp/fm-pinbin.besxuT/treehouse v2.3.0

$ bin/fm-install-treehouse.sh /tmp/fm-pinbin.besxuT
fm-install-treehouse.sh: downloading treehouse-v2.3.0-darwin-arm64.tar.gz from https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-v2.3.0-darwin-arm64.tar.gz
fm-install-treehouse.sh: installed treehouse v2.3.0 to /tmp/fm-pinbin.besxuT/treehouse
v2.3.0
exit=0

$ /tmp/fm-pinbin.besxuT/treehouse --version
v2.3.0
Evidence: All four pinned archive checksums vs the real published release

Source: All four pinned archive checksums vs the real published release

linux-amd64 OK 94fd2b2c20c35aac1ddc2941317890ad82c9916f5ccecbac4a50cda783eed10f linux-arm64 OK 408589ba72b58d5e942071ed863a83fd96566cfd1e514945daa59defde528bbb darwin-arm64 OK 1cb09bcfa830b4eec5e54beeaa71589adb9c5d828573dda0f5150e2d80cf13d5 darwin-amd64 OK 349afcc13c2beb20d846eb560a11b30e1a5cab8e2dfb22988a36aa7f213b5881

Verifying every pinned asset in fm-install-treehouse.sh against the real GitHub release (v2.3.0)
linux-amd64  OK   94fd2b2c20c35aac1ddc2941317890ad82c9916f5ccecbac4a50cda783eed10f
linux-arm64  OK   408589ba72b58d5e942071ed863a83fd96566cfd1e514945daa59defde528bbb
darwin-arm64  OK   1cb09bcfa830b4eec5e54beeaa71589adb9c5d828573dda0f5150e2d80cf13d5
darwin-amd64  OK   349afcc13c2beb20d846eb560a11b30e1a5cab8e2dfb22988a36aa7f213b5881

Linux amd64 binary (the asset the CI lane installs) reports:
ELF: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4ec66c405552437b4fc46670e7952759175e34fb, with debug_info, not stripped
Evidence: Capability floor: old pin rejects `get --root`, new pin acquires into the private pool root

Source: Capability floor: old pin rejects get --root, new pin acquires into the private pool root

--- OLD pin v2.0.1 --- $ treehouse get --root $ROOT unknown flag: --root exit=1 --- NEW pin v2.3.0 --- 🌳 Leased worktree at .../.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1/proj exit=0

== scratch project: /tmp/fm-th-lab.5gfhKE/proj   private pool root: /tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123

--- OLD pin v2.0.1 (what CI installed before this change) ---
v2.0.1
$ treehouse get --root $ROOT
unknown flag: --root
exit=1
$ treehouse get --lease --root $ROOT
unknown flag: --root
exit=1

--- NEW pin v2.3.0 (this change) ---
v2.3.0
$ treehouse get --lease --no-fetch --root $ROOT   -> already acquired above:
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1/proj

pool root tree (private to this home):
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/.gitignore
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/treehouse-state.json
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/treehouse-state.lock
/tmp/fm-th-lab.5gfhKE/.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1/proj
Evidence: Which Treehouse version introduced --root (documented floor v2.2.0)

Source: Which Treehouse version introduced --root (documented floor v2.2.0)

v2.1.0: REJECTS --root (unknown flag: --root) v2.2.0: accepts --root

== Does '--root' exist exactly where the pin comment says (Treehouse v2.2.0)? ==
v2.1.0: v2.1.0 -> REJECTS --root (unknown flag: --root)
v2.2.0: v2.2.0 -> accepts --root (failed later for another reason: A new version of treehouse is available: v2.2.0 → v2.3.0)
Evidence: workspace-per-home real-Herdr e2e with the installed pin (10/10 ok, exit 0)

Source: workspace-per-home real-Herdr e2e with the installed pin (10/10 ok, exit 0)

treehouse on PATH: /tmp/fm-pinbin.besxuT/treehouse v2.3.0
$ bin/fm-test-run.sh tests/fm-backend-herdr-workspace-per-home-e2e.test.sh
FM_TEST_BEGIN 2026-09-20T13:43:00Z tests/fm-backend-herdr-workspace-per-home-e2e.test.sh family=real-herdr-gated expected_gate_skip=herdr
ok - real herdr E2E: a primary-shaped home spawns a crewmate on the herdr backend
ok - real herdr E2E: the primary-shaped home's crewmate landed in the 'firstmate' workspace
ok - real herdr E2E: the primary spawns a --secondmate task on the herdr backend
ok - real herdr E2E: a --secondmate spawn by the PRIMARY lands in the SECONDMATE's own labeled workspace, distinct from the primary's
ok - real herdr E2E: a crewmate spawns successfully FROM a secondmate-shaped home's own fm-spawn.sh process
ok - real herdr E2E: a crewmate spawned FROM the secondmate-shaped home lands in the secondmate's OWN workspace - falls out of per-home resolution, no glue needed
ok - real herdr E2E: list_live from the primary's own context sees only the primary's own task
ok - real herdr E2E: list_live from the secondmate's own context sees only tasks in the secondmate's own workspace (both its own tab and its crewmate's)
ok - real herdr E2E: tearing down cm1 closes only its own tab - the secondmate's and cm2's tabs survive untouched
ok - real herdr E2E: tearing down cm2 closes only its own tab - the secondmate's own tab (same workspace) survives untouched
FM_TEST_END 2026-09-20T13:44:54Z tests/fm-backend-herdr-workspace-per-home-e2e.test.sh exit=0 duration_ms=114216 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=114410
FM_TEST_SUMMARY_FAMILY family=real-herdr-gated count=1 duration_ms=114216 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-backend-herdr-workspace-per-home-e2e.test.sh duration_ms=114216
exit=0
Evidence: presentation + autodetect real-Herdr tests with the installed pin (exit 0)

Source: presentation + autodetect real-Herdr tests with the installed pin (exit 0)

FM_TEST_SUMMARY total=2 failed=0 skipped_gate=0 duration_ms=998784

treehouse in use: /tmp/fm-pinbin.besxuT/treehouse v2.3.0  (installed by bin/fm-install-treehouse.sh)
$ bin/fm-test-run.sh tests/fm-backend-herdr-presentation-e2e.test.sh tests/fm-backend-autodetect-smoke.test.sh
FM_TEST_BEGIN 2026-09-20T13:48:11Z tests/fm-backend-herdr-presentation-e2e.test.sh family=real-herdr-gated expected_gate_skip=herdr
ok - real Herdr lab: an opted-out spawn retains the Stage 1 Herdr command sequence with zero ordering calls
ok - real Herdr lab: a home that configured nothing is projected by default on herdr 0.9.0
ok - real Herdr lab: every projected create, task-tab create, seeded prune, and move preserves active workspace and tab
ok - real Herdr lab: persisted-focused seeded prune proceeds when no live client is attached
ok - real Herdr lab: bounded lock contention warns and falls back flat without projection or focus drift
ok - real Herdr lab: concurrent primary workers form one stable contiguous block without active workspace/tab drift
ok - real Herdr lab: forced workspace.move failure leaves a successful worker in default order with a warning and no cleanup
ok - real Herdr lab: concurrent post-create abort cleanup stays serialized with exact focus restoration
ok - real Herdr lab: Treehouse commands and metadata shape are byte-identical except for endpoint IDs and spawn incarnation
ok - real Herdr lab: exact task-pane close removes the projected workspace with no unrestored wrong-focus interval
ok - real Herdr lab: concurrent projected cleanup is serialized and leaves active workspace/tab unchanged
ok - real Herdr lab: three repeated concurrent create/order/cleanup waves have zero active workspace or tab drift
ok - real Herdr lab: the primary presentation setting inherits into real secondmate homes
ok - real Herdr lab: primary and two secondmate homes each own a top-level contiguous child block
ok - real Herdr lab: concurrent primary/A/B spawns preserve parent order and exact focus
ok - real Herdr lab: session lock contention from a secondmate home falls back flat with no journal
ok - real Herdr lab: Hi Bit and Wheelhouse-style same-identity restarts reclaim one nested space with exact focus and idempotence
ok - real Herdr lab: secondmate restart binding and reclaim stay isolated to the exact child home and parent
ok - real Herdr lab: concurrent cross-home recoveries replace exact husks under one session lock with no focus drift
ok - real Herdr lab: legacy projection labels and flat secondmate tabs are left unmigrated
ok - real Herdr lab: multi-home exact-pane teardowns restore captain focus without workspace close authority
warning: no exact herdr presentation token match for missing1; leaving any stale space untouched and spawning flat
warning: no exact herdr presentation token match for renamed1; leaving any stale space untouched and spawning flat
warning: 2 exact herdr presentation token matches for duplicate1 are quarantined; inspecting only for duplicate-agent risk
warning: quarantined herdr presentation for duplicate1 is dead or agent-free; exact bound reclaim may proceed, otherwise spawning flat
warning: 2 exact herdr presentation token matches for duplicate1 are quarantined; inspecting only for duplicate-agent risk
error: quarantined herdr presentation for duplicate1 has a stale-agent pane; refusing duplicate launch
ok - real Herdr lab: missing, renamed, and duplicate tokens trigger zero destructive or adoptive calls, and live duplicate risk refuses launch
ok - real Herdr lab validation completed on Herdr 0.9.0 with the default-session tripwire intact
FM_TEST_END 2026-09-20T14:03:27Z tests/fm-backend-herdr-presentation-e2e.test.sh exit=0 duration_ms=915961 gate_skip=false
FM_TEST_BEGIN 2026-09-20T14:03:27Z tests/fm-backend-autodetect-smoke.test.sh family=real-herdr-gated expected_gate_skip=herdr
ok - real herdr: fm-spawn.sh auto-detects herdr from HERDR_ENV=1 (no explicit config) and prints the loud notice
ok - real herdr: auto-detected spawn records backend=herdr and herdr_session/workspace/tab/pane fields in meta
ok - real herdr: the auto-detected spawn's launch command actually ran in the herdr pane
ok - real herdr: teardown completes the auto-detected spawn/teardown cycle (meta cleared, pane closed)
ok - real herdr: isolated lab session removed and default fleet session unchanged
FM_TEST_END 2026-09-20T14:04:49Z tests/fm-backend-autodetect-smoke.test.sh exit=0 duration_ms=82584 gate_skip=false
FM_TEST_SUMMARY total=2 failed=0 skipped_gate=0 duration_ms=998784
FM_TEST_SUMMARY_FAMILY family=real-herdr-gated count=2 duration_ms=998545 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-backend-herdr-presentation-e2e.test.sh duration_ms=915961
FM_TEST_SLOWEST rank=2 script=tests/fm-backend-autodetect-smoke.test.sh duration_ms=82584
exit=0
Evidence: Installer refusal guards: bad checksum, version mismatch, unsupported platform

Source: Installer refusal guards: bad checksum, version mismatch, unsupported platform

checksum mismatch for treehouse-v2.3.0-darwin-arm64.tar.gz (expected deadbeef..., got 1cb09bcf...) exit=1 installed treehouse version is 'v2.3.0', expected exact pin v2.2.0 exit=1 unsupported platform Plan9-sparc; official Treehouse assets are linux/darwin amd64 and arm64

== Guard A: a tampered/incorrect pinned checksum must refuse to install ==
fm-install-treehouse.sh: downloading treehouse-v2.3.0-darwin-arm64.tar.gz from https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-v2.3.0-darwin-arm64.tar.gz
fm-install-treehouse.sh: checksum mismatch for treehouse-v2.3.0-darwin-arm64.tar.gz (expected deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef, got 1cb09bcfa830b4eec5e54beeaa71589adb9c5d828573dda0f5150e2d80cf13d5)
exit=1
installed binary present? no

== Guard B: a pin whose downloaded binary reports another version must refuse ==
(pin the 2.3.0 URL+sha but claim the version is 2.2.0)
fm-install-treehouse.sh: downloading treehouse-vv2.3.0-darwin-arm64.tar.gz from https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-vv2.3.0-darwin-arm64.tar.gz
curl: (56) The requested URL returned error: 404
fm-install-treehouse.sh: download failed for https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-vv2.3.0-darwin-arm64.tar.gz (bounded at 15000000 bytes)
exit=1

== Guard C: unsupported platform is named, not guessed ==
fm-install-treehouse.sh: unsupported platform Plan9-sparc; official Treehouse assets are linux/darwin amd64 and arm64
== Guard B (redo): pin claims v2.2.0 but the fetched, checksum-valid binary is v2.3.0 ==
fm-install-treehouse.sh: downloading treehouse-v2.3.0-darwin-arm64.tar.gz from https://github.com/kunchenguid/treehouse/releases/download/v2.3.0/treehouse-v2.3.0-darwin-arm64.tar.gz
fm-install-treehouse.sh: installed treehouse version is 'v2.3.0', expected exact pin v2.2.0
exit=1
installed binary present? YES (path exists: v2.3.0)
Evidence: Old-pin lane re-drive (pane inherited the machine's treehouse, so this run does not reproduce the red lane)

Source: Old-pin lane re-drive (pane inherited the machine's treehouse, so this run does not reproduce the red lane)

== Reproduction of the red lane: PATH pinned to the PREVIOUS Treehouse pin
treehouse on PATH: /tmp/fm-oldpin.NhT5O0/treehouse v2.0.1
$ bin/fm-test-run.sh tests/fm-backend-herdr-workspace-per-home-e2e.test.sh
FM_TEST_BEGIN 2026-09-20T13:45:00Z tests/fm-backend-herdr-workspace-per-home-e2e.test.sh family=real-herdr-gated expected_gate_skip=herdr
ok - real herdr E2E: a primary-shaped home spawns a crewmate on the herdr backend
ok - real herdr E2E: the primary-shaped home's crewmate landed in the 'firstmate' workspace
ok - real herdr E2E: the primary spawns a --secondmate task on the herdr backend
ok - real herdr E2E: a --secondmate spawn by the PRIMARY lands in the SECONDMATE's own labeled workspace, distinct from the primary's
ok - real herdr E2E: a crewmate spawns successfully FROM a secondmate-shaped home's own fm-spawn.sh process
ok - real herdr E2E: a crewmate spawned FROM the secondmate-shaped home lands in the secondmate's OWN workspace - falls out of per-home resolution, no glue needed
ok - real herdr E2E: list_live from the primary's own context sees only the primary's own task
ok - real herdr E2E: list_live from the secondmate's own context sees only tasks in the secondmate's own workspace (both its own tab and its crewmate's)
ok - real herdr E2E: tearing down cm1 closes only its own tab - the secondmate's and cm2's tabs survive untouched
ok - real herdr E2E: tearing down cm2 closes only its own tab - the secondmate's own tab (same workspace) survives untouched
FM_TEST_END 2026-09-20T13:47:46Z tests/fm-backend-herdr-workspace-per-home-e2e.test.sh exit=0 duration_ms=165602 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=165714
FM_TEST_SUMMARY_FAMILY family=real-herdr-gated count=1 duration_ms=165602 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-backend-herdr-workspace-per-home-e2e.test.sh duration_ms=165602
exit=0
- Outcome: ⚠️ 1 info across 1 run (27m41s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ bin/fm-bootstrap.sh:928 - bin/fm-bootstrap.sh:928 treehouse_supports_lease probes treehouse get --help for --lease only, so a non-CI home running Treehouse <2.2.0 is never told to upgrade and loses the full 60s spawn window per secondmate crewmate spawn to the same unknown flag: --root refusal this change fixes for CI. The author explicitly disclosed this as deliberately-deferred follow-up in the commit message, and the smallest honest remedy (extending the doctor capability probe to --root) goes beyond the stated intent of repairing the red CI lane, so no action is needed for this change.
⚠️ **Test** - 1 info
  • ℹ️ tests/fm-backend-herdr-workspace-per-home-e2e.test.sh:230 - Running tests/fm-backend-herdr-workspace-per-home-e2e.test.sh standalone against a brand-new checkout fails in teardown with "REFUSED: cannot resolve the shared Treehouse project lock", because fm_treehouse_project_lock_path requires <FM_HOME>/state to exist and the test invokes fm-teardown.sh without FM_HOME (it falls back to FM_ROOT_OVERRIDE = the repo checkout, which has no state/ dir until something else creates it). In the CI lane an earlier family script creates it first, so the lane is unaffected; I created the dir and re-drove the scenario green. Flagged only as a standalone-run fragility.
  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
CI's pinned installer fetches, verifies and installs Treehouse, and the installed binary reports the pin ✅ pass live bin/fm-install-treehouse.sh &lt;tmpdir&gt; — real GitHub download + SHA-256 + treehouse --version -> v2.3.0 (evidence 01-install-pinned-treehouse.txt)
Every pinned archive checksum matches the real published release, including the linux-amd64 asset the ubuntu lane installs ✅ pass live Downloaded all four v2.3.0 assets and hashed them; all four match the pins, and the linux-amd64 archive contains an x86-64 ELF binary (02-pinned-asset-checksums.txt)
A secondmate home's private-pool acquire (treehouse get --root) succeeds on the new pin and yields an isolated worktree under that root ✅ pass live treehouse get --lease --no-fetch --root &lt;private-root&gt; on the installed v2.3.0 leased .../.treehouse-homes/sm-abc123/.treehouse/proj-1b7ca5/1/proj, a real checkout of the scratch project (03-capabil…
Adversarial: the previous pin refuses the very acquire fm-spawn.sh now issues (the red lane's root cause) ✅ pass live Real v2.0.1 binary (checksum identical to the base commit's pin): treehouse get --root ... -> unknown flag: --root, exit 1 (03-capability-floor-root-flag.txt)
Adversarial: the documented v2.2.0 capability floor is exact, not approximate ✅ pass live v2.1.0 -> unknown flag: --root; v2.2.0 -> flag accepted (08-root-flag-version-floor.txt)
The Herdr lane's treehouse-dependent behavior tests pass with the installer-produced binary ✅ pass live bin/fm-test-run.sh on workspace-per-home (10 ok, exit 0), presentation e2e and autodetect smoke (exit 0, failed=0) with PATH pinned to the installed v2.3.0 (04-, 06- evidence files)
Adversarial: the installer refuses a corrupted download, a binary that is not the pin, and an unsupported platform ✅ pass live Tampered copies in /tmp: checksum mismatch refuses with no binary installed; a pin claiming v2.2.0 over the v2.3.0 binary refuses; Plan9-sparc is named and refused (07-installer-guards.txt)
End-to-end reproduction of the red lane: the whole real-Herdr spawn failing while only the old pin is reachable ⏸️ untested no Needs either a disposable Linux runner where the old pin is the only treehouse on the system PATH, or authority to stop and restart this machine's herdr server with a controlled PATH / replace ~/.loca…
  • bin/fm-install-treehouse.sh &lt;tmpdir&gt; — real download, SHA-256 verify, install, version assertion (darwin-arm64)
  • Downloaded and hashed all four pinned archives (linux-amd64, linux-arm64, darwin-arm64, darwin-amd64) from the real GitHub release and compared against the pins in the script
  • treehouse get --root &lt;private-root&gt; and treehouse get --lease --no-fetch --root &lt;private-root&gt; against a scratch git project, on v2.0.1, v2.1.0, v2.2.0 and the pinned v2.3.0
  • bin/fm-test-run.sh tests/fm-backend-herdr-workspace-per-home-e2e.test.sh with PATH pinned to the installer-produced treehouse
  • bin/fm-test-run.sh tests/fm-backend-herdr-presentation-e2e.test.sh tests/fm-backend-autodetect-smoke.test.sh with the same pinned binary
  • Installer guard drives on tampered copies in /tmp: wrong SHA-256, pin/version mismatch, unsupported uname platform
  • Repo-wide check that no other script, workflow, or doc still references the 2.0.1 pin
⚠️ **Document** - 1 info
  • ℹ️ docs/configuration.md:524 - The change documents a real capability floor (Treehouse v2.2.0 for treehouse get --root) only in maintainer-architecture prose (docs/architecture.md:289) and in the CI installer's comment. Operator-facing surfaces do not carry it: docs/configuration.md's Toolchain section (the single owner of the tool list, which qualifies other floored tools with "v1.46.0 or newer" / "compatible") and docs/remote-secondmates.md:115's required remote tool set both list plain treehouse with no version. Bootstrap's staleness probe also only tests treehouse get --help for --lease (bin/fm-bootstrap.sh:928), so a home or remote host on treehouse 2.0.x is reported healthy and then fails every secondmate crewmate spawn with an isolation refusal instead of an upgrade request. Closing this properly means extending the bootstrap probe to --root and then pointing the toolchain docs at that floor — a code change, out of scope for a documentation-only phase, and documenting the floor in operator docs ahead of the probe would advertise a requirement the tool does not yet detect. Proposed as a follow-up.
🔧 **Lint** - 1 issue found → no changes applied ✅
  • ⚠️ linter found issues (exit code 1)

🔧 No changes applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

The required "Behavior tests (Herdr)" lane fails on three spawn cases that
all build a secondmate-shaped home: the launcher workspace E2E, the
presentation multi-home E2E, and the workspace-per-home E2E. Each fails with

  error: treehouse get did not enter an isolated worktree within 60s
  (last seen '<the project>': it is the spawning project itself)

The worktree-isolation assertion was right and caught a real failure to
isolate. cfcd011 made a secondmate home's crewmate spawn acquire its
worktree with `treehouse get --root <the home's private pool root>`, but
Treehouse grew --root/TREEHOUSE_ROOT only in v2.2.0, and this lane pins
v2.0.1. Measured against both binaries on the same scratch repository:

  v2.0.1: `treehouse get --root <root>` -> "unknown flag: --root"
  v2.3.0: enters <root>/.treehouse/<pool>/1/<project>

Under v2.0.1 the acquire is rejected before any subshell opens, so the pane
never leaves the project and fm-spawn.sh correctly refuses at the deadline.
The assertion, its 60s window, and the test harness are all working as
intended, so none of them is touched here; the fix supplies the capability
the code depends on instead of relaxing the check that noticed it missing.

This is not a regression that shipped past a gate. Workflow files were
present in the tree when cfcd011 merged on 2026-09-17, but this repository
had produced no workflow run, check run, or commit status of any kind at
that point: its entire Actions history begins on 2026-09-20, and PR 1
merged with zero check runs and zero statuses on both its head and its
merge commit. The run that surfaced this is the first CI run the repository
has ever had, finding a latent incompatibility between what cfcd011 needs
and what the CI environment pinned, on first contact.

Nor was anything broken for real use. A machine whose installed Treehouse
is v2.2.0 or newer acquires the private pool root correctly, before and
after cfcd011; only the CI pin was behind.

Move the pin to v2.3.0 - the version the local real-Herdr suite already
exercises, which is what this installer's header has always said the pin
tracks - with the checksums of the official v2.3.0 assets for all four
supported platforms, and record in the header that the pin doubles as a
capability floor that must never drop below v2.2.0.

Note for follow-up, deliberately not fixed here: the same dependency is
undeclared outside CI. bin/fm-bootstrap.sh probes `treehouse get --help`
for --lease but not --root, so a home running a Treehouse older than v2.2.0
is never told to upgrade and instead loses 60 seconds per secondmate spawn
to the same refusal.
@gkalyan

gkalyan commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

How to read this change

The worktree-isolation assertion was correct, and it was not touched. It refused because the pinned Treehouse genuinely could not hand a secondmate-owned spawn an isolated worktree: treehouse get --root does not exist before v2.2.0, so the acquire died with unknown flag: --root, the pane never left the project, and the assertion caught exactly the thing it exists to catch. It was not weakened, not lengthened, not bypassed, and not deleted. The pin is the fix.

This is not a regression anyone shipped. cfcd011 merged on 2026-09-17, when this repository had never run CI — its pull request carries zero check runs and zero commit statuses. The workflow files were present in the tree, inherited from upstream, but nothing had ever executed them. CI's first run here was on 2026-09-20 and immediately found a latent incompatibility between that change and the CI environment's pin. That is CI working on first contact, not a break that slipped past a gate.

Nothing was broken for real use, before or after. Secondmate-owned spawns have worked throughout on the machine this fleet runs on, which carries a newer Treehouse than CI pinned. Only the CI environment was behind.

@gkalyan
gkalyan merged commit d2d718f into main Sep 21, 2026
14 checks passed
gkalyan added a commit that referenced this pull request Sep 21, 2026
The required Herdr lane failed on this branch because the pinned Treehouse
predated the --root flag that secondmate pool roots depend on, so no
secondmate-owned spawn could reach an isolated worktree. d2d718f raises the
pin to 2.3.0. This merge only brings that repair onto the branch; no file this
branch owns is touched.
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