Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

fix: enforce fail-closed worker isolation - #87

Closed
JTInventory wants to merge 199 commits into
mainfrom
fm/firstmate-port-1092-isolation-0727
Closed

JTInventory wants to merge 199 commits into
mainfrom
fm/firstmate-port-1092-isolation-0727

Conversation

@JTInventory

@JTInventory JTInventory commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Scoped ship

This PR ports and hardens the upstream worker-isolation contract from kunchenguid/firstmate#1092 for the JTInventory fork. It is intentionally shipping as a scoped isolation slice after the 2026-08-06 captain freeze.

Included

  • Explicit worker role, task, and owner-home declarations, with inherited operational-home aliases removed and primary operations refused from declared workers.
  • Authoritative process-cwd and endpoint identity checks for restored workers.
  • Durable pooled-slot ownership, exact endpoint occupant proof, contested-return retention, and fail-closed teardown behavior.
  • Read-only session-start isolation scanning and cross-home lifecycle discovery.
  • AF_UNIX/SO_PEERCRED session-authority brokering, authenticated enrollment, durable authority handling, bounded cleanup, and PID/generation hardening.
  • Secondmate and Herdr lifecycle hardening needed by the isolation slice.

Targeted verification at head 22ca7f4118b85f2a3a882ed87fb2f013d8253582

  • PASS: bash tests/fm-cross-home-lifecycle-scan.test.sh
  • PASS: bash tests/fm-slot-occupant-proof.test.sh
  • PASS: shellcheck --norc -x -P SCRIPTDIR -S warning -- bin/fm-backend.sh (local ShellCheck 0.9.0; CI owns pinned 0.11.0 parity)
  • PASS: shellcheck --norc -x -P SCRIPTDIR -S warning -- bin/fm-lock.sh (local ShellCheck 0.9.0; CI owns pinned 0.11.0 parity)
  • PASS: shellcheck --norc -x -P SCRIPTDIR -S warning -- bin/fm-run-behavior-tests.sh (local ShellCheck 0.9.0; CI owns pinned 0.11.0 parity)
  • PASS: shellcheck --norc -x -P SCRIPTDIR -S warning -- bin/fm-session-authority-exec.sh (local ShellCheck 0.9.0; CI owns pinned 0.11.0 parity)
  • PASS: shellcheck --norc -x -P SCRIPTDIR -S warning -- bin/fm-session-durable-authority.sh (local ShellCheck 0.9.0; CI owns pinned 0.11.0 parity)
  • PASS: PATH=/tmp/sc-bin:$PATH bash bin/fm-lint.sh (pinned ShellCheck 0.11.0; complete lint inventory, exit 0)
  • PASS: bash tests/fm-backend.test.sh
  • NOT GREEN: bash tests/fm-run-behavior-tests.test.sh exits at its parallel passing-fixture assertion; the frozen full-suite investigation was not resumed.
  • NOT GREEN: bash tests/fm-codex-session-lock.test.sh passes its hook-boundary assertion, then its direct-shell “acquire without jq” fixture fails.
  • NOT GREEN: bash tests/fm-worker-isolation.test.sh passes its initial declaration checks, then the standalone Claude spawn fixture refuses because primary identity is not bound to the direct test shell.

Explicit validation scope

This PR is not represented as 96/96 behavior-suite green. The continuous full-suite drive was frozen. The scoped isolation and ownership work above is the ship slice; remaining full-suite integration work is deferred.

Deferred follow-up

  • firstmate-herdr-presentation-e2e-0806 — Herdr presentation launch, endpoint preflight diagnostics, and the remaining empty/exit-1 real fixture path.
  • firstmate-authority-broker-cascade-0806 — runner-wide authority survival and the fail-closed broker exit 125 cascade after the Herdr failure.

Do not merge without captain approval.

tests and others added 28 commits August 4, 2026 11:37
…tion; I’m using its current patched private clone for focused proof
@JTInventory

Copy link
Copy Markdown
Owner Author

Closing without merge (captain prudent hold).

  • Lint / invariants / stock were green; full Behavior + Herdr suites were not.
  • Branch kept: fm/firstmate-port-1092-isolation-0727 @ 22ca7f4
  • Do not delete the branch. Intent: re-ship later as smaller slices with targeted green tests (isolation / broker / Herdr e2e), not another continuous 96-suite thrash.

Follow-ups already scoped: herdr presentation e2e, authority-broker cascade.

@JTInventory JTInventory closed this Aug 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant