Skip to content

fix: enforce fail-closed worker and pooled-slot isolation - #2160

Closed
JTInventory wants to merge 127 commits into
kunchenguid:mainfrom
JTInventory:fm/firstmate-ship-1092-s1-core-isolation-0806
Closed

JTInventory wants to merge 127 commits into
kunchenguid:mainfrom
JTInventory:fm/firstmate-ship-1092-s1-core-isolation-0806

Conversation

@JTInventory

Copy link
Copy Markdown

Intent

Ship S1 Core isolation only for JT #1092: fail-closed worker and pooled-slot ownership, minimal spawn/teardown wiring, and focused isolation/slot tests, while preserving JT fork/main ancestry. Keep the S2 session-authority broker, S4 Herdr presentation E2E expansion, #1802/#1710 ports, and full-suite thrash out of scope. Do not merge.

What Changed

  • Adds fail-closed worker identity, primary/home attestation, authoritative process-cwd and ancestry checks, restore-time isolation sweeps, and spawn/lock/bootstrap/turn-end/teardown enforcement.
  • Adds durable pooled-slot ownership with task-bound leases, ownership stamps, immutable endpoint occupancy proofs, and recovery handling for contested, unresolved, or interrupted returns.
  • Extends runtime and operator workflows with tmux/experimental Herdr backends, AFK/session/watcher supervision, secondmate and dispatch routing, optional memory tooling, PR/scope guards, CI, documentation, and regression coverage.

Risk Assessment

⚠️ Medium: No new source-verifiable defect was found in the final review pass, but the change touches high-consequence worker, pooled-slot, and teardown ownership paths and still requires the dedicated test gate.

Testing

Focused S1 validation passed with reviewer-visible CLI evidence; no source changes, merge, PR, or CI actions were performed. Broad fixture failures and host process-census limitations remain warnings, and the forbidden S4 Herdr E2E file blocks acceptance.

Evidence: Focused isolation evidence

Focused worker/slot cases passed, including fail-closed worker identity, live cwd proof, slot retention, clean disposal, and uncertainty handling.

ok - incomplete worker identities fail closed at the shared guard
ok - markerless workers are refused before lock, send, and watcher state resolution
ok - a declared task worker is refused both dispatch and teardown
ok - an agent's working directory is read from the live process, not a record
ok - spawn settles on the process's own working directory, not a pane field that names another process
ok - slot ownership is stamped invisibly in a linked worktree and refused for a plain checkout
ok - a slot this task alone records and stamps disposes normally
ok - a slot still recorded by another task - live, paused, or quarantined - retains its lease
ok - a slot occupied by another task's live agent retains its lease
ok - unproven process evidence blocks restore-time mutation without using a pane path
Evidence: Slot evidence

Pooled-slot endpoint proof passed, including foreign occupants, PID reuse, missing evidence, and clean closed-endpoint disposal.

ok - slot disposal scopes live-process proof to the exact backend endpoint
ok - a reused endpoint PID retains the durable lease
ok - a foreign endpoint-bound occupant retains the durable lease
ok - an endpoint outside the worktree retains the durable lease
ok - an incomplete self-owner home contract retains the durable lease
ok - missing exact endpoint proof retains the durable lease
ok - an undeclared process retains a closed endpoint lease
ok - a reparented worker retains a closed endpoint lease
ok - an unreadable process census retains uncertainty
ok - cross-home paused metadata retains a pooled slot
ok - registered ordinary task homes retain a pooled slot
ok - missing home registry retains a closed endpoint lease
ok - a closed endpoint disposes after a complete empty occupancy census
# all fm-slot-occupant-proof tests passed
Evidence: Teardown evidence

Manual teardown assertion=pass; contested lease retained, other holder preserved, completed holder metadata/stamp cleared, and zero Treehouse return calls.

