Skip to content

fix: reduce process creation in supervision loops - #69

Merged
MrGTV-love merged 9 commits into
mainfrom
fm/fm-supervision-fork-budget
Oct 9, 2026
Merged

MrGTV-love merged 9 commits into
mainfrom
fm/fm-supervision-fork-budget

Conversation

@MrGTV-love

@MrGTV-love MrGTV-love commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Intent

I would like all bugs to be fixed so tomorrow can be focused entirely to Vernant and not problems preventning Vernant from getting built.

A recommended architecture should come with proof.

Context (the backlog record for this bug, as filed):

Cut process creation in the supervision loops (repo: firstmate) (kind: ship) (since 2026-10-08)
Cut process creation in fm-watch.sh, fm-crew-state.sh, fm-fleet-snapshot.sh, fm-procevent.sh (owner watchdog loop near bin/fm-procevent.sh:1530-1560) and fm-home-summary-refresh.sh: remove per-line subshells and repeated jq/grep/sed forks. Proof: processes per cycle before and after, byte-identical output, host process-creation rate before and after. Coordinate with in-flight fm-home-summary-refresh-deadline and fm-wake-drain-fast (do not redo their files' already-fixed parts).

Source: data/fm-sandbox-offload-analysis/report.md (2026-10-08). 21-minute sample at load 102 on 18 cores: 0.1% idle, 56% kernel time, ~61% of CPU in sub-second processes, ~2,850 new processes per second, firstmate supervision scripts start 61% of short-lived process sightings (sleeps excluded); 106 of 155 agent sessions idle the whole window holding ~33 GB. Target for the R4 set over one fleet day: 1-min load <= 36 for >= 90% of the day, process creation < 500/s, kernel time < 25%, no new timeout-class failures. Pattern: measure, fix the root, test, measure again (as fm-wake-drain-fast did).

What Changed

  • Replace subprocess-based metadata, TOON, ledger-row, and path reads with shell parsing and direct variable assignment across watcher, crew-state, busy-state, and session-end supervision paths.
  • Consolidate status-signature and process-event state-root checks into single stat calls, reuse signatures during wake scans, cache platform detection, and remove marker-read and process-identity trimming forks.
  • Add helper-level subshell-budget and output-equivalence regression coverage across available Bash versions and locales; register the suite and update portable timeout fixtures, ShellCheck annotations, and documentation.

Risk Assessment

✅ Low: The hot-loop refactors are bounded, and no source-backed behavioral regression was found; the only finding concerns accidentally committed test scratch files.

Testing

After correcting disposable-fixture setup, live watcher transitions, crew/fleet byte equivalence, summary publication, and watchdog ownership guards passed, with product transcripts and JSON outputs retained. The target helper checks passed while four corresponding base checks failed on their expected subshell budgets, but those checks did not establish a live result for the helper-budget scenario. Previously supplied whole-process and paired host-rate measurements were not independently remeasured.

  • Live validation: ⚠️ inconclusive - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Watch twelve quiet status logs, receive an appended failure, and rearm without repeating handled wakes ✅ pass live Live watcher transitions and recovery acknowledgements
Replace a reported status file at the same byte size without losing its new event ✅ pass live Live watcher transitions and recovery acknowledgements
Receive a status event through a symlink with Unicode and control-character target bytes ✅ pass live Live watcher transitions and recovery acknowledgements
Read current crew states while preserving last-key-wins metadata behavior ✅ pass live Crew state and snapshot byte-equivalence transcript
Read fleet JSON and publish a private home-summary ledger without output drift ✅ pass live Base fleet snapshot; Byte-identical target fleet snapshot; Published home-summary ledger
Keep owned process-event runners alive, then stop only the runner whose physical home state was replaced ✅ pass live Watchdog stops only the replaced root's runner
Reject a world-writable state root and terminate its owned runner ✅ pass live Unsafe state-root refusal and runner cleanup
Keep larger helper scans within their documented subshell budgets ⏸️ untested no The prior payload did not establish a live result: it explicitly recorded live=false and only focused helper regression measurements. Those checks reported base-to-target subshell-depth transitions of…
Evidence: Live watcher transitions and recovery acknowledgements

Source: Live watcher transitions and recovery acknowledgements

{
  "commands": [
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-lab-home.sh",
        "create",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer"
      ],
      "returncode": 0,
      "stdout": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer\n",
      "stderr": ""
    },
    {
      "argv": [
        "bash",
        "-c",
        ". \"$1/bin/fm-wake-lib.sh\"; for f in \"$2/state/\"*.status; do fm_wake_status_mark_current \"$2/state\" \"$f\" || exit; done",
        "_",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-home-summary-refresh.sh"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-open-loops.sh",
        "--heartbeat"
      ],
      "returncode": 0,
      "stdout": "bin: ~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-open-loops.sh\ndescription: Reconcile assigned work against live delivery evidence\ncomplete: true\ngenerated_epoch: 1791550130\nrows: []\nhelp: Run bin/fm-open-loops.sh --json for age limits and structured rows\n",
      "stderr": ""
    },
    {
      "argv": [
        "bin/fm-watch.sh"
      ],
      "label": "quiet-12-log-poll",
      "env": {
        "FM_HOME": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer",
        "FM_POLL": "1",
        "FM_SIGNAL_GRACE": "0",
        "FM_HEARTBEAT": "3600",
        "FM_HEARTBEAT_MAX": "3600",
        "FM_HOME_SUMMARY_INTERVAL": "3600",
        "FM_OPEN_LOOPS_INTERVAL": "3600",
        "FM_CHECK_INTERVAL": "3600"
      },
      "pid": 70047
    },
    {
      "label": "append-actionable-status",
      "stdout": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "stderr": "",
      "returncode": 0
    },
    {
      "argv": [
        "bash",
        "-c",
        ". \"$1/bin/fm-wake-lib.sh\"; fm_recovery_marker_snapshot \"$2/state/.watcher-down\"; printf \"%s\" \"${FM_RECOVERY_MARKER_TOKEN##*:}\"",
        "_",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer"
      ],
      "returncode": 0,
      "stdout": "70047.1791550136.ylD5UK",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-wake-drain.sh",
        "--ack-through",
        "2",
        "--recovery-generation",
        "70047.1791550136.ylD5UK"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "bin/fm-watch.sh"
      ],
      "label": "restart-dedup",
      "env": {
        "FM_HOME": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer",
        "FM_POLL": "1",
        "FM_SIGNAL_GRACE": "0",
        "FM_HEARTBEAT": "3600",
        "FM_HEARTBEAT_MAX": "3600",
        "FM_HOME_SUMMARY_INTERVAL": "3600",
        "FM_OPEN_LOOPS_INTERVAL": "3600",
        "FM_CHECK_INTERVAL": "3600"
      },
      "pid": 11741
    },
    {
      "label": "same-size-inode-replacement",
      "stdout": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "stderr": "",
      "returncode": 0
    },
    {
      "argv": [
        "bash",
        "-c",
        ". \"$1/bin/fm-wake-lib.sh\"; fm_recovery_marker_snapshot \"$2/state/.watcher-down\"; printf \"%s\" \"${FM_RECOVERY_MARKER_TOKEN##*:}\"",
        "_",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer"
      ],
      "returncode": 0,
      "stdout": "11741.1791550155.TKg6Je",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-wake-drain.sh",
        "--ack-through",
        "4",
        "--recovery-generation",
        "11741.1791550155.TKg6Je"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "bin/fm-watch.sh"
      ],
      "label": "replacement-dedup",
      "env": {
        "FM_HOME": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer",
        "FM_POLL": "1",
        "FM_SIGNAL_GRACE": "0",
        "FM_HEARTBEAT": "3600",
        "FM_HEARTBEAT_MAX": "3600",
        "FM_HOME_SUMMARY_INTERVAL": "3600",
        "FM_OPEN_LOOPS_INTERVAL": "3600",
        "FM_CHECK_INTERVAL": "3600"
      },
      "pid": 54988
    },
    {
      "label": "unicode-control-symlink-status",
      "stdout": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-4.status\n",
      "stderr": "",
      "returncode": 0
    },
    {
      "argv": [
        "bash",
        "-c",
        ". \"$1/bin/fm-wake-lib.sh\"; fm_recovery_marker_snapshot \"$2/state/.watcher-down\"; printf \"%s\" \"${FM_RECOVERY_MARKER_TOKEN##*:}\"",
        "_",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer"
      ],
      "returncode": 0,
      "stdout": "54988.1791550165.Wzfb5y",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-wake-drain.sh",
        "--ack-through",
        "6",
        "--recovery-generation",
        "54988.1791550165.Wzfb5y"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "bin/fm-watch.sh"
      ],
      "label": "symlink-dedup",
      "env": {
        "FM_HOME": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer",
        "FM_POLL": "1",
        "FM_SIGNAL_GRACE": "0",
        "FM_HEARTBEAT": "3600",
        "FM_HEARTBEAT_MAX": "3600",
        "FM_HOME_SUMMARY_INTERVAL": "3600",
        "FM_OPEN_LOOPS_INTERVAL": "3600",
        "FM_CHECK_INTERVAL": "3600"
      },
      "pid": 78272
    },
    {
      "label": "stop-isolated-watcher",
      "stdout": "",
      "stderr": "",
      "returncode": -15
    }
  ],
  "results": [
    {
      "name": "append-actionable-status",
      "output": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "queue": "1791550136\t1\tsignal\ttask-3.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n1791550137\t2\tsignal\ttask-3.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "result": "pass"
    },
    {
      "name": "same-size-inode-replacement",
      "output": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "queue": "1791550154\t3\tsignal\ttask-3.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n1791550155\t4\tsignal\ttask-3.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-3.status\n",
      "result": "pass"
    },
    {
      "name": "unicode-control-symlink-status",
      "output": "signal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-4.status\n",
      "queue": "1791550165\t5\tsignal\ttask-4.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-4.status\n1791550166\t6\tsignal\ttask-4.status\tsignal: ~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.rzw_5oer/state/task-4.status\n",
      "result": "pass"
    },
    {
      "name": "quiet-and-restart-dedup",
      "result": "pass",
      "quiet_logs": 12,
      "no_duplicate_wakes": true
    }
  ]
}
Evidence: Crew state and snapshot byte-equivalence transcript

