Skip to content

fix: stop stray remote worker supervisors and align brief decision keys - #13

Open
BohnBawerick wants to merge 2 commits into
mainfrom
fm/fm-suite-unusable
Open

fix: stop stray remote worker supervisors and align brief decision keys#13
BohnBawerick wants to merge 2 commits into
mainfrom
fm/fm-suite-unusable

Conversation

@BohnBawerick

@BohnBawerick BohnBawerick commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Intent

The developer wanted to recover and complete a major memory architecture update for Firstmate, including a compiled working memory system, drop-tray capture, and an idle dreamer consolidation agent. They instructed the assistant to prioritize and parallelize the memory slices while standing down other projects like VoiceMaster. They directed the assistant to autonomously implement, test, validate, land, and push all slices to the fork and local repository while utilizing available models such as Claude Code, OpenCode, and Pi. They also requested regular progress updates and urged the assistant to accelerate delivery through efficient parallel execution.

What Changed

  • Added fm_remote_job_stop_stray_linux_workers in bin/fm-remote-job-lib.sh to stop existing worker supervisors before starting a new Linux remote worker when worker.pid is stale.
  • Updated bin/fm-brief.sh status protocol documentation and examples to consistently use needs-decision [key=<slug>]: and resolved [key=<slug>]: formatting.
  • Hardened end-to-end and lifecycle test scripts to wait on observable files and readiness checks, track and reap background process groups, and reuse fixture templates.

Risk Assessment

✅ Low: The changes are well-bounded test reliability improvements and a targeted stray worker supervisor cleanup fix on Linux.

Testing

Executed all modified test scripts and related remote job, decision key, and runner verification suites. All tests passed, confirming that stray worker process groups are safely stopped before new launches, timeouts and orphan waits are bounded, pid tracking reaps cleanly, and brief decision-key placement renders as documented.

Evidence: Test Runner Execution Timing & Results

Source: Test Runner Execution Timing & Results

{
  "families": [
    {
      "count": 1,
      "duration_ms": 364346,
      "failed": 0,
      "name": "pr-forge"
    },
    {
      "count": 1,
      "duration_ms": 2824,
      "failed": 0,
      "name": "pure-contract-unit"
    },
    {
      "count": 1,
      "duration_ms": 30102,
      "failed": 0,
      "name": "real-herdr-gated"
    },
    {
      "count": 3,
      "duration_ms": 355939,
      "failed": 0,
      "name": "secondmate"
    },
    {
      "count": 1,
      "duration_ms": 19331,
      "failed": 0,
      "name": "watcher-wake-lock"
    }
  ],
  "finished_at": "2026-08-21T13:03:31Z",
  "run_id": "fm-test-run-1787316638116-1331087",
  "scripts": [
    {
      "duration_ms": 2824,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "path": "tests/fm-brief.test.sh"
    },
    {
      "duration_ms": 5043,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "secondmate",
      "gate_skip": false,
      "path": "tests/fm-remote-job-orphan-reap.test.sh"
    },
    {
      "duration_ms": 30102,
      "exit": 0,
      "expected_gate_skip": "herdr",
      "family": "real-herdr-gated",
      "gate_skip": true,
      "path": "tests/fm-afk-inject-herdr-e2e.test.sh"
    },
    {
      "duration_ms": 19331,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "watcher-wake-lock",
      "gate_skip": false,
      "path": "tests/fm-inactive-reconcile.test.sh"
    },
    {
      "duration_ms": 364346,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "path": "tests/fm-pr-check-security.test.sh"
    },
    {
      "duration_ms": 74482,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "secondmate",
      "gate_skip": false,
      "path": "tests/fm-remote-reply.test.sh"
    },
    {
      "duration_ms": 276414,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "secondmate",
      "gate_skip": false,
      "path": "tests/fm-remote-secondmate-lifecycle-e2e.test.sh"
    }
  ],
  "selection": "scripts",
  "started_at": "2026-08-21T12:50:38Z",
  "summary": {
    "duration_ms": 772921,
    "failed": 0,
    "skipped_gate": 1,
    "total": 7
  }
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⚠️ **Rebase** - 1 warning
  • ⚠️ bin/fm-brief.sh - branch carries 1 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (2 file(s)) into the PR:
  • 7285a95 fix: show documented decision-key placement in brief status examples

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

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • ./tests/fm-brief.test.sh
  • ./tests/fm-remote-job-orphan-reap.test.sh
  • ./tests/fm-afk-inject-herdr-e2e.test.sh
  • ./tests/fm-inactive-reconcile.test.sh
  • ./tests/fm-pr-check-security.test.sh
  • ./tests/fm-remote-reply.test.sh
  • ./tests/fm-remote-secondmate-lifecycle-e2e.test.sh
  • ./tests/fm-remote-job.test.sh
  • ./tests/fm-classify-decision-key.test.sh
  • ./tests/fm-send-resolve-key.test.sh
  • ./tests/fm-test-fixture-cleanup.test.sh
  • ./tests/fm-test-isolation-proof.test.sh
  • ./tests/fm-test-run.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Generated ship, scout, dreamer, and secondmate briefs now include
literal needs-decision and resolved lines with [key=<slug>] before
the colon, matching the documented position.
…osts

Linux remote-job start stacked supervisors when worker.pid was stale, so
heavy e2e scripts leaked process groups and missed observable waits.
Stop stray supervisors for that code root before launching another.

Tests now wait on observables instead of pid 1 or tick counts, reap
daemons by pid, skip a herdr pane that never becomes ready, and hoist
repeated PR-check fixtures.
@BohnBawerick BohnBawerick changed the title fix(tests): stop stray worker supervisors and make test suite bounded and leak-safe fix: stop stray remote worker supervisors and align brief decision keys Aug 21, 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.

1 participant