Repository navigation
fix(bin): bind new Treehouse worker allocations to the spawning clone's Git common directory - #8
Conversation
) * Fix dispatch resolver model and receipts * no-mistakes(review): Drop model-drift branch, harden receipt lock and brief join * no-mistakes(review): Scope receipt recording to clear, report failed joins, measure latency * no-mistakes(review): Narrow dispatch clause and concurrency test, shrink lock budget * no-mistakes(review): Accept --project on the join, assert drop-or-append concurrency * no-mistakes(review): Split lock budgets by path, drop receipt size bound * no-mistakes(review): Record brief_path as spelled, drop abs_path normalization * no-mistakes(review): Pin model in contract, bound receipt latency, record reason * no-mistakes(review): Report dropped resolution receipts, project profile agreement, drop dispatch_id * no-mistakes(review): Enforce append-only cmp, complete join example, govern latency bound * no-mistakes(review): Keep no-rules exit 0 without jq, dedupe error default * no-mistakes(review): Refuse symlinked receipts path, drop dead no_rules jq argument * no-mistakes(document): Document receipt identity, symlink refusal, jq exit narrowing
* fix(bin): refuse an unrecognised fm-send flag instead of sending it as text fm-send's option loop ended in an unconditional `*) break ;;`, so any token it did not recognise - including one obviously shaped as a flag - fell out of the loop and became the positional message body. A steer invoked with a flag that does not exist was durably written into a live worker's steering inbox as the literal flag string while fm-send exited 0, so the worker was mis-steered and the caller got a success code and no diagnostic. The accepted set is now an allowlist rather than a pattern. --key is a real, supported flag parsed after this loop and must keep falling through it untouched, so a blanket "starts with -- and matched no case arm, therefore refuse" rule would have broken it. A bare -- ends flag parsing, which is how a message whose text starts with -- is sent. That separator is threaded to the two --key dispatch points so text after it is text everywhere rather than being re-parsed as a flag. A single-dash word was never a flag here and still needs no separator. The refusal exits before anything is marked, recorded, rung, or typed, the same discipline the header already applies to an empty message. * no-mistakes(review): drop -- end-of-flags separator, keep pure flag allowlist * no-mistakes(document): document fm-send's flag allowlist and leading-`--` message limit * docs(bin): drop the flag-allowlist commentary from fm-send's source The header block in bin/fm-send.sh is that script's documented contract. Recording the no-end-of-flags-separator limitation there amends that contract and turns a deliberate, narrow behaviour change into a documented guarantee the project would then owe. The rationale comment above the option loop goes for the same reason: the limitation describes a decision, which belongs in the pull request, not in the source, where it reads as a promise. Removes only those thirteen comment lines. The refusal itself is unchanged: the option loop remains a pure allowlist, --key still falls through to its own plane untouched, there is no end-of-flags handling, the usage line is unmodified, and the tests are untouched. * fix(bin): refuse trailing arguments after fm-send's --key The option loop breaks at --key without consuming what follows it, and the key path reads only the key itself, so every remaining argument was discarded in silence while the key was still delivered and the command still exited 0. `fm-send.sh lane --key Enter --not-a-real-flag` sent Enter and reported success. That is the same silent-delivery shape the unknown-flag refusal in this change exists to remove, so the key path contradicted the contract on that one path. The same ordering bypassed the --fire-and-forget incompatibility: FIRE_AND_FORGET_ID is only set when the flag precedes --key, so `--key Enter --fire-and-forget x` passed both existing guards. The key path now refuses any trailing argument before delivering the key, naming the offending token in the wording already used for an unknown flag in flag position, and names --fire-and-forget specifically so that incompatibility holds on either ordering. Adds regression coverage for both orderings and for a trailing plain word; both new tests fail before this commit and pass after it.
* Add head-keyed PR review policy ledger * Add post-merge browser QA gate * Fix PR review and post-merge gates * Close remaining PR review gate gaps * Harden migration risk and QA evidence parsing * Close PR review guard bypasses * Tighten review evidence boundaries * Bind final review authorization * Invalidate stale review dispositions * Harden review evidence validation
* Add keyed decision defer mode * no-mistakes(review): Fix defer date identity, hold age, parent channel, reporting * no-mistakes(review): Derive board defer from the option's until alone * no-mistakes(review): Show the defer date on the board card * Fix deferred decision lifecycle edges * no-mistakes(review): Drop fabricated defer hold reason fallback * no-mistakes(document): Correct stale captain-defer docs for the recorded answer path * Fix defer intake failure edges * Require future dates for decision defers * no-mistakes(review): Narrow UTC day parsing; fix elapsed-defer recovery guidance * no-mistakes(review): Refuse duplicate board option values; fix defer recovery wording * Stabilize chat defer hold assertion * Keep chat defer date stable across midnight * Refactor defer validation for bounded lint
* fix(brief): forbid validation auto-accept * no-mistakes(review): restore fleet-wide --yes ban, add ask-user routing sentence * no-mistakes(ci): Fixed a flaky test that failed the "Behavior portable serial 4" shard. Failure: tests/fm-pi-branch-extension.test.sh -> test_captain_outcome_processing_turn_is_sequence_keyed_and_re_presented, with "Error: supervision branch prompt settled but produced no durable outcome for its claimed wake rows" (thrown at .pi/extensions/fm-branch-supervision.ts:1548). Nothing in this PR's diff (the --yes DoD line, the harness-adapters sentence, three brief assertions) touches that extension or test; the other two check runs on the same head commit (99a0187) passed. It is a pre-existing race that surfaces on a slow/loaded runner. Root cause: in fm-branch-supervision.ts a wake builds the branch session (ensureBranch), then runs several awaited subprocesses (flushMirror, actingAsOwner, scopeForUnreadWake, writeEligibleRowsSnapshot, away-posture read-back) and only then snapshots reportRevisionBeforePrompt immediately before session.prompt(...); after the prompt settles it requires that revision to have advanced. The test synchronized on the wrong point: `settle(() => __fmSessions.length === 2, "replacement branch session")`. Session creation precedes that snapshot, so when the extension's pre-prompt work is slower than the test's report append, report2's durable append lands before the snapshot and the wake rejects its own settled prompt as outcome-less. The routine wake earlier in the same test already waits on __fmPrompts.length === 1 and is unaffected. Fix (tests/fm-pi-branch-extension.test.sh:1377, 9 insertions / 1 deletion): wait for the wake prompt as well as the replacement session, matching the routine wake's own idiom, with a comment naming why the built session is not the synchronization point. No production code changed; no new machinery. Verification: reproduced the exact CI error deterministically by temporarily injecting a delay ahead of reportRevisionBeforePrompt (delays 100/200/300/400/500/700 ms all failed with the identical message); that injection was reverted (git status shows only the test file modified). With the fix the test passes under injected delays of 100, 400 and 1500 ms. Full file run: exit 0, 45 tests passing. 24 parallel runs of the target test: 24/24 pass. shellcheck -x on the changed file is clean, and this PR's own tests (tests/fm-brief.test.sh, tests/fm-ask-user-authority.test.sh) still pass. The change is left uncommitted in the worktree, since prior rounds' commits on this branch were made by the executor rather than this phase
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's GuideThe PR repairs multi-clone worker custody by deriving clone-specific Treehouse roots, validating that allocated or recorded worktrees share the requester’s canonical Git common directory before any mutating or launch side effects, preserving foreign and legacy resources on refusal, and adding broad regression coverage. Live validation confirms allocation identity, independent clone separation, and legacy-pool preservation; foreign-custody refusal and legacy relaunch mismatch scenarios remain non-live. Sequence diagram for clone-custodied worker allocationsequenceDiagram
participant Spawn as fm-spawn.sh
participant Git as Git
participant Treehouse as Treehouse
participant Worktree as LinkedWorktree
participant Trust as ClaudeTrust
participant Worker as Worker
Spawn->>Git: rev-parse --git-common-dir
Git-->>Spawn: canonical common directory
Spawn->>Treehouse: treehouse --root canonical-common-dir/firstmate-treehouse get
Treehouse-->>Spawn: allocated worktree
Spawn->>Git: validate worktree custody
Git-->>Spawn: linked worktree shares canonical common directory
Spawn->>Worktree: refresh and validate
Spawn->>Trust: register workspace trust
Spawn->>Worker: launch
Flow diagram for custody refusal before worker launchflowchart TD
A[Resolve requesting clone canonical Git common directory] --> B[Read allocated or recorded worktree custody]
B --> C{Linked worktree and matching common directory?}
C -- No --> D[Refuse before refresh claims hooks trust metadata or launch]
D --> E[Preserve foreign or unverified allocation and terminal]
C -- Yes --> F[Continue with refresh and worker launch]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Validation decision for Only three of five scenarios have live-product evidence. Foreign-custody refusal and legacy relaunch preservation have executable fixture evidence only. The live validation verdict remains inconclusive; full live backend lifecycle validation is not claimed. No production lifecycle experiment was authorized or performed. Adoption remains separate: primary must integrate accepted support while preserving host-local commits before any production retry. The seven local-only lanes still require separately accepted seed/handoff and guarded-primary-landing support before provisioning. |
… v2.3.0 with official platform checksums. The Herdr failures were caused by v2.0.1 lacking the required `--root` capability. Verified installer download/checksum/version, `--root` support, lint, clone-custody regression, and dispatch-resolve regression. The portable failure was an unrelated transient broken-pipe race in unchanged code and passed locally
…axi-lib.sh by replacing the private process-substitution lookup with a direct case mapping. This preserves all provider mappings while preventing an early consumer exit from closing the producer pipe and leaking `printf: write error: Broken pipe` to stderr. Verified with tests/fm-dispatch-resolve.test.sh, bin/fm-lint.sh, and git diff --check; all passed
|
Independent agent review of head Reviewer: Firstmate scout The reviewer accepts this bounded change with no blocking code defect. It verified clone common-directory custody before trust/hooks/launch, preservation of foreign allocations, relaunch checks, and root-less Treehouse return for clone-scoped pools. All six focused suites passed: Kimi, tangle guard, dispatch, pool freshening/custody, real Treehouse clone custody, and Orca. Lint, documentation links, and test coverage inventory checks also passed. The quota-helper failure mechanism was independently reproduced with SIGPIPE ignored: the old helper emitted intermittent broken-pipe stderr (3/2000 calls), while the new helper emitted none (0/2000). Default SIGPIPE probes did not reproduce it. This strengthens the early-reader-exit explanation without proving the precise disposition of the original failing CI process. Nonblocking observations for future scope:
The existing validation limits remain: foreign-custody refusal and legacy relaunch have fixture evidence; the earlier serial-1 timeout cause is unproven. At this reviewed head the full check rollup was 21 passed, 0 failed, 1 skipped. That is distinct from required checks: this fork's target branch has no configured branch protection. Merge remains held. The existing no-mistakes run |
…uard.test.sh still expected the old `treehouse get --root '<root>'` command, but this PR sends `treehouse --root '<root>' get` (bin/fm-spawn.sh:4049; `--root` is a global Treehouse flag, so both orders are valid). Updated the test to expect the new order; no production code changed. The failure reproduced locally before the fix and the script exits 0 after it. No other test, doc or script uses the old order. ci-2 (PR must be raised via no-mistakes): attestation failure because the pipeline's required `test` step is skipped (the Test agent timed out and the re-run was declined). Not caused by the code; the outer pipeline must re-run and complete the test step
|
Final disposition for head cd7d99f:
|
Intent
New concrete provisioning blocker for the repo-orchestrator objective: sm-story-to-anime could not launch its bounded scout. Evidence ~/.treehouse/firstmate-e3a38d/9/firstmate/data/sta-future-gates/launch-blocker.json. fm-spawn allocated ~/.treehouse/story-to-anime-519e0f/4/story-to-anime with git-common-dir under PRIMARY projects/story-to-anime, while secondmate clone has a different .git; Claude trust pre-registration refused. No task metadata or worker launched; possible residual empty Herdr pane firstmate:w67:p3. Diagnose this supported multi-home pool/provenance path as part of enabling repo orchestration, before broad local-only changes. Load diagnostic-reasoning; reproduce only in isolated fixtures, separate trigger/mask/symptom, compare same-clone and different-clone cases plus history and disconfirming case. Need supported allocation/custody repair, never weaken trust or simply switch harness to evade it. Coordinate resulting scope and minimum safe fix; no production lifecycle experiments or pool cleanup without ownership proof. This can be an initial separable fix if broader local-only support is unnecessary to resolve it.
Primary has reviewed the pool-provenance diagnosis and accepts the bounded repair scope already released. Keep pool-custody repair evidence separately reviewable from the broader local-only provisioning change. Report the next immutable head, validation result and precise remaining adoption prerequisites when available; seven repo orchestrators and the anime retry depend on this. Preserve all existing custody and continue within current authorization.
The accepted bounded repair scopes new Treehouse worker allocations to the requesting clone's canonical Git common directory plus /firstmate-treehouse, explicitly overriding ambient pool-root configuration for those new allocations. Require an isolated linked worktree with that same canonical common directory before refresh, slot claims, hooks, trust registration, or worker launch. Preserve existing origin-based project locks, slot ownership, absolute-path returns, stale-read settling, primary/subdirectory/symlink refusals, and unchanged Claude trust. Validate recorded custody on legacy relaunch without silently reallocating. Preserve foreign, dirty, or unlanded work on refusal; do not migrate or clean existing pool slots or introduce automatic residual endpoint cleanup. Keep this allocation/custody repair separately reviewable; broader local-only provisioning and guarded-primary-landing support follow separately.
Preserve unlanded work, isolated homes, exact parent routing, lock ownership, transactional rollback, failure reporting and teardown safety across supported backends. No production lifecycle experiments, resets, forced convergence, paid access or merge authority. Use no-mistakes with yolo off and deliver a reviewable PR. Primary owns actual migration/provisioning after support is accepted.
What Changed
bin/fm-spawn.shnow resolves the spawning project's canonical Git common directory and uses it in two places. New Treehouse allocations get their per-clone--root($HOME/.treehouse-fm/<hash>) from a hash of that directory instead of the clone path, overriding ambient Treehouse root config for new allocations only. Worktree isolation also requires a linked worktree sharing that common directory, so a different clone of the same origin is refused with the cause named. The check runs before base refresh, slot claims, hooks, trust registration and launch; relaunch validates the recorded worktree the same way without reallocating.tests/fm-treehouse-clone-custody.test.sh) driving real Treehouse allocations across two clones of one origin;bin/fm-test-run.shroutesbin/fm-spawn.shchanges to these tests,docs/architecture.mdand the secondmate-provisioning skill document the new root/custody rules, andbin/fm-quota-axi-lib.shreplaces the harness→provider lookup table with an equivalentcase.Risk Assessment
🚨 High: The custody guard is sound, but the chosen pool root puts every crew slot under a Firstmate home and removes upstream's reviewed guarantee against inherited operator instructions, and the merge also carries unrelated real-data fixtures that upstream deliberately removed, so explicit human approval is needed.
Testing
The Test agent exceeded its invocation budget before live validation completed; no evidence was gathered for this head.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:4038- The clone-scoped pool root puts every crew slot inside a Firstmate home, which makes the home's and the primary checkout's AGENTS.md/CLAUDE.md ancestors of worker directories. New allocations runtreehouse --root <PROJ_COMMON_REAL>/firstmate-treehouse get. Project clones live at $FM_HOME/projects/<repo> (bin/fm-bootstrap.sh:165, bin/fm-fleet-snapshot.sh:133), so a slot resolves to <home>/projects/<repo>/.git/firstmate-treehouse/.treehouse/<pool>/<n>/<repo>. Concrete path: a Claude ship/scout spawned from <home>/projects/story-to-anime starts in that slot. Claude Code loads CLAUDE.md from every parent directory, so the worker ingests <home>/CLAUDE.md (@AGENTS.md, the firstmate operator instructions) and the primary checkout's own AGENTS.md/CLAUDE.md, which may be a different version from the slot's branch. Upstream fix(bin): isolate Treehouse crew pools per project clone #14 (1698a36) deliberately moved roots to $HOME/.treehouse-fm/<hash> so that no Firstmate home's AGENTS.md/CLAUDE.md is an ancestor of a crew slot, and its review asserted this in assert_pool_root_outside_homes. This merge deletes that assertion (tests/fm-spawn-pool-base-freshen.test.sh:62-71, replaced by assert_clone_pool_root) and the invariant sentence in docs/architecture.md:276. Other sites that must change together: the fm-spawn.sh header at 226-230, docs/architecture.md:276-277, .agents/skills/secondmate-provisioning/SKILL.md:164-165, tests/fm-treehouse-clone-custody.test.sh:81-84, and in tests/fm-spawn-pool-base-freshen.test.sh assert_clone_pool_root and test_allocation_root_uses_canonical_clone_custody. The user intent names '<canonical common dir>/firstmate-treehouse' as the root, so choosing between that location and upstream's outside-home invariant needs a user decision. One option that keeps both guarantees: key the root by the canonical common dir but place it outside homes, e.g. $HOME/.treehouse-fm/<hash of PROJ_COMMON_REAL>.tests/fixtures/pr-review-ledger/github--twilwa--engineering-workflow-study--1.json:1- The merge carries fork-only, out-of-scope content, including unused real-data PR-ledger fixtures that upstream deliberately replaced with synthetic ones. Intent: 'Keep this allocation/custody repair separately reviewable; broader local-only provisioning and guarded-primary-landing support follow separately.' Relative to origin/main (c4fa12f), the merge adds five fixtures that no test reads: tests/fixtures/pr-review-ledger/github--twilwa--{engineering-workflow-study--1,firstmate--2,firstmate--3,jev-code--1,story-to-anime--1}.json. tests/fm-pr-review.test.sh:424-450 uses only held.json and undispositioned.json. The five files hold real PR URLs, head SHAs and internal hold reasons, for example 'whether the repository keeps its private remote', 'an unresolved licence rights gate' and 'five unresolved episode-one product decisions'. Upstream feat(bin): add head-keyed PR review ledger with opt-in reviewed-head merge handoff #16 (2044333) review commit 'synthesize ledger fixtures' replaced exactly these with synthetic ones. The merge also brings unrelated changes at bin/fm-quota-axi-lib.sh:137-143 (a fork CI fix) and bin/fm-brief-heading-lib.sh:94 (trailing newline). Recommended remedy, pending the user's decision: drop the five fixtures from this PR and split the non-custody changes out.bin/fm-spawn.sh:4133- The Kimi global-hook refusal now happens after pane creation, slot allocation and base refresh, and its error does not name the leftover endpoint. The install of fm-kimi-turnend-hook.sh moved from the pre-pane preflight (old line ~2569) to after freshen_spawn_worktree_base. Concrete path: with a malformed ~/.kimi-code/config.toml, a Kimi ship spawn opens a tmux/herdr window, runstreehouse get(the pane's shell keeps the slot's process lease), refreshes the slot to base, then exits with 'refusing Kimi spawn because the global turn-end hook could not be installed safely'. Before this change the same spawn was refused before any pane existed, which the replaced test_kimi_spawn_refuses_unsafe_global_config_before_pane_creation asserted. The abort trap releases the slot claim, but the window and its leased slot stay behind. The neighbouring claude-trust refusal includes 'inspect window $T'; this message does not, so the operator is not told which endpoint was left. Moving the hook install after the custody check is required by the intent. Keeping an early refusal would need a new read-only validation mode in fm-kimi-turnend-hook.sh, which extends the change, so that remedy needs authorization. Appending '; inspect window $T' to the message at bin/fm-spawn.sh:4135 is a mechanical fix.bin/fm-claude-trust.sh:114- Some comments are now stale, and one common-dir recheck is now redundant, because spawn_worktree_isolated gained the custody comparison. It now refuses any worktree whose common dir differs from PROJ_COMMON_REAL (bin/fm-spawn.sh:3085). The comment at bin/fm-claude-trust.sh:114-116 still says fm-spawn's validate_spawn_worktree never compares common dirs, and docs/orca-backend.md:78 describes the same gap. In bin/fm-spawn.sh:4117-4124, the else-branchfm_same_git_common_dir "$PROJ_ABS" "$WT"can no longer fail after validate_spawn_worktree runs at 4097, and its comment ('that check proves isolation, not this home's Git ownership') is now false. Update the comments and either drop the redundant recheck or annotate it as defensive.🔧 Fix applied.
5 issues (1 error, 2 warnings, 2 infos) still open:
bin/fm-spawn.sh:4038- The clone-scoped pool root puts every crew slot inside a Firstmate home, which makes the home's and the primary checkout's AGENTS.md/CLAUDE.md ancestors of worker directories. New allocations runtreehouse --root <PROJ_COMMON_REAL>/firstmate-treehouse get. Project clones live at $FM_HOME/projects/<repo> (bin/fm-bootstrap.sh:165, bin/fm-fleet-snapshot.sh:133), so a slot resolves to <home>/projects/<repo>/.git/firstmate-treehouse/.treehouse/<pool>/<n>/<repo>. Concrete path: a Claude ship/scout spawned from <home>/projects/story-to-anime starts in that slot. Claude Code loads CLAUDE.md from every parent directory, so the worker ingests <home>/CLAUDE.md (@AGENTS.md, the firstmate operator instructions) and the primary checkout's own AGENTS.md/CLAUDE.md, which may be a different version from the slot's branch. Upstream fix(bin): isolate Treehouse crew pools per project clone #14 (1698a36) deliberately moved roots to $HOME/.treehouse-fm/<hash> so that no Firstmate home's AGENTS.md/CLAUDE.md is an ancestor of a crew slot, and its review asserted this in assert_pool_root_outside_homes. This merge deletes that assertion (tests/fm-spawn-pool-base-freshen.test.sh:62-71, replaced by assert_clone_pool_root) and the invariant sentence in docs/architecture.md:276. Other sites that must change together: the fm-spawn.sh header at 226-230, docs/architecture.md:276-277, .agents/skills/secondmate-provisioning/SKILL.md:164-165, tests/fm-treehouse-clone-custody.test.sh:81-84, and in tests/fm-spawn-pool-base-freshen.test.sh assert_clone_pool_root and test_allocation_root_uses_canonical_clone_custody. The user intent names '<canonical common dir>/firstmate-treehouse' as the root, so choosing between that location and upstream's outside-home invariant needs a user decision. One option that keeps both guarantees: key the root by the canonical common dir but place it outside homes, e.g. $HOME/.treehouse-fm/<hash of PROJ_COMMON_REAL>.tests/fixtures/pr-review-ledger/github--twilwa--engineering-workflow-study--1.json:1- The merge carries fork-only, out-of-scope content, including unused real-data PR-ledger fixtures that upstream deliberately replaced with synthetic ones. Intent: 'Keep this allocation/custody repair separately reviewable; broader local-only provisioning and guarded-primary-landing support follow separately.' Relative to origin/main (c4fa12f), the merge adds five fixtures that no test reads: tests/fixtures/pr-review-ledger/github--twilwa--{engineering-workflow-study--1,firstmate--2,firstmate--3,jev-code--1,story-to-anime--1}.json. tests/fm-pr-review.test.sh:424-450 uses only held.json and undispositioned.json. The five files hold real PR URLs, head SHAs and internal hold reasons, for example 'whether the repository keeps its private remote', 'an unresolved licence rights gate' and 'five unresolved episode-one product decisions'. Upstream feat(bin): add head-keyed PR review ledger with opt-in reviewed-head merge handoff #16 (2044333) review commit 'synthesize ledger fixtures' replaced exactly these with synthetic ones. The merge also brings unrelated changes at bin/fm-quota-axi-lib.sh:137-143 (a fork CI fix) and bin/fm-brief-heading-lib.sh:94 (trailing newline). Recommended remedy, pending the user's decision: drop the five fixtures from this PR and split the non-custody changes out.bin/fm-spawn.sh:4133- The Kimi global-hook refusal now happens after pane creation, slot allocation and base refresh, and its error does not name the leftover endpoint. The install of fm-kimi-turnend-hook.sh moved from the pre-pane preflight (old line ~2569) to after freshen_spawn_worktree_base. Concrete path: with a malformed ~/.kimi-code/config.toml, a Kimi ship spawn opens a tmux/herdr window, runstreehouse get(the pane's shell keeps the slot's process lease), refreshes the slot to base, then exits with 'refusing Kimi spawn because the global turn-end hook could not be installed safely'. Before this change the same spawn was refused before any pane existed, which the replaced test_kimi_spawn_refuses_unsafe_global_config_before_pane_creation asserted. The abort trap releases the slot claim, but the window and its leased slot stay behind. The neighbouring claude-trust refusal includes 'inspect window $T'; this message does not, so the operator is not told which endpoint was left. Moving the hook install after the custody check is required by the intent. Keeping an early refusal would need a new read-only validation mode in fm-kimi-turnend-hook.sh, which extends the change, so that remedy needs authorization. Appending '; inspect window $T' to the message at bin/fm-spawn.sh:4135 is a mechanical fix.bin/fm-claude-trust.sh:114- Some comments are now stale, and one common-dir recheck is now redundant, because spawn_worktree_isolated gained the custody comparison. It now refuses any worktree whose common dir differs from PROJ_COMMON_REAL (bin/fm-spawn.sh:3085). The comment at bin/fm-claude-trust.sh:114-116 still says fm-spawn's validate_spawn_worktree never compares common dirs, and docs/orca-backend.md:78 describes the same gap. In bin/fm-spawn.sh:4117-4124, the else-branchfm_same_git_common_dir "$PROJ_ABS" "$WT"can no longer fail after validate_spawn_worktree runs at 4097, and its comment ('that check proves isolation, not this home's Git ownership') is now false. Update the comments and either drop the redundant recheck or annotate it as defensive.bin/fm-spawn.sh:4043- Switching the hash input from PROJ_ABS_REAL (the base commit's upstream fix(bin): isolate Treehouse crew pools per project clone #14 scheme) to PROJ_COMMON_REAL changes the root for every existing primary clone: it now hashes<clone>/.gitinstead of<clone>. After merge, the first new allocation from each clone lands in a fresh$HOME/.treehouse-fm/<new hash>pool. Idle slots in the previous per-clone roots are not reused or cleaned. Recorded tasks keep working, because relaunch validates the recorded worktree and returns use absolute paths. This matches the user's instruction and the intent's no-migration/no-cleanup constraint, and docs/architecture.md:277 says older pools are left in place. It is listed only as an adoption prerequisite: Primary owns reclaiming the orphaned idle slots once it has proven who owns them.⏭️ **Test** - skipped
✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Summary by Sourcery
Enforce clone custody for new worker allocations while preserving existing task resources and legacy pool ownership.
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests:
Chores: