feat: add external host-root mode - #1238
Open
YrFnS wants to merge 36 commits into
Open
Conversation
Owner
|
Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch. When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again. Noted for firstmate#1238 at |
…e remains blocked
YrFnS
force-pushed
the
feat/host-root-mode-upstream
branch
from
July 30, 2026 07:48
eb42af2 to
39e7244
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
FM_HOST_ROOTexecution and managed Pi activation so an external host can remain authoritative while FirstMate code, state, and target worktrees stay isolated.Risk Assessment
Testing
Independently exercised the focused four-root safeguards and real Pi installer, Pi 0.83.0 host-only activation, and Herdr 0.7.5 spawn/completion/decision-inventory/cleanup path; all succeeded, the host stayed unchanged, and the source worktree stayed clean. No screenshot was captured because this is a CLI/Pi RPC change; the real status and RPC artifacts show the reviewer-visible surface.
Evidence: Operator install/status transcript
FirstMate Pi host activator: installed host: /tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/host firstmate home: /tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/firstmate-home worker backend: herdrEvidence: Real Pi activation and dormancy summary
At the configured host: active marker present, watcher command available, AFK skill available. Outside it: all three absent.Evidence: Raw Pi RPC response at configured host
Evidence: Raw Pi RPC response outside configured host
Evidence: Host immutability evidence
Baseline and current AGENTS.md SHA-256 values matched; host repository unchanged: yes.Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
tests/fm-backend-herdr.test.sh- merge conflict rebasing onto origin/maintests/fm-kimi-harness.test.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Review** - 1 issue found → auto-fixed ✅
.pi/extensions/lib/fm-host-activator.ts:92- Host-root Pi workers start fromFM_HOST_ROOTwithFM_TARGET_WORKTREEset, but this activator gates only on cwd. It therefore activates inside every Pi worker too, appending primary supervisor policy and loading the primary guard/watcher extensions alongside the worker’s task extension. Return early whenFM_TARGET_WORKTREEis non-empty and add a worker-shaped activation regression.🔧 Fix: Captain: guard host-root Pi workers from supervisor activation
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bin/fm-test-run.sh --json /tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/focused-tests.json tests/fm-host-root-mode.test.sh tests/fm-host-setup.test.shtests/fm-backend-herdr-host-root-e2e.test.shenv -u FM_ROOT_OVERRIDE -u FM_HOME -u FM_HOST_ROOT -u FM_BACKEND PI_CODING_AGENT_DIR=/tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/pi-agent HOME=/tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/user-home bin/fm-host-setup.sh install /tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/host --home /tmp/no-mistakes-evidence/01KYRXQJTDTT9535C4ENEZFYGB/manual-host-demo/firstmate-home --backend herdrandstatusRealpi --approve --mode rpc --no-sessionprobes from the configured host and an outside directory withPI_OFFLINE=1Compared committed/current hostAGENTS.mdSHA-256 values and rangit -C <host> status --shortgit rev-parse HEAD;git status --short --branch;git diff --name-only;git diff --cached --name-only✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.