Source: Crew state and snapshot byte-equivalence transcript

{
  "commands": [
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "name",
        "state-parity"
      ],
      "returncode": 0,
      "stdout": "fm-lab-state-parity-26157-12648\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-lab-home.sh",
        "create",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w"
      ],
      "returncode": 0,
      "stdout": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "provision",
        "fm-lab-state-parity-26157-12648"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "run",
        "fm-lab-state-parity-26157-12648",
        "workspace",
        "create",
        "--label",
        "fork-budget-state",
        "--cwd",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "--no-focus"
      ],
      "returncode": 0,
      "stdout": "{\"id\":\"cli:workspace:create\",\"result\":{\"root_pane\":{\"agent_status\":\"unknown\",\"cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"focused\":true,\"foreground_cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"pane_id\":\"w1:p1\",\"revision\":0,\"scroll\":{\"max_offset_from_bottom\":0,\"offset_from_bottom\":0,\"viewport_rows\":40},\"tab_id\":\"w1:t1\",\"terminal_id\":\"term_65d67d14817cb1\",\"workspace_id\":\"w1\"},\"tab\":{\"agent_status\":\"unknown\",\"focused\":true,\"label\":\"1\",\"number\":1,\"pane_count\":1,\"tab_id\":\"w1:t1\",\"workspace_id\":\"w1\"},\"type\":\"workspace_created\",\"workspace\":{\"active_tab_id\":\"w1:t1\",\"agent_status\":\"unknown\",\"focused\":true,\"label\":\"fork-budget-state\",\"number\":1,\"pane_count\":1,\"tab_count\":1,\"workspace_id\":\"w1\"}}}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "run",
        "fm-lab-state-parity-26157-12648",
        "tab",
        "create",
        "--workspace",
        "w1",
        "--label",
        "fm-live-working",
        "--cwd",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "--no-focus"
      ],
      "returncode": 0,
      "stdout": "{\"id\":\"cli:tab:create\",\"result\":{\"root_pane\":{\"agent_status\":\"unknown\",\"cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"focused\":false,\"foreground_cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"pane_id\":\"w1:p2\",\"revision\":0,\"scroll\":{\"max_offset_from_bottom\":0,\"offset_from_bottom\":0,\"viewport_rows\":40},\"tab_id\":\"w1:t2\",\"terminal_id\":\"term_65d67d148cea72\",\"workspace_id\":\"w1\"},\"tab\":{\"agent_status\":\"unknown\",\"focused\":false,\"label\":\"fm-live-working\",\"number\":2,\"pane_count\":1,\"tab_id\":\"w1:t2\",\"workspace_id\":\"w1\"},\"type\":\"tab_created\"}}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "run",
        "fm-lab-state-parity-26157-12648",
        "pane",
        "rename",
        "w1:p2",
        "fm-live-working"
      ],
      "returncode": 0,
      "stdout": "{\"id\":\"cli:pane:rename\",\"result\":{\"pane\":{\"agent_status\":\"unknown\",\"cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"focused\":false,\"foreground_cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"label\":\"fm-live-working\",\"pane_id\":\"w1:p2\",\"revision\":0,\"scroll\":{\"max_offset_from_bottom\":0,\"offset_from_bottom\":0,\"viewport_rows\":40},\"tab_id\":\"w1:t2\",\"terminal_id\":\"term_65d67d148cea72\",\"workspace_id\":\"w1\"},\"type\":\"pane_info\"}}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-busy-event.sh",
        "arm",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w/state",
        "live-working",
        "--state",
        "busy",
        "--source",
        "fm-recovery",
        "--event",
        "recovered"
      ],
      "returncode": 0,
      "stdout": "g1791550334.29093.3004\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-crew-state.sh",
        "live-working"
      ],
      "returncode": 0,
      "stdout": "state: working \u00b7 source: pane \u00b7 harness busy (fm-recovery)\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/.test-phase-scratch/baseline/bin/fm-crew-state.sh",
        "live-working"
      ],
      "returncode": 0,
      "stdout": "state: working \u00b7 source: pane \u00b7 harness busy (fm-recovery)\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "run",
        "fm-lab-state-parity-26157-12648",
        "tab",
        "create",
        "--workspace",
        "w1",
        "--label",
        "fm-live-paused",
        "--cwd",
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5",
        "--no-focus"
      ],
      "returncode": 0,
      "stdout": "{\"id\":\"cli:tab:create\",\"result\":{\"root_pane\":{\"agent_status\":\"unknown\",\"cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"focused\":false,\"foreground_cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"pane_id\":\"w1:p3\",\"revision\":0,\"scroll\":{\"max_offset_from_bottom\":0,\"offset_from_bottom\":0,\"viewport_rows\":40},\"tab_id\":\"w1:t3\",\"terminal_id\":\"term_65d67d15a148a3\",\"workspace_id\":\"w1\"},\"tab\":{\"agent_status\":\"unknown\",\"focused\":false,\"label\":\"fm-live-paused\",\"number\":3,\"pane_count\":1,\"tab_id\":\"w1:t3\",\"workspace_id\":\"w1\"},\"type\":\"tab_created\"}}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "run",
        "fm-lab-state-parity-26157-12648",
        "pane",
        "rename",
        "w1:p3",
        "fm-live-paused"
      ],
      "returncode": 0,
      "stdout": "{\"id\":\"cli:pane:rename\",\"result\":{\"pane\":{\"agent_status\":\"unknown\",\"cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"focused\":false,\"foreground_cwd\":\"~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5\",\"label\":\"fm-live-paused\",\"pane_id\":\"w1:p3\",\"revision\":0,\"scroll\":{\"max_offset_from_bottom\":0,\"offset_from_bottom\":0,\"viewport_rows\":40},\"tab_id\":\"w1:t3\",\"terminal_id\":\"term_65d67d15a148a3\",\"workspace_id\":\"w1\"},\"type\":\"pane_info\"}}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-busy-event.sh",
        "arm",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w/state",
        "live-paused",
        "--state",
        "idle",
      

