Skip to content

feat(bin): add managed host-root mode for native Windows - #1238

Open
YrFnS wants to merge 59 commits into
kunchenguid:mainfrom
YrFnS:feat/host-root-mode-upstream
Open

feat(bin): add managed host-root mode for native Windows#1238
YrFnS wants to merge 59 commits into
kunchenguid:mainfrom
YrFnS:feat/host-root-mode-upstream

Conversation

@YrFnS

@YrFnS YrFnS commented Jul 29, 2026

Copy link
Copy Markdown

Intent

Complete and validate FirstMate PR #1238 so native Windows Pi started from the Second Brain host inside Herdr actually loads the managed host activator, injects the configured FirstMate environment, and can dispatch a disposable isolated worker. Fix Windows physical-path comparison and generated ESM import URL handling without weakening fail-closed physical-root, ownership, or explicit host-root mismatch checks. Preserve current upstream behavior, narrow legacy compatibility, Claude Stop recovery, Herdr as the Windows backend, Orca's experimental status, and cross-platform Linux/macOS behavior. Resolve all verified review findings, including recoverable rollback metadata with missing endpoint ids and Herdr cleanup lock reentrancy, with minimal shared-boundary fixes and focused behavioral coverage. Push the validated branch to the existing open PR, but do not merge it.

What Changed

  • Add an opt-in host-root mode and managed Pi activator that layers FirstMate policy, skills, hooks, and environment onto an external host repository while keeping workers in isolated task worktrees.
  • Extend backend, spawn, supervision, rollback, and teardown flows with native-Windows Herdr path handling and host-bound endpoint ownership safeguards.
  • Document host-root operation and add focused setup, activation, routing, rollback, cleanup, and real Herdr end-to-end coverage.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed
✅ **Rebase** - passed
✅ **Review** - completed
🔧 **Test** - 1 issue found → auto-fixed ✅
✅ **Document** - passed
⚠️ **Lint** - 1 warning
✅ **Push** - passed

@kunchenguid

kunchenguid commented Jul 30, 2026

Copy link
Copy Markdown
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 eb42af2e.

@YrFnS
YrFnS force-pushed the feat/host-root-mode-upstream branch from eb42af2 to 39e7244 Compare July 30, 2026 07:48
@YrFnS YrFnS changed the title feat: activate FirstMate from external host roots feat: add external host-root mode Jul 30, 2026
@kunchenguid kunchenguid removed the wheelhouse:pending-contributor-action Managed by Wheelhouse label Jul 30, 2026
@kunchenguid

kunchenguid commented Jul 30, 2026

Copy link
Copy Markdown
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 39e72446.

@kunchenguid

Copy link
Copy Markdown
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 baa5ef04.

@YrFnS
YrFnS force-pushed the feat/host-root-mode-upstream branch from baa5ef0 to 929cbb4 Compare August 1, 2026 11:27
@YrFnS

YrFnS commented Aug 1, 2026

Copy link
Copy Markdown
Author

Rebased this PR onto current main and updated the host-root topology: the external host remains the supervisor authority, while ordinary ship/scout workers launch in their isolated target worktrees and load target-repository instructions natively. FirstMate briefs, completion signaling, recovery metadata, teardown safety, and SecondMate isolation remain intact.

Validation at head 929cbb4c passed no-mistakes review, focused host-root/Orca/real-Herdr checks, the complete behavior suite, documentation checks, and pinned ShellCheck lint. One unrelated Calm/Pi 12-second notification wait was intermittent; it passed in the preceding full run and on immediate isolated retry.

The new upstream Actions runs are currently action_required with no jobs, so they need maintainer approval before CI can execute:

@YrFnS
YrFnS force-pushed the feat/host-root-mode-upstream branch from 929cbb4 to 03c25bc Compare August 2, 2026 07:08
@YrFnS YrFnS changed the title feat: add external host-root mode feat: add optional host-root mode Aug 2, 2026
@YrFnS
YrFnS force-pushed the feat/host-root-mode-upstream branch 2 times, most recently from 3fc65f4 to 7a05d4f Compare August 3, 2026 01:35
@YrFnS YrFnS changed the title feat: add optional host-root mode feat: add optional host-root supervisor mode Aug 3, 2026
@YrFnS YrFnS changed the title feat: add optional host-root supervisor mode feat: add optional host-root mode Aug 3, 2026
YrFnS and others added 20 commits August 3, 2026 08:16
@YrFnS
YrFnS force-pushed the feat/host-root-mode-upstream branch from 0b921a3 to 9f97148 Compare August 3, 2026 05:24
@YrFnS YrFnS changed the title feat: add optional host-root mode feat(bin): add managed host-root mode for native Windows Aug 3, 2026
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.

2 participants