Repository navigation
Conversation
|
Speaking as Kun's firstmate: thanks @yasuhito — I reviewed tip My read:
Right now CI is still running on this head, so nothing is needed from you yet. If CI comes back red, please push a fix through no-mistakes. Overlap note: this sits near #7382 (restored second mates on their own home), #7401 (Orca secondmates) and #7394 (remote secondmate convergence). I'm not treating any of them as a duplicate of this one. |
|
Speaking as Kun's firstmate: a quick update on head
This is waiting on you: please fix the secondmate-home spawn path for Herdr, either in the code or in the fixtures if they need to understand |
|
Speaking as Kun's firstmate: thanks @yasuhito, that diagnosis checks out. Treehouse added CI on this head: run One non-blocking note for you and Kun: bootstrap's Treehouse check only verifies Contract-class: new-default (my own read, unchanged). The foreign-clone refusal on its own is a restore, but every unconfigured secondmate home now draws from a new Status: nothing is required from you. Once serial 2 finishes green, this goes to Kun as a captain merge-or-leave decision. It won't auto-merge. |
65d3936 to
f31cc65
Compare
…use other clones' slots Treehouse keys a pool by clone directory name and origin, so a secondmate home's clone and the primary home's clone of one project shared a pool and handed each other's free slots out. The isolation screen accepted such a copy, the slot claim silently skipped it, and the base refresh fetched into and reset it before Claude trust pre-registration finally refused. Require a Treehouse copy's common git dir to match the spawning project's inside the shared isolation predicate, so a foreign slot is refused before any fetch, reset, claim, or metadata. A secondmate home now runs treehouse --root <state>/treehouse get; the primary home keeps the default root, and teardown still returns slots by path.
… refusal and identification
…secondmate home's spawn now sends `treehouse --root <state>/treehouse get`, but `--root` was only added in Treehouse v2.2.0, and CI pins v2.0.1 via bin/fm-install-treehouse.sh. v2.0.1 fails immediately with `unknown flag: --root` (reproduced locally), so the pane never enters a worktree and the three secondmate-spawn E2E tests (launcher-workspace, presentation, workspace-per-home) failed with "it is the spawning project itself" after 60s. Fix: bumped the CI pin to v2.3.0 (the version the local real-Herdr suite uses), updated the four platform SHA-256s from the official release asset digests and the related comments, and added one sentence to docs/configuration.md saying secondmate-home spawns need Treehouse v2.2.0 or later. Verified: the new installer downloads, checksum-verifies and installs v2.3.0, which accepts `--root`; shellcheck and fm-documentation-audiences pass. Locally the previously failing secondmate spawn steps now pass, but both E2E scripts still fail later at teardown (`REFUSED: cannot resolve the shared Treehouse project lock`). The base commit fails the same way with Treehouse 2.0.1, and main CI passes this test, so this is a local environment issue unrelated to the PR or the Treehouse version. fm-lint.test.sh fails one local-only RSS-measurement assertion ("unavailable"); I believe it is unrelated but did not check it against base. ci-1 (Behavior portable serial 4): not caused by this PR. The only failure is tests/fm-remote-reply.test.sh "the NUL-bearing line was not captured", a 60s await timeout in the remote reply stream, which this PR does not touch. It passed fully in two local runs, so it looks timing-dependent; no change made. Changes are uncommitted in the worktree
f31cc65 to
ab1fc58
Compare
… 件は main でも起きている既存の flaky なので手を入れていない。 **原因(ci-1〜ci-4):** 失敗していたのは fm-kimi-harness、fm-polytoken-harness、fm-rovo-harness、fm-agy-harness、fm-fleet-ledger、fm-trace-context-spawn の各テスト。どれも bin/fm-spawn.sh を独自の env で直接起動しており、HOME をテスト用 FM_HOME の内側(`$home` か `$home/user-home`)に置いている。この PR で pool root が `$HOME/.treehouse/fm-homes/<id>` になったため、root が FM_HOME の内側に入り、spawn_treehouse_pool_root の「pool root が firstmate home の内側なら拒否」(人間が決めた規則)に当たって spawn が exit 1 になっていた。CI ログのエラー文で確認し、修正前のローカル実行でも同じ失敗を再現した。 **守るべき条件:** テストの spawn は本番と同じく、pool root が FM_HOME の外にある状態で動かなければならない。共有の fm_test_run_spawn(tests/fixtures.sh)はこの PR で既に `TREEHOUSE_ROOT=${home%/}.treehouse-root` を固定している。直接起動している箇所は次の通りで、拒否されていたのはこのうち 6 か所: - kimi・rovo・agy・polytoken の各 run_spawn - fleet-ledger の in_home - trace-context の run_spawn と run_spawn_tc、secondmate ワーカー spawn(`FM_HOME=$sm` で `HOME=$sm/user-home`) - secondmate を拒否する経路と、primary の `--secondmate` spawn(`HOME=$base/user-home`)は pool root の判定まで到達しないか HOME が既に外側なので、変更していない。 **修正:** 上記 6 か所に、fixtures と同じ規約の `TREEHOUSE_ROOT=<home>.treehouse-root` を追加しただけ(テスト 6 ファイル、+9/−5)。本番コードは変えていないので、拒否規則はそのまま残っている。 **検証:** 6 テストとも全件 pass(kimi 30、rovo 11、polytoken 30、agy 30、fleet-ledger 10、trace-context 12)。agy、fleet-ledger、trace-context の 3 本は、手元の mise shim が HOME 差し替え時に設定ファイルの trust エラーを出して失敗するため、PATH から mise/shims を外して実行した。これはこのマシンだけの環境要因で CI とは関係ない。修正した 6 ファイルへの shellcheck も警告なし。 **ci-5(Behavior tests (Herdr))は対象外:** 失敗は fm-backend-herdr-presentation-e2e の「concurrent secondmate recovery」で、エラーは「herdr presentation recovery could not acquire its session lock; refusing a concurrent resume」。同じテストが同じエラー文で、この PR を含まない main の直近 2 回(run 39506645686 の 5db719d、run 39506454292 の 4ae3aaf)でも失敗している。原因は 5 秒で打ち切るロック取得のタイミング依存で、この PR とは無関係なのでコードは変更していない。実 Herdr でのローカル実行は、main での再現を確認できた時点で途中停止した。 変更は未コミットのまま、outer executor に渡す。
CI statusAt the current head
Local results (scratch copies,
The supervision-host failure is identical on both sides ("hook write failure: the Stop hook did not finish", after the same 37 passing cases), so it predates this change. This account cannot rerun jobs on this repository, so could a maintainer rerun the serial 2 and serial 5 jobs, or waive them? |
|
Speaking as Kun's firstmate: Thank you @yasuhito for the clear CI write-up and the side-by-side local runs against
I re-ran both failed jobs once (run 39524320683). So this is waiting on CI, not on you. What I reviewed on
Contract-class: new-default (my own read). The foreign-clone refusal alone would be a restore. But every unconfigured home now places new task copies under a new per-home pool root instead of a plain One non-blocking note, now wider than before: there's still no fast version refusal. A captain on Treehouse 2.0.x/2.1.x passes bootstrap's Once CI is green, this goes to Kun as a captain merge-or-leave decision. It won't auto-merge, and nothing more is needed from you. |
Intent
QA2 #2081 の担当起動で、QA2担当のプロジェクトとは別のMain側QA2から作られたコピーが割り当てられ、安全確認で拒否された。Firstmate側で正しいコピーを選び、取り違えを変更前に検出する修正を実装し、上流へ修正PRを出すところまで進めてよいか、という確認への回答: ok
根拠は QA2 #2081 pool mismatch 診断レポート。GitHub originが同じでも2つのcloneのGit common directoryは異なり、割当コピーはMain側に登録されていた。現行の早い隔離判定ではこの不一致が通り、所有確認がfalseでも拒否せず、base refresh後のClaude trust判定で拒否された。
レポートの内容: secondmate home の QA2 clone (projects/qa2) と primary home の QA2 clone は同じ origin https://github.com/qniapp/qa2.git を持つが Git common directory が異なる。secondmate からの ship spawn で plain
treehouse getが default Treehouse root の共有 pool qa2-542c07 から primary clone に登録されたコピーを割り当てた。fm-spawn.sh の spawn_worktree_isolated は worktree root / project 自身でない / primary checkout でないことしか確認せず common dir の一致を見ないため通過し、fm_treehouse_pool_slot の common dir 不一致 false は拒否にならず slot owner claim を飛ばすだけで、freshen_spawn_worktree_base が fetch/reset できる経路を通った後、fm-claude-trust.sh が "not a worktree of project" で拒否した。見えている Claude trust エラーは遅い検出点で、根因は project/home 専用 pool の欠如と allocation ownership 検証漏れ。推奨対応: 対象 clone の common directory に属さないコピーを freshen_spawn_worktree_base より前に拒否し、同じ clone/home 専用の Treehouse root (treehouse get --root / TREEHOUSE_ROOT) から pool を選ぶこと。primary clone を trust 引数にする、Claude trust を bypass する、account/runtime を替える、失敗 pool を reset/cleanup することは採らない。What Changed
bin/fm-spawn.sh:spawn_worktree_isolatednow also checks that a Treehouse copy belongs to the spawning project's own common git dir. A free slot that another clone of the same origin created is refused before any base refresh, slot claim, or launch. Orca worktrees are exempt from this check.bin/fm-spawn.sh: every home (primary or secondmate) now runstreehouse --root <base>/fm-homes/<home-id> getinstead of a plaintreehouse get. The newspawn_treehouse_pool_rootchooses<base>: an absoluteTREEHOUSE_ROOTif set, otherwise$HOME/.treehouse.<home-id>comes from a hash of the home's physical path. Spawning is refused if that root would sit inside the Firstmate home or its state, or under a directory below$HOMEthat containsCLAUDE.md/AGENTS.md. Teardown and relaunch still use the worktree path each task recorded, so tasks already on a default-root slot run to completion there.bin/fm-install-treehouse.shnow pins Treehouse v2.3.0 (--rootneeds v2.2.0 or later), with updated checksums.docs/configuration.mddocuments the per-home pool root, the ownership check, and how to deal with old default-root slots. Tests cover the per-home root, refusal of foreign-clone slots, and teardown returning a slot by its recorded path, and the fixtures and e2e tests now handle the--rootinvocation.Risk Assessment
🚨 High: The routing and ownership-screen logic is correct: real Treehouse v2.3.0 returns custom-root slots by path, and foreign-clone slots are refused before any mutation. But the chosen pool location nests every worker copy under a Firstmate home whose CLAUDE.md/AGENTS.md supervisor contract worker harnesses load from ancestor directories, which changes worker behavior across all homes.
Testing
Six scenarios ran through the real fm-spawn.sh on a private fm-lab tmux socket with real Treehouse, in disposable lab homes and clones, and all passed. S1/S2/S2b: each home allocates from its own stable root, a different root per home, outside the home, and the worktree's common git dir matches its own clone. S3: a planted slot from the other clone is refused with 'belongs to a different clone' and its HEAD, reflog and FETCH_HEAD stay unchanged. S4/S5: a root below an AGENTS.md-bearing $HOME subdirectory or inside the Firstmate home is refused and no root is created. S6: with TREEHOUSE_ROOT unset, the spawn uses $HOME/.treehouse/fm-homes/<id>; $HOME/CLAUDE.md does not cause a refusal and the in-project treehouse.toml is ignored. The targeted suites fm-spawn-pool-base-freshen and fm-teardown both passed. The S3 refusal arrives only after the 60s discovery poll, which matches the known behaviour already recorded as a decision. The lab was removed and the worktree is clean. There is no UI surface, so the evidence is the CLI transcript.Evidence: Live pool-root spawn transcript (S1–S6)
Source: Live pool-root spawn transcript (S1–S6)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:5018- secondmate home の spawn は無条件にtreehouse --root '<state>/treehouse' getを送るようになった。しかし、インストール済み Treehouse が--rootに対応しているかを確かめる箇所がどこにもない。bootstrap の gate(bin/fm-bootstrap.sh:906 の treehouse_supports_lease、:1473)が見ているのはget --leaseだけなので、v2.0.x/v2.1.x は互換として通ってしまう。そうした Treehouse を使う secondmate home では、crewmate/scout spawn が毎回次のように失敗する。pane のコマンドがunknown flag: --rootで即座に失敗し、pane はプロジェクトに留まる。discovery poll(bin/fm-spawn.sh:5059-5074)は 60 秒使い切り、treehouse get did not enter an isolated worktree within 60s (... it is the spawning project itself ...)で終わる。この表示は本当の原因を示していない。CI でも同じ壊れ方をした(コミット 13b7bcf のメッセージ)。対応した互換性要件は docs/configuration.md:427 の一文だけ。修正案:--rootを送る前に、fm-spawn 内で能力を probe する(例:treehouse --help 2>&1 | grep -q -- '--root')。非対応なら「Treehouse >= v2.2.0 が必要」と明示して即座に refuse する。または bootstrap の treehouse 互換 gate に同じ probe を追加する。bin/fm-spawn.sh:5017- Intent は「同じ clone/home 専用の Treehouse root (treehouse get --root / TREEHOUSE_ROOT) から pool を選ぶこと」を求めている。今回の変更が専用 root を与えたのは secondmate home だけで、primary home は default root(spawn_treehouse_get='treehouse get')を使い続ける。そのため、primary の projects/<name> と、同じディレクトリ名と origin を持つ別の clone(default root で Treehouse を使う operator 自身のチェックアウトなど)は、今も1つの pool を共有する。ownership screen は他 clone の slot を正しく拒否するが、拒否されるのは 60 秒の poll の後である。しかも fresh endpoint は abort 時に slot を pool に返すので、retry しても同じ foreign slot が再び割り当てられうる。その場合、primary からのそのプロジェクトへの spawn は失敗し続ける。primary にも専用 root を与えると、既存の default-root pool はすべて孤立する。これは方針のトレードオフなので、「primary は default root のままで良いか(現状の部分的な分離を受け入れるか)」は人間の判断が必要。🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
bin/fm-spawn.sh:5018- secondmate home の spawn は無条件にtreehouse --root '<state>/treehouse' getを送るようになった。しかし、インストール済み Treehouse が--rootに対応しているかを確かめる箇所がどこにもない。bootstrap の gate(bin/fm-bootstrap.sh:906 の treehouse_supports_lease、:1473)が見ているのはget --leaseだけなので、v2.0.x/v2.1.x は互換として通ってしまう。そうした Treehouse を使う secondmate home では、crewmate/scout spawn が毎回次のように失敗する。pane のコマンドがunknown flag: --rootで即座に失敗し、pane はプロジェクトに留まる。discovery poll(bin/fm-spawn.sh:5059-5074)は 60 秒使い切り、treehouse get did not enter an isolated worktree within 60s (... it is the spawning project itself ...)で終わる。この表示は本当の原因を示していない。CI でも同じ壊れ方をした(コミット 13b7bcf のメッセージ)。対応した互換性要件は docs/configuration.md:427 の一文だけ。修正案:--rootを送る前に、fm-spawn 内で能力を probe する(例:treehouse --help 2>&1 | grep -q -- '--root')。非対応なら「Treehouse >= v2.2.0 が必要」と明示して即座に refuse する。または bootstrap の treehouse 互換 gate に同じ probe を追加する。docs/configuration.md:433- Round 1 の fix(primary-home-shares-default-root への対応で docs を改訂した回)で入った記述が不正確。docs には「New spawns no longer allocate from the default root, so such a slot reaches a spawn only through a Treehouse configuration (TREEHOUSE_ROOTor a config file) that points back at it.」とある。しかし fm-spawn.sh:5016 は毎回treehouse --root '<state>/treehouse' getを送り、Treehouse 自身のヘルプにも--rootは「overriding TREEHOUSE_ROOT and config」と明記されている。つまり TREEHOUSE_ROOT や config ファイルを設定しても、新しい spawn が default-root の slot に戻ることはない。operator はありもしない経路(自分の TREEHOUSE_ROOT や config)を原因として疑い、無駄に調べることになる。修正案: この文を「spawn は常に--rootを渡し、それがTREEHOUSE_ROOTと config より優先されるので、新しい spawn は default-root の slot を受け取らない。下記の refusal はそれでも他 clone の copy に当たった場合の最終防衛線として残る」という内容に直す。🔧 Fix applied.
1 warning still open:
bin/fm-spawn.sh:5018- secondmate home の spawn は無条件にtreehouse --root '<state>/treehouse' getを送るようになった。しかし、インストール済み Treehouse が--rootに対応しているかを確かめる箇所がどこにもない。bootstrap の gate(bin/fm-bootstrap.sh:906 の treehouse_supports_lease、:1473)が見ているのはget --leaseだけなので、v2.0.x/v2.1.x は互換として通ってしまう。そうした Treehouse を使う secondmate home では、crewmate/scout spawn が毎回次のように失敗する。pane のコマンドがunknown flag: --rootで即座に失敗し、pane はプロジェクトに留まる。discovery poll(bin/fm-spawn.sh:5059-5074)は 60 秒使い切り、treehouse get did not enter an isolated worktree within 60s (... it is the spawning project itself ...)で終わる。この表示は本当の原因を示していない。CI でも同じ壊れ方をした(コミット 13b7bcf のメッセージ)。対応した互換性要件は docs/configuration.md:427 の一文だけ。修正案:--rootを送る前に、fm-spawn 内で能力を probe する(例:treehouse --help 2>&1 | grep -q -- '--root')。非対応なら「Treehouse >= v2.2.0 が必要」と明示して即座に refuse する。または bootstrap の treehouse 互換 gate に同じ probe を追加する。🚨
bin/fm-spawn.sh:5043- The new dedicated pool root is<FM_HOME>/state/treehousefor every home, so every crewmate/scout copy now sits inside the Firstmate checkout (e.g. ~/Work/oss/firstmate/state/treehouse/.treehouse/qa2-xxx/1/qa2). Claude Code loads every CLAUDE.md from cwd up through all ancestors (Pi loads ancestor AGENTS.md too), and the home root's CLAUDE.md is@AGENTS.md, the supervisor contract: 'You are the first mate', hard rule 1 'Do not edit, commit, or run state-changing commands ... in any project worktree', the captain-address rules. The AGENTS.md:4 worker carve-out covers only 'a worktree of this repository', not a qa2 copy. So every Claude/Pi worker spawned from any home now permanently loads instructions that contradict its job. Before this branch, slots lived under ~/.treehouse with no such ancestor, and nothing in bin/ excludes ancestor memory (no claudeMdExcludes etc.). Where it came from: the original author commit e1e9663 introduced this placement for secondmate homes, and review fix round 14dab25 extended it to the primary home. Sibling sites that assume the same placement: docs/configuration.md:94 (the state/treehouse/ entry) and docs/configuration.md:428 (thetreehouse --root <state>/treehouse getsentence). Proposed fix: keep a root dedicated to each clone/home, but place it outside any Firstmate checkout (e.g. ~/.treehouse/fm-<home-hash>/ or an XDG state dir). Choosing that location is a product/location decision beyond the recorded 'dedicated root' choice, so a human must make it.🔧 Fix applied.
2 issues (1 error, 1 info) still open:
bin/fm-spawn.sh:5043- The new dedicated pool root is<FM_HOME>/state/treehousefor every home, so every crewmate/scout copy now sits inside the Firstmate checkout (e.g. ~/Work/oss/firstmate/state/treehouse/.treehouse/qa2-xxx/1/qa2). Claude Code loads every CLAUDE.md from cwd up through all ancestors (Pi loads ancestor AGENTS.md too), and the home root's CLAUDE.md is@AGENTS.md, the supervisor contract: 'You are the first mate', hard rule 1 'Do not edit, commit, or run state-changing commands ... in any project worktree', the captain-address rules. The AGENTS.md:4 worker carve-out covers only 'a worktree of this repository', not a qa2 copy. So every Claude/Pi worker spawned from any home now permanently loads instructions that contradict its job. Before this branch, slots lived under ~/.treehouse with no such ancestor, and nothing in bin/ excludes ancestor memory (no claudeMdExcludes etc.). Where it came from: the original author commit e1e9663 introduced this placement for secondmate homes, and review fix round 14dab25 extended it to the primary home. Sibling sites that assume the same placement: docs/configuration.md:94 (the state/treehouse/ entry) and docs/configuration.md:428 (thetreehouse --root <state>/treehouse getsentence). Proposed fix: keep a root dedicated to each clone/home, but place it outside any Firstmate checkout (e.g. ~/.treehouse/fm-<home-hash>/ or an XDG state dir). Choosing that location is a product/location decision beyond the recorded 'dedicated root' choice, so a human must make it.bin/fm-spawn.sh:3931- spawn_treehouse_pool_root が treehouse.toml のrootを読む方法は、二重引用符の basic string(root = "...")を sed で拾うことだけである。TOML の literal string(root = '.'やroot = '/srv/pools')は取りこぼされ、$HOMEにフォールバックする。Treehouse 本体はこの値を尊重するので、ラウンド4の決定「<treehouse-default-root> = Treehouse 自身が --root なしで解決する root(TREEHOUSE_ROOT と Treehouse config を尊重)」から外れる。具体例: project の treehouse.toml がroot = '/data/th'のとき、Treehouse の default は /data/th/.treehouse だが、Firstmate は $HOME/fm-homes/<id> を使う。安全側には倒れる(root は依然 checkout の外で、home 専用でもある)ので影響は小さい。このコードを導入したのは前回の fix round(0576cbd)である。修正案: sed パターンで単一引用符の値も受け付ける。🔧 Fix applied.
4 issues (1 error, 1 warning, 2 infos) still open:
bin/fm-spawn.sh:5043- The new dedicated pool root is<FM_HOME>/state/treehousefor every home, so every crewmate/scout copy now sits inside the Firstmate checkout (e.g. ~/Work/oss/firstmate/state/treehouse/.treehouse/qa2-xxx/1/qa2). Claude Code loads every CLAUDE.md from cwd up through all ancestors (Pi loads ancestor AGENTS.md too), and the home root's CLAUDE.md is@AGENTS.md, the supervisor contract: 'You are the first mate', hard rule 1 'Do not edit, commit, or run state-changing commands ... in any project worktree', the captain-address rules. The AGENTS.md:4 worker carve-out covers only 'a worktree of this repository', not a qa2 copy. So every Claude/Pi worker spawned from any home now permanently loads instructions that contradict its job. Before this branch, slots lived under ~/.treehouse with no such ancestor, and nothing in bin/ excludes ancestor memory (no claudeMdExcludes etc.). Where it came from: the original author commit e1e9663 introduced this placement for secondmate homes, and review fix round 14dab25 extended it to the primary home. Sibling sites that assume the same placement: docs/configuration.md:94 (the state/treehouse/ entry) and docs/configuration.md:428 (thetreehouse --root <state>/treehouse getsentence). Proposed fix: keep a root dedicated to each clone/home, but place it outside any Firstmate checkout (e.g. ~/.treehouse/fm-<home-hash>/ or an XDG state dir). Choosing that location is a product/location decision beyond the recorded 'dedicated root' choice, so a human must make it.bin/fm-spawn.sh:3931- spawn_treehouse_pool_root が treehouse.toml のrootを読む方法は、二重引用符の basic string(root = "...")を sed で拾うことだけである。TOML の literal string(root = '.'やroot = '/srv/pools')は取りこぼされ、$HOMEにフォールバックする。Treehouse 本体はこの値を尊重するので、ラウンド4の決定「<treehouse-default-root> = Treehouse 自身が --root なしで解決する root(TREEHOUSE_ROOT と Treehouse config を尊重)」から外れる。具体例: project の treehouse.toml がroot = '/data/th'のとき、Treehouse の default は /data/th/.treehouse だが、Firstmate は $HOME/fm-homes/<id> を使う。安全側には倒れる(root は依然 checkout の外で、home 専用でもある)ので影響は小さい。このコードを導入したのは前回の fix round(0576cbd)である。修正案: sed パターンで単一引用符の値も受け付ける。bin/fm-spawn.sh:3934- これは round 4 の fix(0576cbd、<default-root>/fm-homes/<home-id>の導入)と round 5 の fix(7f0866a、literal-string root への対応)で入ったコードで、Treehouse の in-project pool(fm-claude-trust.sh:107 に書かれている「relative in-project pool」)の設定をそのまま root の基点に使っている。具体的な経路は次のとおり。project の treehouse.toml がroot = '.'(または".")で、TREEHOUSE_ROOT が未設定とする。このとき base は$top/.に解決され、pool root は<project-checkout>/fm-homes/<id>になる。(a) project の root に AGENTS.md や CLAUDE.md がある場合(普通にある)、bin/fm-spawn.sh:3946-3955 の祖先チェックがすべての spawn を拒否する。この branch より前は plaintreehouse getで動いていた設定であり、そこで読まれるのは同じ project 自身の指示ファイルなので、round 4 で問題になった Firstmate supervisor 契約の注入にもあたらない。(b) そうしたファイルがない場合は、project の primary checkout の中に gitignore されていないfm-homes/ディレクトリができ、その中に worktree が入るので、primary checkout が untracked として dirty になる(Treehouse 自身の.treehouse/とは扱いが違う)。どの root 由来の祖先を除外するか、in-project root を TREEHOUSE_ROOT / $HOME の扱いに寄せるか、<root>/.treehouse/fm-homes/<id>のように Treehouse の管理ディレクトリの下に置くかは、round 4 で人間が決めた配置(<treehouse-default-root>/fm-homes/<home-id>、指示ファイルを持つ祖先がある場所はすべて拒否)を変える判断になる。したがって、ここで必要なのは repair ではなく方針の決定である。関連箇所: docs/configuration.md:428(relative value を repository root から解決するという記述)、docs/configuration.md:431(拒否条件)。bin/fm-spawn.sh:3930- round 5 の fix(7f0866a)を確認した。sed は basic string と literal string の両方を受け付けるようになり、1 行に対して 2 つの-eが両方当たることもない。test_pool_root_follows_the_project_treehouse_toml は spawn を実際に実行し、pane に送られた--rootを検査する behavior テストなので、旧コードでは literal のケースで失敗する。追加の対応は不要。🔧 Fix applied.
1 info still open:
bin/fm-spawn.sh:3930- round 5 の fix(7f0866a)を確認した。sed は basic string と literal string の両方を受け付けるようになり、1 行に対して 2 つの-eが両方当たることもない。test_pool_root_follows_the_project_treehouse_toml は spawn を実際に実行し、pane に送られた--rootを検査する behavior テストなので、旧コードでは literal のケースで失敗する。追加の対応は不要。✅ **Test** - passed
✅ No issues found.
live-pool-root-driver.sh <worktree>(evidence dir): 使い捨ての lab home 2つ(primary と、.fm-secondmate-homeを置いた secondmate)、共有 origin を持つ qa2 clone 3つ(primary・secondmate・operator checkout)、TMUX_TMPDIR=$LAB/tmux、HOME=$LAB/userhome を用意し、本物の treehouse v2.3.0 を使用S1:FM_HOME=$LAB/primary bin/fm-spawn.sh p1 <primary>/projects/qa2 "sh -c ..." --mode local-only --yolo off --backend tmuxS2: 同じ手順を secondmate home で実行(s1)S3: operator clone でtreehouse --root <sm>/state/treehouse get --leaseを実行して slot を作り、return --forceで空き slot にした。origin を進めた後、bin/fm-spawn.sh s2 <sm>/projects/qa2 --scout --backend tmuxを実行S4: base commit 1aa2a21 の fm-spawn.sh(git archiveで取り出したもの)で legacy1 を spawn して default root に置き、作業を local main に ff した後、新しいコードのbin/fm-teardown.sh legacy1を実行bash tests/fm-spawn-pool-base-freshen.test.shbash tests/fm-tangle-guard.test.sh✅ No issues found.
Live driver: two disposable homes made withbin/fm-lab-home.sh create(one primary, one secondmate), two clones of one local bare origin that are both named qa2, a privatetmux -L fm-labserver with TMUX_TMPDIR and HOME inside the lab, and realtreehousev2.3.0. Each scenario ranbin/fm-spawn.sh <id> <project> --scout --harness 'sleep 600'from inside the lab paneS1: spawn from the primary home with an absolute TREEHOUSE_ROOTS2/S2b: spawn from the secondmate home using the other clone, then a second spawn from the primary homeS3:treehouse --root <homeB-root> get --lease+returnfrom the primary-side clone to plant a free foreign slot, then a spawn from the secondmate homeS4: TREEHOUSE_ROOT=$HOME/proj/pools with $HOME/proj/AGENTS.md presentS5: TREEHOUSE_ROOT=<FM_HOME>/poolsS6: TREEHOUSE_ROOT unset, $HOME/CLAUDE.md present, project treehouse.toml with root='.'bash tests/fm-spawn-pool-base-freshen.test.sh(all passed)bash tests/fm-teardown.test.sh(rc=0)Lab teardown:tmux -L fm-lab kill-server, thenchmod -R u+wandrm -rfof the lab directories✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.