... [43020 bytes truncated] ...

B6MP9M5/fm-lab.8vnnya9w\",\n  \"valid\": false,\n  \"reason\": \"live child state has no in-flight backlog item: duplicate-gone=unknown, live-done=done, live-failed=failed, live-paused=paused, live-working=working\",\n  \"invalidity\": {\n    \"kind\": \"unowned_current\",\n    \"ids\": [\n      \"duplicate-gone\",\n      \"live-done\",\n      \"live-failed\",\n      \"live-paused\",\n      \"live-working\"\n    ]\n  },\n  \"state\": \"unknown\",\n  \"active_children\": [],\n  \"decisions_open\": [],\n  \"holds\": [],\n  \"queued\": [],\n  \"landed\": [],\n  \"endpoints\": [\n    {\n      \"id\": \"duplicate-gone\",\n      \"state\": \"unknown\",\n      \"source\": \"none\",\n      \"endpoint\": {\n        \"target\": null,\n        \"exists\": null,\n        \"agent_alive\": \"not_checked\",\n        \"status\": \"unknown\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-done\",\n      \"state\": \"done\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p5\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-failed\",\n      \"state\": \"failed\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p4\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-paused\",\n      \"state\": \"paused\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p3\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-working\",\n      \"state\": \"working\",\n      \"source\": \"pane\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p2\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    }\n  ],\n  \"counts\": {\n    \"active_children\": 0,\n    \"decisions_open\": 0,\n    \"holds\": 0,\n    \"queued\": 0,\n    \"landed\": 0,\n    \"endpoints\": 5\n  },\n  \"omitted\": []\n}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-fleet-snapshot.sh",
        "--secondmate-home-summary"
      ],
      "returncode": 0,
      "stdout": "{\n  \"schema\": \"fm-secondmate-home-summary.v1\",\n  \"hold_classifier_schema\": \"fm-captain-hold-buckets.v1\",\n  \"contributions\": {\n    \"known\": 0,\n    \"checked\": 0,\n    \"counts\": {\n      \"captain\": 0,\n      \"fleet\": 0,\n      \"maintainer\": 0,\n      \"nobody\": 0\n    },\n    \"unmeasured\": 0,\n    \"complete\": true,\n    \"proven_clear\": true,\n    \"stale_verdicts\": 0,\n    \"missing_verdicts\": 0,\n    \"unreadable_records\": 0,\n    \"valid_until\": 900,\n    \"captain\": [],\n    \"captain_omitted\": 0\n  },\n  \"generated\": \"2026-10-09T12:51:48Z\",\n  \"generated_epoch\": 1791550308,\n  \"home\": \"~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w\",\n  \"valid\": false,\n  \"reason\": \"live child state has no in-flight backlog item: duplicate-gone=unknown, live-done=done, live-failed=failed, live-paused=paused, live-working=working\",\n  \"invalidity\": {\n    \"kind\": \"unowned_current\",\n    \"ids\": [\n      \"duplicate-gone\",\n      \"live-done\",\n      \"live-failed\",\n      \"live-paused\",\n      \"live-working\"\n    ]\n  },\n  \"state\": \"unknown\",\n  \"active_children\": [],\n  \"decisions_open\": [],\n  \"holds\": [],\n  \"queued\": [],\n  \"landed\": [],\n  \"endpoints\": [\n    {\n      \"id\": \"duplicate-gone\",\n      \"state\": \"unknown\",\n      \"source\": \"none\",\n      \"endpoint\": {\n        \"target\": null,\n        \"exists\": null,\n        \"agent_alive\": \"not_checked\",\n        \"status\": \"unknown\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-done\",\n      \"state\": \"done\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p5\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-failed\",\n      \"state\": \"failed\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p4\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-paused\",\n      \"state\": \"paused\",\n      \"source\": \"status-log\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p3\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    },\n    {\n      \"id\": \"live-working\",\n      \"state\": \"working\",\n      \"source\": \"pane\",\n      \"endpoint\": {\n        \"target\": \"fm-lab-state-parity-26157-12648:w1:p2\",\n        \"exists\": true,\n        \"agent_alive\": \"dead\",\n        \"status\": \"dead\",\n        \"observed_at\": \"2026-10-09T12:51:48Z\",\n        \"freshness\": \"fresh\"\n      }\n    }\n  ],\n  \"counts\": {\n    \"active_children\": 0,\n    \"decisions_open\": 0,\n    \"holds\": 0,\n    \"queued\": 0,\n    \"landed\": 0,\n    \"endpoints\": 5\n  },\n  \"omitted\": []\n}\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-home-summary-refresh.sh"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-herdr-lab.sh",
        "teardown",
        "fm-lab-state-parity-26157-12648"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    }
  ],
  "results": [
    {
      "name": "live-working",
      "output": "state: working \u00b7 source: pane \u00b7 harness busy (fm-recovery)\n",
      "byte_identical_to_base": true
    },
    {
      "name": "live-paused",
      "output": "state: paused \u00b7 source: status-log \u00b7 laboratory paused\n",
      "byte_identical_to_base": true
    },
    {
      "name": "live-failed",
      "output": "state: failed \u00b7 source: status-log \u00b7 laboratory failed\n",
      "byte_identical_to_base": true
    },
    {
      "name": "live-done",
      "output": "state: done \u00b7 source: status-log \u00b7 laboratory done\n",
      "byte_identical_to_base": true
    },
    {
      "name": "missing-record",
      "output": "state: unknown \u00b7 source: none \u00b7 no metadata for missing-record\n",
      "byte_identical_to_base": true
    },
    {
      "name": "duplicate-gone",
      "output": "state: unknown \u00b7 source: none \u00b7 worktree gone (torn down?)\n",
      "byte_identical_to_base": true
    },
    {
      "name": "fleet-byte-parity",
      "byte_identical": true,
      "bytes": 14824
    },
    {
      "name": "summary-byte-parity",
      "byte_identical": true,
      "bytes": 2975
    },
    {
      "name": "real-summary-publication",
      "matches_direct_producer": true,
      "mode": "0600"
    }
  ]
}
Evidence: Published home-summary ledger