--- teardown CLI ---
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  2 task(s) in flight, but no watcher has a fresh beacon (last beat: never, grace 300s).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision with a foreground checkpoint: bin/fm-watch-checkpoint.sh --seconds 180.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
teardown: worktree /tmp/manual-teardown.PPPftd/manual-teardown/wt lease RETAINED, not returned to the pool: slot is also recorded by task(s) quarantined-e6
teardown: the directory is left untouched on disk; --force does not waive this ownership gate.
teardown: once nothing references the slot, tearing down its remaining holder releases it; docs/worker-isolation.md owns manual reclaim.
teardown task-e6 complete (window firstmate:fm-task-e6, worktree /tmp/manual-teardown.PPPftd/manual-teardown/wt retained on disk - its lease was retired, not returned)
Backlog: task-e6 just finished. Run tasks-axi done task-e6 --report data/task-e6/report.md, then run tasks-axi ready for dependency-cleared candidates, check date gates, and dispatch only work whose blockers are gone and date is due.
exit=0
treehouse_return_calls=0
task_meta_present=no
other_holder_present=yes
worktree_present=yes
stamp_task=none
manual teardown assertion=pass
Evidence: Ancestry evidence

Base is an ancestor of target; origin/main is not. Named fork/main refs are absent.

target=01b74fe9ca08648f126e79f395cfb5468b3a75e8
base=08691310f92d99b178d058023913b772397709ef
origin_main=e836a7f28bc5100f517c1d672a56483754899add
base_ancestor_of_target=0
origin_main_ancestor_of_target=1
refs/heads/fork/main=absent
refs/remotes/fork/main=absent
refs/heads/main=absent
- Outcome: ⚠️ 4 issues (1 error, 3 warnings) across 1 run (15m41s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped

Push main to origin, or rebase your branch onto origin/main, before gating.

🔧 **Review** - 3 issues found → auto-fixed (6) ✅
  • 🚨 bin/fm-cbm-lib.sh:2 - The authoritative intent says “Ship S1 Core isolation only for JT fix(bin): stop task workers inheriting the primary home and pooled slots #1092,” but this branch adds unrelated CBM functionality; the new bin/fm-cbm-lib.sh begins with “Optional codebase-memory-mcp (CBM) helpers.” The branch also adds Cognee, X-mode, AFK, supervision, and other non-S1 surfaces. Narrow the branch to S1 or explicitly re-authorize the broader scope.
  • 🚨 tests/fm-backend-herdr-presentation-e2e.test.sh:2 - The intent explicitly says “Keep ... S4 Herdr presentation E2E expansion ... out of scope,” but this change adds a real-Herdr presentation E2E suite whose new file states “Isolated real-Herdr E2E coverage” and drives spawn, teardown, and presentation projection. Remove this slice or obtain explicit scope authorization.
  • ⚠️ bin/fm-lock.sh:99 - When a crashed or restarted Codex session has a stale owner such as <dead-pid>|codex:<same-thread>|harness, the same-marker branch preserves that old record at lines 99-100 instead of replacing it with the current verified harness owner. The later attestation check requires the lock PID to equal the current harness PID, so reacquisition fails and leaves the same-thread session stuck read-only. Preserve the old record only when its harness PID is the current verified PID; otherwise replace a dead same-thread harness owner with the current owner.

🔧 Fix: Fixed stale same-thread harness lock recovery
4 issues (1 error, 3 warnings) still open:

  • 🚨 bin/fm-teardown.sh:1624 - After slot_release_allowed retains the lease, teardown still calls teardown_backend_endpoint at line 1651. A foreign endpoint or stamp owned by another task can therefore be killed. The child path kills its endpoint before its slot gate as well. Only close endpoints positively proven to belong to the task being torn down.
  • ⚠️ bin/fm-spawn.sh:672 - Abort and post-launch cleanup clear SPAWN_SLOT_LOCK_HELD before releasing the lock. If release fails, the EXIT trap cannot retry, leaving a stale pooled-slot lock that blocks later lifecycle operations. Clear the flag only after verified release and preserve recovery otherwise.
  • ⚠️ bin/fm-spawn.sh:426 - spawn_create_new_artifact creates the file before inode/digest proof, then returns on proof failure without marking it created. Abort cleanup therefore skips the file, so a missing or failing hash/stat tool can leave state/<id>.turn-ended or hook artifacts that make retry fail the new-artifact precondition.
  • ⚠️ tests/fm-instruction-owners.test.sh:36 - This new test validates dozens of exact natural-language instructions with assert_contains/grep after reading generated briefs and AGENTS.md. It proves only text presence, not behavior, and violates the source-content-only test rule. Replace it with executable workflow scenarios or remove the text assertions.

🔧 Fix: Hardened teardown ownership and spawn cleanup paths
5 issues (4 errors, 1 warning) still open:

  • 🚨 bin/fm-teardown.sh:1699 - A live current-task endpoint can be orphaned when another task's metadata references the same pooled slot. The metadata-retain verdict disables endpoint closure, but teardown still removes the task record and may clear its stamp. The child path has the same sequence. Separate exact self-endpoint closure from pooled-slot release authorization; otherwise preserve durable recovery state.
  • 🚨 bin/fm-slot-owner-lib.sh:356 - Lease disposal is being used as endpoint ownership proof. An endpoint process whose cwd is merely outside the worktree returns a disposal-safe status, after which teardown can kill a reused foreign target. Plain secondmate paths also bypass the ownership gate and may kill a foreign live target or delete state when endpoint proof is unknown. Require positive task identity before endpoint closure.
  • 🚨 bin/fm-teardown.sh:1132 - The top-level secondmate gate evaluates endpoint state, but remove_firstmate_home rechecks the same pooled home with a hard-coded closed state. If the earlier endpoint state was live or unknown and no census occupant is found, teardown can return/delete the pooled home without closing or proving the endpoint. Thread endpoint state through home removal and preserve the home on live or unknown state.
  • 🚨 bin/fm-run-behavior-tests.sh:178 - The behavior runners do not clear the complete operational-home environment before launching child tests. FM_ROOT, FM_PENDING_REPLY_DIR_OVERRIDE, and STATE remain inherited in bin/fm-run-behavior-tests.sh:178-179, with the same omission in bin/fm-test-isolation-proof.sh:433. A run from a supervisor shell can therefore read or mutate live fleet state instead of isolated fixtures; clear the authoritative variable set and FM_PRIMARY_ATTESTATION.
  • ⚠️ bin/fm-test-run.sh:209 - The repository requires test scripts and helpers under tests/ to be plain Bash (CONTRIBUTING.md:48), but the new runner discovers and executes tests/*.test.py and adds a Python unittest. Convert the test to Bash or remove Python discovery and dispatch.

🔧 Fix: Hardened teardown ownership and isolated Bash test runners
1 warning still open:

  • ⚠️ tests/workflow-contract.py:1 - The change still adds the Python helper tests/workflow-contract.py, while CONTRIBUTING.md:48 requires test scripts and helpers under tests/ to be plain Bash. Convert or relocate this helper so the test contract is fully satisfied.

🔧 Fix: Relocated workflow parser outside Bash-only tests
3 issues (2 errors, 1 warning) still open:

  • 🚨 bin/fm-slot-owner-lib.sh:516 - When teardown retains because another task still records the slot, fm_slot_stamp_relinquish clears the current stamp at line 516. The remaining task then reaches the missing-stamp retain path at lines 415-417 and can never release the slot. This contradicts the source claim that retention is not a one-way door. Either explicitly authorize this fail-closed slot leak as containment or implement atomic ownership transfer at the shared slot boundary.
  • 🚨 bin/fm-teardown.sh:1761 - The new endpoint ownership check proves the process using mutable target $T, then teardown kills that same mutable name at line 1761. If the tmux window is renamed or replaced between proof and kill, tmux kill-window -t can terminate a foreign window. Persist and use the immutable tmux window ID through metadata, endpoint proof, and teardown, including child cleanup.
  • ⚠️ bin/fm-spawn.sh:429 - spawn_create_new_artifact can create or partially write $path before cat returns failure, but the created flag is set only at line 433. Abort cleanup then skips the orphan, causing the next spawn to fail the new-artifact precondition. Establish a cleanup guard before writing or remove the exclusively created artifact on write failure.

🔧 Fix: Hardened immutable endpoint teardown and atomic artifact publication
1 warning still open:

  • ⚠️ bin/backends/tmux.sh:91 - The new stable-ID path treats a stopped tmux server as unreadable at lines 91-93, although the existing named-target path correctly classifies the same no server running on ... diagnostic as missing at lines 109-117. New metadata records window_id=@N, so teardown maps this to unknown and retains/refuses the task instead of recognizing the endpoint as closed; legacy records also fail while resolving their name at bin/fm-teardown.sh:363. Preserve the existing missing-server classification at the stable-target boundary, while keeping other inventory failures unreadable.

🔧 Fix: Preserved tmux missing-server classification for stable IDs
✅ Re-checked - no issues remain.

⚠️ **Test** - 4 issues (1 error, 3 warnings)
  • 🚨 tests/fm-backend-herdr-presentation-e2e.test.sh:1 - The target adds a new 1,349-line real-Herdr presentation E2E suite, violating the required S1-only scope. Remove it before shipping.
  • ⚠️ tests/fm-worker-isolation.test.sh:1633 - The full worker-isolation suite cannot complete on this host because two pre-existing zombie processes make the global /proc occupancy census unprovable. Focused cases pass in an isolated PID namespace.
  • ⚠️ tests/fm-bootstrap.test.sh:148 - Bootstrap, session-start, and broad teardown suites stop before assertions because synthetic primary fixtures lack the new attestation/lock proof. Focused S1 tests and manual attested teardown pass.
  • ⚠️ The checkout has no fork/main ref, so exact JT fork/main ancestry cannot be independently verified; only supplied-base ancestry and non-origin/main ancestry were proven.
  • timeout 300s env -u NO_MISTAKES_GATE unshare --fork --pid --mount-proc ... focused worker/slot cases
  • timeout 180s bash tests/fm-slot-occupant-proof.test.sh
  • timeout 300s bash tests/fm-spawn-route.test.sh
  • Manual attested fm-teardown.sh task-e6 --force contested-lease verification
  • timeout 300s bash tests/fm-worker-isolation.test.sh host run
  • timeout 300s bash tests/fm-bootstrap.test.sh
  • timeout 300s bash tests/fm-session-start.test.sh
  • timeout 420s env -u NO_MISTAKES_GATE bash tests/fm-teardown.test.sh
  • git status --short --branch and ancestry/scope scans
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 1)
✅ **Push** - passed

✅ No issues found.

JTInventory and others added 30 commits June 28, 2026 00:25
Adopt upstream baseline and active watcher fix
* feat(cognee): add local lookup manifest checker

* feat(cognee): verify local source hints
* fix: harden Cognee policy and shell lint

* no-mistakes(review): Captain, harden Cognee supervision checks

* no-mistakes(document): Sync Cognee policy docs

* no-mistakes(review): Treat stale CI checks as failures

* no-mistakes(document): Sync Cognee and supervision docs

* ci: run shell tests with bash
* feat(x-mode): add X mention completion follow-ups (kunchenguid#113)

* feat(x-mode): X-mention completion follow-up flow

Acknowledge an actionable X mention first, do the work, then post one
follow-up reply when it completes.

- fm-x-reply.sh: add --followup mode posting to the relay's
  /connector/followup endpoint; reuses thread-split, payload shape,
  dry-run (with a self-describing endpoint marker), and never-inline
  safety. Answer path unchanged.
- fm-x-link.sh: link a spawned task to its originating mention via
  x_request/x_request_ts in state/<id>.meta (atomic, preserves other
  lines).
- fm-x-followup.sh: --check detection plus post-and-clear on terminal
  completion; honors the 24h window (skip+prune past it), keeps the link
  on a failed post for retry.
- fm-x-lib.sh: shared meta link get/set/clear helpers.
- Docs: fmx-respond reads as one ack-first -> act -> follow-up flow;
  AGENTS.md §14 + supervision pointer document the link, completion
  follow-up, and 24h public-safe window.
- Tests: cover --followup endpoint/payload/dry-run, link, and the
  followup helper; shellcheck clean.

* no-mistakes(review): Captain, fix atomic X meta rewrites

* no-mistakes(document): Document X completion follow-ups

* feat(x-mode): dismiss skipped X mentions through the relay (kunchenguid#120)

* feat(x-mode): dismiss skipped mentions at the relay

The relay now exposes POST /connector/dismiss: acknowledge a pending
mention without replying - it drops the request, posts nothing, and stops
re-offering it. Wire firstmate to use it on the skip path so a deliberately
unanswered mention no longer churns every poll and times out to the relay's
"offline" auto-reply.

- bin/fm-x-dismiss.sh: new client modeled on fm-x-reply.sh. POSTs
  {request_id} (no body) to /connector/dismiss with the bearer; echoes the
  request_id on 2xx, exits non-zero on non-2xx/transport failure. Honors
  FMX_DRY_RUN (records the would-be POST to state/x-outbox/ with an
  endpoint:"dismiss" marker, posts nothing) and rejects unsafe request_ids.
- fmx-respond skill: the skip path now calls bin/fm-x-dismiss.sh before
  clearing the inbox file; answer and follow-up paths unchanged.
- AGENTS.md section 14: documents that a skipped mention is dismissed at the
  relay, not just locally cleared.
- tests: dismiss posts {request_id} to /connector/dismiss with the bearer
  and echoes it; dry-run records and posts nothing; non-2xx and transport
  failures exit non-zero; unsafe id and bad args rejected.

* chore(no-mistakes): run the bash suite directly as the test step

The test step had no configured test command, so it delegated to an agent;
that agent-driven run crashed the no-mistakes daemon mid-step on this repo.
Configure commands.test to run the firstmate behavior suite deterministically
instead, mirroring .github/workflows/ci.yml: iterate every tests/*.test.sh,
run each, and fail the step if any exits non-zero. This removes the agent from
the test step entirely (no crash) and makes the gate's test baseline match CI.
Same pattern myfirstmate uses (commands.test: mix deps.get && mix test).

* no-mistakes(review): Fix X dismiss docs and gate preflight

* no-mistakes(document): Document X dismiss and gate tests

* feat(watcher): absorb wakes only when the crew is provably working (kunchenguid#126)

* feat(watcher): absorb wakes only when the crew is provably working

The no-verb triage path (a bare turn-end, a working: note, a non-terminal
stale) used to be benign by default and surfaced only on a captain-relevant
status verb. A crew that finished but reported through interactive pane menus
(no done: status) had its final turn-end absorbed, so firstmate was never
woken and the finish was missed.

Invert the rule: absorb a no-verb turn-end or non-terminal stale ONLY when the
crew shows positive evidence it is still working - its no-mistakes run for its
branch is in an actively-running step, or its pane shows the harness busy
signature. Otherwise surface it so firstmate peeks (done, waiting, or wedged).

- fm-classify-lib.sh: add crew_is_provably_working (reuses fm-crew-state.sh,
  no run-step duplication) and signal_crew_provably_working; FM_CREW_STATE_BIN
  override for tests.
- fm-watch.sh: signal path surfaces a no-verb wake whose crew is not provably
  working (costly check runs only on the no-verb, non-afk path); non-terminal
  stale surfaces immediately when not provably working, else absorbs with the
  wedge timer (run-step read only on first sight of a stale hash).
- afk path unchanged: the watcher stays one-shot and skips the provably-working
  read; the daemon keeps its bounded-latency stale backstop.
- tests: cover every required semantic (mid-pipeline absorb, finished/parked
  surface, no-running-pipeline idle surface, busy absorb, captain-verb surface)
  as classifier unit tests and behavioral watcher runs; queue-safety test for
  the new immediate-surface stale path.
- AGENTS.md section 8: document absorb-only-when-provably-working.

* no-mistakes(document): Sync watcher documentation

* feat: add grok crewmate harness support (kunchenguid#143)

* feat(harness): add grok (Grok Build) as a verified crewmate adapter

Empirically verified against grok 0.2.73 and encoded across the machinery:

- fm-harness.sh: detect grok via GROK_AGENT=1 env marker (grok does not set
  CLAUDECODE) and `grok` command-name ancestry.
- fm-spawn.sh: grok launch template (`grok --always-approve "$(cat BRIEF)"`,
  fully autonomous, no permission gate) and a turn-end Stop hook. grok only
  loads project hooks after a manual folder-trust grant, so the hook is a
  single firstmate-owned global hook (~/.grok/hooks/fm-turn-end.json, always
  trusted) that is a guarded no-op unless the workspace holds a per-task
  .fm-grok-turnend pointer; fm-spawn drops that gitignored pointer naming
  state/<id>.turn-ended. Hook stays outside the worktree, needs no trust grant.
- fm-watch.sh + fm-tmux-lib.sh: grok busy signature `Ctrl+c:cancel` (the
  mid-turn cancel hint; ASCII, present iff a turn runs).
- harness-adapters skill: grok facts section (busy, exit=Ctrl+Q x2,
  interrupt=Ctrl+C, skill invocation /<skill>, resume) and /no-mistakes form.

Gating question confirmed: grok invokes /no-mistakes and drives a real
no-mistakes axi run, so grok is usable for no-mistakes-mode tasks. End-to-end
verified through fm-spawn: autonomous launch past the dir picker into the
worktree, brief processed, busy->idle and turn-end signal detected, fm-send
steer lands, clean Ctrl+Q exit and teardown. config/crew-harness is left
unchanged; this only makes grok available as a verified option.

* no-mistakes(review): Captain, harden Grok hook lifecycle

* no-mistakes(review): Captain, make Grok harness test executable

* no-mistakes(review): Captain, bound Grok pointer reads

* no-mistakes(test): Captain, harden crew-state and watcher-lock timing

* no-mistakes(document): Document Grok harness support

* feat(harness): split secondmate harness configuration (kunchenguid#144)

* feat(harness): split secondmate harness and inherit primary config into secondmate homes

Add config/secondmate-harness so secondmates can run on a different adapter
than crewmates. fm-harness.sh gains a `secondmate` mode resolving the chain
config/secondmate-harness -> config/crew-harness -> own; `crew` mode is
unchanged. fm-spawn resolves a --secondmate launch through that mode (durable:
every respawn re-resolves), while an explicit per-spawn harness arg still wins
and the unverified-adapter guard still holds.

Add a generic, extensible inheritable-config mechanism (fm-config-inherit-lib.sh)
that pushes the primary's declared LOCAL config into each secondmate home's
config/ at secondmate spawn and on the bootstrap secondmate sweep. Exactly one
item is wired today: config/crew-harness, so a secondmate's own crewmates use
the primary's setting. Primary-authoritative (re-pushed every convergence,
mirrors absence); config/secondmate-harness is deliberately not inherited since
secondmates never spawn secondmates. config/ is gitignored, so this is a copy
separate from the tracked-files fast-forward.

Update AGENTS.md (layout, bootstrap, harness, spawn), the harness-adapters
skill, docs/scripts.md, and .gitignore. New tests cover secondmate resolution
and fallback, spawn/respawn honoring config/secondmate-harness, config
propagation on spawn and sweep, the unverified-adapter guard, and backward
compatibility.

* no-mistakes(review): Surface inherited config propagation failures

* no-mistakes(review): Harden inherited config propagation

* no-mistakes(review): Document literal harness inheritance requirement

* no-mistakes(document): Document secondmate harness config

* feat(backlog): default backlog operations to tasks-axi (kunchenguid#145)

* feat(backlog): default to tasks-axi backend

* no-mistakes(document): Sync backlog backend docs

* fix(spawn): set per-task GOTMPDIR so interrupted Go builds don't leak /tmp (#36)

* fix(spawn): set per-task GOTMPDIR so interrupted Go builds don't leak /tmp

Go's GOTMPDIR is unset, so every go build/test creates numbered /tmp/go-build*
dirs. Go cleans them on a clean exit but LEAVES THEM when interrupted (signal,
timeout, OOM, full disk), accumulating and filling the disk over time.

Give each task its own temp root at /tmp/fm-<id>/ with Go's build temp nested at
gotmp/. fm-spawn creates the dir (Go won't mkdir GOTMPDIR), exports GOTMPDIR into
the crewmate pane so the agent and child processes inherit it, and records
tasktmp= in meta. fm-teardown reads tasktmp= and removes the whole root on
cleanup, deterministically.

GOTMPDIR (not TMPDIR) is the targeted knob: TMPDIR is too broad (affects every
program's temp). The nested root is extensible: other per-task temp can live
under /tmp/fm-<id>/ later.

Backward compat: tasks spawned before this change have no tasktmp= in meta;
teardown tolerates the empty value as a no-op. The daily fm-disk-cleanup.sh cron
remains a safety net for any pre-fix stray dirs.

* fix(tests): silence SC2016 for literal grep -F patterns in fm-gotmp test

The structural grep -F assertions deliberately match literal $TASK_TMP in the
fm-spawn source; add per-line shellcheck disable=SC2016 (the codebase's existing
pattern, e.g. bin/fm-spawn.sh) so CI lint passes.

* no-mistakes(document): docs: document tasktmp= meta field for per-task GOTMPDIR

---------

Co-authored-by: e-jung <8334081+e-jung@users.noreply.github.com>

* fix: accept landed squash-merged PR heads (kunchenguid#149)

* fix(teardown): accept landed squash-merge PR heads

* no-mistakes(document): Document teardown landing behavior

* no-mistakes: apply CI fixes

* fix(test): pass explicit teardown git identity

* feat(dispatch): add dynamic crew profiles (kunchenguid#154)

* feat(dispatch): add dynamic crew profiles

* no-mistakes(review): Captain, document dispatch profile inheritance

* no-mistakes(review): Captain, guard stale dispatch inheritance

* no-mistakes(document): Sync dispatch profile docs

* no-mistakes: apply CI fixes

* fix: harden crew dispatch profile enforcement (kunchenguid#159)

* Harden crew dispatch profile enforcement

* no-mistakes(document): Captain, synced crew dispatch docs

* feat: add live secondmate config push (kunchenguid#161)

* feat(config): add live secondmate config push

* no-mistakes(document): Document config push behavior

* no-mistakes(lint): Clean changed shell lint

* no-mistakes: apply CI fixes

* feat: support image attachments in X replies (kunchenguid#162)

* feat(x): add image attachments to reply helpers

* no-mistakes(review): Stream X image replies safely

* no-mistakes(review): Captain, clean X reply temp tracking

* no-mistakes(document): Document X reply image support

* Harden cleanup and image payload limits

* no-mistakes(review): Captain, validate spawn task IDs

* no-mistakes(document): Document X image cap

---------

Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
Co-authored-by: e-jung <e-jung@users.noreply.github.com>
Co-authored-by: e-jung <8334081+e-jung@users.noreply.github.com>
* fix: settle codex secondmate sends before submit

* no-mistakes(document): Sync fm-send docs

* chore: refresh no-mistakes checks

* no-mistakes(document): Document codex secondmate settle path
* Guard no-mistakes CI monitor gh compatibility

* no-mistakes(document): Document gh checks compatibility
* fix: guard firstmate no-mistakes pr target

* no-mistakes(review): Check every PR target URL

* no-mistakes(review): Captain, verify no-mistakes remote targets

* no-mistakes(review): Fail closed on targetless local gates

* no-mistakes(review): Captain, pin PR target guard

* no-mistakes(document): Document PR target guard
* fix: retry codex secondmate submit after pending

* no-mistakes(document): Document fm-send retry behavior
* test(afk): wait on injection events

* no-mistakes(review): Stabilize AFK duplicate waits

* no-mistakes(review): Captain, stabilize AFK wait clocks

* no-mistakes(document): Document AFK injection test waits
* feat: add durable secondmate profile defaults

* no-mistakes(document): Sync secondmate profile docs
tests added 26 commits August 9, 2026 13:15
@JTInventory
JTInventory force-pushed the fm/firstmate-ship-1092-s1-core-isolation-0806 branch 2 times, most recently from ab84f9c to 7cf5953 Compare August 11, 2026 13:14
@JTInventory

Copy link
Copy Markdown
Author

Closing: opened by mistake during a polluted CI path that rebased onto upstream main.

S1 worker/slot isolation ships only via JTInventory#91 (clean JT tip after force-with-lease restore). Do not merge this upstream twin.

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.

1 participant