Source: Published home-summary ledger

{
  "schema": "fm-secondmate-home-summary.v1",
  "hold_classifier_schema": "fm-captain-hold-buckets.v1",
  "contributions": {
    "known": 0,
    "checked": 0,
    "counts": {
      "captain": 0,
      "fleet": 0,
      "maintainer": 0,
      "nobody": 0
    },
    "unmeasured": 0,
    "complete": true,
    "proven_clear": true,
    "stale_verdicts": 0,
    "missing_verdicts": 0,
    "unreadable_records": 0,
    "valid_until": 900,
    "captain": [],
    "captain_omitted": 0
  },
  "generated": "2026-10-09T12:51:48Z",
  "generated_epoch": 1791550308,
  "home": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.8vnnya9w",
  "valid": false,
  "reason": "live child state has no in-flight backlog item: duplicate-gone=unknown, live-done=done, live-failed=failed, live-paused=paused, live-working=working",
  "invalidity": {
    "kind": "unowned_current",
    "ids": [
      "duplicate-gone",
      "live-done",
      "live-failed",
      "live-paused",
      "live-working"
    ]
  },
  "state": "unknown",
  "active_children": [],
  "decisions_open": [],
  "holds": [],
  "queued": [],
  "landed": [],
  "endpoints": [
    {
      "id": "duplicate-gone",
      "state": "unknown",
      "source": "none",
      "endpoint": {
        "target": null,
        "exists": null,
        "agent_alive": "not_checked",
        "status": "unknown",
        "observed_at": "2026-10-09T12:51:48Z",
        "freshness": "fresh"
      }
    },
    {
      "id": "live-done",
      "state": "done",
      "source": "status-log",
      "endpoint": {
        "target": "fm-lab-state-parity-26157-12648:w1:p5",
        "exists": true,
        "agent_alive": "dead",
        "status": "dead",
        "observed_at": "2026-10-09T12:51:48Z",
        "freshness": "fresh"
      }
    },
    {
      "id": "live-failed",
      "state": "failed",
      "source": "status-log",
      "endpoint": {
        "target": "fm-lab-state-parity-26157-12648:w1:p4",
        "exists": true,
        "agent_alive": "dead",
        "status": "dead",
        "observed_at": "2026-10-09T12:51:48Z",
        "freshness": "fresh"
      }
    },
    {
      "id": "live-paused",
      "state": "paused",
      "source": "status-log",
      "endpoint": {
        "target": "fm-lab-state-parity-26157-12648:w1:p3",
        "exists": true,
        "agent_alive": "dead",
        "status": "dead",
        "observed_at": "2026-10-09T12:51:48Z",
        "freshness": "fresh"
      }
    },
    {
      "id": "live-working",
      "state": "working",
      "source": "pane",
      "endpoint": {
        "target": "fm-lab-state-parity-26157-12648:w1:p2",
        "exists": true,
        "agent_alive": "dead",
        "status": "dead",
        "observed_at": "2026-10-09T12:51:48Z",
        "freshness": "fresh"
      }
    }
  ],
  "counts": {
    "active_children": 0,
    "decisions_open": 0,
    "holds": 0,
    "queued": 0,
    "landed": 0,
    "endpoints": 5
  },
  "omitted": []
}
Evidence: Unsafe state-root refusal and runner cleanup

Source: Unsafe state-root refusal and runner cleanup

{
  "commands": [
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-lab-home.sh",
        "create",
        "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.b9bcw22k"
      ],
      "returncode": 0,
      "stdout": "~/.no-mistakes/evidence/01M4F956C4Y2YNXZ7JMB6MP9M5/fm-lab.b9bcw22k\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-procevent.sh",
        "register",
        "lavish",
        "lab-permission-guard",
        "--",
        "/bin/sleep",
        "120"
      ],
      "returncode": 0,
      "stdout": "registered: lab-permission-guard (lavish)\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-procevent.sh",
        "ensure-listening",
        "lab-permission-guard"
      ],
      "returncode": 0,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "ps",
        "-p",
        "34070",
        "-o",
        "stat="
      ],
      "returncode": 0,
      "stdout": "S   \n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-procevent.sh",
        "list"
      ],
      "returncode": 1,
      "stdout": "",
      "stderr": "error: process-event state root is not a private directory\n"
    },
    {
      "argv": [
        "ps",
        "-p",
        "34070",
        "-o",
        "stat="
      ],
      "returncode": 0,
      "stdout": "S   \n",
      "stderr": ""
    },
    {
      "argv": [
        "ps",
        "-p",
        "34070",
        "-o",
        "stat="
      ],
      "returncode": 1,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "ps",
        "-p",
        "34070",
        "-o",
        "stat="
      ],
      "returncode": 1,
      "stdout": "",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-procevent.sh",
        "list"
      ],
      "returncode": 0,
      "stdout": "SOURCE                       ADAPTER      OWNER      PENDING\nlab-permission-guard         lavish       none       0\n",
      "stderr": ""
    },
    {
      "argv": [
        "~/.no-mistakes/worktrees/32d18ed9638d/01M4F956C4Y2YNXZ7JMB6MP9M5/bin/fm-procevent.sh",
        "retire",
        "lab-permission-guard"
      ],
      "returncode": 0,
      "stdout": "retired: lab-permission-guard\n",
      "stderr": ""
    }
  ],
  "results": [
    {
      "name": "writable-state-root-refuses-cli-and-stops-owned-runner",
      "result": "pass",
      "refusal": "error: process-event state root is not a private directory\n",
      "elapsed_seconds": 0.36
    }
  ]
}
Evidence: Helper-level subshell-budget before/after comparison

Source: Helper-level subshell-budget before/after comparison

{
  "counter_contract": "Subshell-depth transitions, not total process starts. Helper-level regression evidence only.",
  "baseline": "b062a76a97fe371231bb35cc6d6631c7eaeef00c",
  "base_checks": [
    {
      "selector": "test_run_ledger_scan_starts_no_subshell_per_row",
      "base_exit": 1,
      "base_output": "not ok - reading a 201-row run ledger entered 205 subshells; the bound is 20 (one per row is the old cost)\n"
    },
    {
      "selector": "test_quiet_signal_scan_costs_one_stat_per_log",
      "base_exit": 1,
      "base_output": "not ok - a quiet scan of 12 status logs entered 233 subshells; the bound is 40 (the old cost was 233)\n"
    },
    {
      "selector": "test_recorded_windows_reads_each_task_without_a_subshell",
      "base_exit": 1,
      "base_output": "not ok - listing 20 task windows entered 80 subshells; the bound is 4 (the old cost was 80)\n"
    },
    {
      "selector": "test_owner_watchdog_tick_subshell_budget",
      "base_exit": 1,
      "base_output": "not ok - five owner-watchdog ticks entered 115 subshells; the bound is 80 (the old cost was 115)\n"
    }
  ],
  "target_output_observed": [
    "201-row ledger: 4 (bound 20)",
    "quiet scan of 12 logs: 17 (bound 40)",
    "20 recorded windows: 0 (bound 4)",
    "five watchdog ticks: 50 (bound 80)"
  ]
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • 🚨 tests/fm-supervision-fork-budget.test.sh:64 - The intent explicitly requires "processes per cycle before and after, byte-identical output, host process-creation rate before and after." The added counter measures subshell-depth transitions, not all process starts; its consumers at tests/fm-supervision-fork-budget.test.sh:88 (ledger), :322 (signal scan), :351 (window listing), and :378 (watchdog checks) provide helper-level budgets. Commit 3ee9a1a states per-cycle percentage reductions, but the reviewed history and files contain no host process-creation-rate before/after results or reference to that evidence. Supply the required measurement evidence with comparable workload and sampling intervals, or obtain explicit approval to omit that acceptance criterion.

🔧 Fix applied.
2 issues (1 error, 1 warning) still open:

  • 🚨 tests/fm-supervision-fork-budget.test.sh:64 - The intent explicitly requires "processes per cycle before and after, byte-identical output, host process-creation rate before and after." The added counter measures subshell-depth transitions, not all process starts; its consumers at tests/fm-supervision-fork-budget.test.sh:88 (ledger), :322 (signal scan), :351 (window listing), and :378 (watchdog checks) provide helper-level budgets. Commit 3ee9a1a states per-cycle percentage reductions, but the reviewed history and files contain no host process-creation-rate before/after results or reference to that evidence. Supply the required measurement evidence with comparable workload and sampling intervals, or obtain explicit approval to omit that acceptance criterion.
  • ⚠️ tests/fm-supervision-fork-budget.test.sh:6 - Round 1's documentation-only fix correctly clarifies the counter and references R1-evidence.md, but commit d097d9d has no message body. This leaves the recorded instruction to "summarize it in the message body" unsatisfied. Update only that commit's message with a concise summary of the supplied before/after process counts, paired host-rate results, and live-home sampling limitation; do not change script logic.

🔧 No changes applied.
3 issues (1 error, 2 warnings) still open:

  • 🚨 tests/fm-supervision-fork-budget.test.sh:64 - The intent explicitly requires "processes per cycle before and after, byte-identical output, host process-creation rate before and after." The added counter measures subshell-depth transitions, not all process starts; its consumers at tests/fm-supervision-fork-budget.test.sh:88 (ledger), :322 (signal scan), :351 (window listing), and :378 (watchdog checks) provide helper-level budgets. Commit 3ee9a1a states per-cycle percentage reductions, but the reviewed history and files contain no host process-creation-rate before/after results or reference to that evidence. Supply the required measurement evidence with comparable workload and sampling intervals, or obtain explicit approval to omit that acceptance criterion.
  • ⚠️ tests/fm-supervision-fork-budget.test.sh:6 - Round 1's documentation-only fix correctly clarifies the counter and references R1-evidence.md, but commit d097d9d has no message body. This leaves the recorded instruction to "summarize it in the message body" unsatisfied. Update only that commit's message with a concise summary of the supplied before/after process counts, paired host-rate results, and live-home sampling limitation; do not change script logic.
  • ⚠️ tests/fm-supervision-fork-budget.test.sh:6 - The selected Round 2 instruction to put the measured before/after evidence in the commit message body remains unsatisfied: current HEAD d097d9d references R1-evidence.md only in its subject and has no message body. The header clarification is correct, and no script changes are needed. Add the supplied process counts, output-equivalence results, paired host-rate measurements, and live-home sampling limitation to the commit message body. The later pipeline-owned PR-description update is not a blocker in this review phase.

🔧 Fix applied.
✅ Re-checked - no issues remain.

  • ⚠️ fm-timeout-status.SJ3G9X:1 - Simplification: uncertified fixer commit 31a39ef adds two generated test scratch files: fm-timeout-status.SJ3G9X:1 contains only an exit status, and .fm-test-process.47950.bL23DQ is an empty process registry. Neither is measurement evidence or a required project component. Remove these two additions, retaining the legitimate fixture and documentation fixes.

🔧 Fix applied.
1 warning still open:

  • ⚠️ fm-timeout-status.SJ3G9X:1 - Simplification: uncertified fixer commit 31a39ef adds two generated test scratch files: fm-timeout-status.SJ3G9X:1 contains only an exit status, and .fm-test-process.47950.bL23DQ is an empty process registry. Neither is measurement evidence or a required project component. Remove these two additions, retaining the legitimate fixture and documentation fixes.
⚠️ **Test** - 1 warning

✅ No issues found.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
A changed task status reaches the captain through the watcher and wake drain ✅ pass live watch-clean-first-failure.log and watch-clean-drain.log show the watcher signal, durable queue row, and presented failed status.
Acknowledged status stays quiet after restart, but same-size file replacement wakes supervision ✅ pass live watch-persisted-state.log records an eight-second quiet restart followed by detection of an equal-length replacement with a different inode.
Crew-state preserves metadata precedence and reports working, waiting, terminal, and unknown states correctly ✅ pass live crew-state-byte-equivalence.log contains eight byte-identical base/target outputs.
Fleet JSON and home summary retain the same task-state information after optimization ✅ pass live fleet-byte-equivalence.log, fleet-target-json.json, and fleet-target-secondmate-home-summary.json.
An unsafe owning state directory stops its runner and child without affecting another home ✅ pass live owner-watchdog-live.log records two live registrations, the 0700-to-0777 permission change, affected-process termination, and continued liveness of the other home.
A surviving process-event source completes and publishes its captured result durably ✅ pass live owner-watchdog-live.log contains the captured source output, pending-result listing, durable check queue row, and successful retirement.
Crew-state reduces observed fork and spawn calls without changing missing-endpoint output ✅ pass live observed-process-starts.json records 553 instrumented calls on base versus 425 on target for the same eight-task workload.
Independently remeasure complete supervision-loop starts and host/fleet-day rates ⏸️ untested no DTrace refused initialization because this process lacks additional privileges. A workspace-local observer supplied a bounded crew-state comparison, but snapshot instrumentation failed and could not p…
  • git diff fd9b8b020201a029880b3980b545f352ae357a39 2ced3143dfe9fb593fbe84ede6dd810daffef0ec to scope the changed runtime behavior.

  • bash tests/fm-supervision-fork-budget.test.sh with a workspace-local TMPDIR; exercised helper budgets, parser equivalence, file-kind signatures, alternate IFS, and multiline process identities.

  • bash bin/fm-watch.sh against disposable homes: delivered status changes, acknowledged them through bin/fm-wake-drain.sh, restarted quietly, and detected a same-size status-file replacement.

  • tmux -S .live-supervision/live.socket new-session -d -s fm-lab-supervision -x 120 -y 40 to provide an isolated shell endpoint for reader scenarios; no primary harness or production endpoint was used.

  • bash bin/fm-busy-event.sh arm ... and base/target fm-crew-state.sh &lt;id&gt; across eight representative task records, including repeated metadata keys and an unterminated final line.

  • Base/target fm-fleet-snapshot.sh --json and --secondmate-home-summary against the same frozen home, with FM_SNAPSHOT_NOW=2026-10-09T05:00:00Z.

  • bin/fm-procevent.sh register, reconcile, list, and retire in two isolated homes; changed one state directory from 0700 to 0777 and verified runner/child termination without stopping the other home.

  • dtrace -q -n &#39;syscall::fork:entry { @starts = count(); }&#39; -c /usr/bin/true; unavailable because DTrace requires additional privileges.

  • Built a workspace-local fork/posix_spawn observer with clang, ad-hoc signed a disposable Bash copy with codesign, and passed a four-start nested calibration. A comparable eight-task crew-state workload recorded 553 calls on base versus 425 on target with identical output. Experimental snapshot instrumentation failed and was discarded.

  • Confirmed private process-event claims were retired, no owned watchdogs remained, and the private tmux server had stopped; removed .live-supervision, including copied sources, fixtures, temporary outputs, and observer binaries.

  • ⚠️ live validation verdict: inconclusive (7 of 8 scenarios were driven live against the product); untested: Keep larger helper scans within their documented subshell budgets

  • Live validation: ⚠️ inconclusive - 7 of 8 scenarios driven live against the product

Scenario Result Live Evidence
Watch twelve quiet status logs, receive an appended failure, and rearm without repeating handled wakes ✅ pass live Live watcher transitions and recovery acknowledgements
Replace a reported status file at the same byte size without losing its new event ✅ pass live Live watcher transitions and recovery acknowledgements
Receive a status event through a symlink with Unicode and control-character target bytes ✅ pass live Live watcher transitions and recovery acknowledgements
Read current crew states while preserving last-key-wins metadata behavior ✅ pass live Crew state and snapshot byte-equivalence transcript
Read fleet JSON and publish a private home-summary ledger without output drift ✅ pass live Base fleet snapshot; Byte-identical target fleet snapshot; Published home-summary ledger
Keep owned process-event runners alive, then stop only the runner whose physical home state was replaced ✅ pass live Watchdog stops only the replaced root's runner
Reject a world-writable state root and terminate its owned runner ✅ pass live Unsafe state-root refusal and runner cleanup
Keep larger helper scans within their documented subshell budgets ⏸️ untested no The prior payload did not establish a live result: it explicitly recorded live=false and only focused helper regression measurements. Those checks reported base-to-target subshell-depth transitions of…
  • bash tests/fm-supervision-fork-budget.test.sh
  • git archive b062a76a97fe371231bb35cc6d6631c7eaeef00c bin followed by four FM_TEST_ONLY helper-budget checks against the extracted base scripts
  • bin/fm-lab-home.sh create &lt;lab&gt; for isolated watcher, snapshot, and process-event homes
  • FM_HOME=&lt;lab&gt; bin/fm-watch.sh with twelve adopted status logs; appended a failure, acknowledged its recovery generation, and verified quiet rearming
  • Replaced a status file with equal-length contents at a new inode, then substituted a symlink whose target contained Unicode and a tab; observed and acknowledged both real watcher wakes
  • bin/fm-herdr-lab.sh provision/run/teardown &lt;named-fm-lab-session&gt; for real isolated pane inventory
  • bin/fm-busy-event.sh arm and base/target bin/fm-crew-state.sh &lt;id&gt; comparisons for working, paused, failed, done, missing metadata, and duplicate-key records
  • Base/target bin/fm-fleet-snapshot.sh --json and --secondmate-home-summary comparisons with identical observation-time inputs; bin/fm-home-summary-refresh.sh publication and mode-0600 checks
  • bin/fm-procevent.sh register/ensure-listening/list/retire with real blocking children in two homes; exercised transient lease loss, physical state-root replacement, and a world-writable root
  • Confirmed owned runner PIDs were absent and removed lab homes, the baseline source snapshot, claim registry, and worktree scratch directory
✅ **Document** - passed

✅ No issues found.

✅ No issues found.

🔧 **Lint** - 1 issue found ✅
  • ⚠️ linter found issues (exit code 1)

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

✅ No issues found.

Read per-row, per-task and per-cycle values with shell builtins instead of
command substitutions, and take everything a status signature needs from one
stat. Measured with a fork counter on the live fleet: a crew-state read of the
whole fleet starts 38% fewer processes, a quiet watcher scan over 41 status
logs 94% fewer, and an owner-watchdog tick 66% fewer, with identical output.
…missing uname to the restricted-PATH bearings fixture, fixing the shared portable-serial and stock-Bash failure. Added narrowly documented SC2031 annotations at every affected immediate background-PID capture for ShellCheck 0.11.0’s dynamic printf -v false positive. Updated CI documentation; production logic and supervision measurement evidence remain unchanged. Verification passed: canonical full-analysis lint for all three affected test roots; stock Bash timeout and fleet snapshot/view suites; focused bearings scenarios covering Perl timeout, successful PR enrichment, custom branch mapping, and GitHub failure degradation. Removed the disposable harness. Limitations: the full bearings suite exceeded the local 900-second deadline before reaching the repaired fixture; macOS cannot enforce Linux CI’s required address-space limit, so lint passed with supported local bounds settings
@MrGTV-love
MrGTV-love force-pushed the fm/fm-supervision-fork-budget branch from 779ad34 to eeb642c Compare October 9, 2026 14:03
@MrGTV-love
MrGTV-love merged commit 74968da into main Oct 9, 2026
22 checks passed
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