Skip to content

docs: make configuration settings easier to find and understand - #5589

Merged
kunchenguid merged 3 commits into
kunchenguid:mainfrom
tmchow:docs/configuration-readable
Sep 25, 2026
Merged

kunchenguid merged 3 commits into
kunchenguid:mainfrom
tmchow:docs/configuration-readable

Conversation

@tmchow

@tmchow tmchow commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Intent

The configuration reference mixes setup choices with detailed lifecycle rules in long paragraphs, making settings and defaults hard to find.
Reorganize it into task navigation, tables, procedures, and shorter reference sections while preserving documented behavior and existing links.

What Changed

  • Restructured docs/configuration.md: long prose paragraphs are now split into tables, bullet lists, numbered procedures, and short ### subsections under each setting. Every original ## heading and anchor is kept.
  • Added a "Find a setting" table at the top that links to the relevant reference section for each goal. The FM_HOME section now comes near the start and uses a table to separate the Firstmate repo root, the operational home (state/, data/, config/, projects/), and the projects directory.
  • Kept the documented facts, defaults, qualifiers, safety limits, identifiers, quoted text, link targets, and fenced code blocks, with sentences written one per line. This is a documentation-only change with no runtime behavior impact.

Risk Assessment

✅ Low: This change only rewrites docs/configuration.md. The three round-2 qualifier restorations were applied correctly: "genuinely" is back at lines 169 and 2026, and line 150 again says a home upgraded from max keeps Calm on rather than dropping to off. The round-1 label and qualifier fixes are also still in place. Mechanical comparison against the base found all nine fenced blocks byte-identical and every original heading, inline-code span, link target, numeric literal and quoted string still present.

Testing

This is a docs-only change with no runtime product surface, so no scenario could be driven live, and the verdict is no-surface. A comparison script run against the base-commit file found every original anchor, all 9 fenced blocks (byte-identical), every inline-code occurrence, link target, and numeric literal still present. Every configuration.md anchor reference in the repo and every in-document anchor link resolves. bin/fm-doc-audience-check.sh passed. A manual read confirmed that the code-root/FM_HOME/projects distinction is near the top and that all qualifiers from review rounds 1 and 2 were restored. No HTML render was produced because pandoc is not on PATH; the change is Markdown only, and GitHub renders it in the PR.

  • Live validation: ⚠️ no-surface - 0 of 5 scenarios driven live against the product
Scenario Result Live Evidence
A reader following an existing link such as configuration.md#fm_home from another doc lands on the right section (all original anchors kept) ⏸️ untested no Docs-only change with no runtime product surface; the anchors were checked statically against the Markdown source instead.
A reader copying a command or config example gets exactly the same fenced block content as before ⏸️ untested no Docs-only change with no runtime product surface to drive; checked by byte comparison against the base commit.
A reader opening the doc learns the difference between the Firstmate code root, FM_HOME private state, and the projects directory near the top ⏸️ untested no Docs-only change; comprehension cannot be driven live against a running product.
Adversarial: the rewrite silently drops a fact, identifier, link, number, or qualifier ⏸️ untested no Docs-only change with no runtime surface; preservation was checked statically, and meaning-level fidelity beyond tokens still needs human review.
Runtime behavior and operator settings are unchanged ⏸️ untested no No code, config, or script changed, so there is no runtime behavior to drive.
Evidence: Preservation check output (anchors, fences, code spans, links, numbers, external refs)

Source: Preservation check output (anchors, fences, code spans, links, numbers, external refs)

base headings: 40 new headings: 106 original anchors missing in new: [] fenced blocks base/new: 9 9 byte-identical: True inline-code occurrences lost: {} link targets lost: [] numeric literals lost: [] repo-wide configuration.md# refs: 15 unresolved: [] in-doc #anchor links: 16 unresolved: []

base headings: 40 new headings: 106
original anchors missing in new: []
fenced blocks base/new: 9 9 byte-identical: True
inline-code occurrences lost: {}
link targets lost: []
numeric literals lost: []
repo-wide configuration.md# refs: 15 unresolved: []
in-doc #anchor links: 16 unresolved: []
Evidence: Doc audience check

Source: Doc audience check

fm-doc-audience-check: ok surfaces=109 local_links=528 exit=0

fm-doc-audience-check: ok surfaces=109 local_links=528
exit=0
Evidence: Preservation check script

Source: Preservation check script

import re, sys, collections, subprocess, pathlib
base = open(sys.argv[1]).read(); new = open(sys.argv[2]).read()
def slug(h):
    s = h.strip().lower()
    s = re.sub(r'[^\w\- ]', '', s)
    return s.replace(' ', '-')
def headings(t):
    out=[]; infence=False
    for l in t.splitlines():
        if l.startswith('`` `'): infence = not infence; continue
        m = re.match(r'^(#{1,6})\s+(.*)$', l)
        if m and not infence: out.append(slug(m.group(2)))
    return out
def fences(t): return re.findall(r'^`` `.*?^`` `', t, re.M|re.S)
def strip_fences(t): return re.sub(r'^`` `.*?^`` `', '', t, flags=re.M|re.S)
def codes(t): return collections.Counter(re.findall(r'`([^`\n]+)`', strip_fences(t)))
def links(t): return set(re.findall(r'\]\(([^)\s]+)\)', t))
def nums(t): return set(re.findall(r'\b\d+(?:\.\d+)?\b', strip_fences(t)))
bh, nh = headings(base), headings(new)
missing_anchors = [h for h in bh if h not in nh]
print("base headings:", len(bh), "new headings:", len(nh))
print("original anchors missing in new:", missing_anchors)
bf, nf = fences(base), fences(new)
print("fenced blocks base/new:", len(bf), len(nf), "byte-identical:", bf == nf)
bc, nc = codes(base), codes(new)
lost = {k:v-nc.get(k,0) for k,v in bc.items() if nc.get(k,0) < v}
print("inline-code occurrences lost:", lost)
bl, nl = links(base), links(new)
print("link targets lost:", sorted(bl-nl))
bn, nn = nums(base), nums(new)
print("numeric literals lost:", sorted(bn-nn))
# external anchors into configuration.md
repo = pathlib.Path('.')
refs = subprocess.run(['git','grep','-ohE',r'configuration\.md#[A-Za-z0-9_-]+'],capture_output=True,text=True).stdout.split()
bad = sorted({r for r in refs if r.split('#')[1] not in nh})
print("repo-wide configuration.md# refs:", len(set(refs)), "unresolved:", bad)
# self anchors
selfrefs = set(re.findall(r'\]\(#([^)]+)\)', new))
print("in-doc #anchor links:", len(selfrefs), "unresolved:", sorted(a for a in selfrefs if a not in nh))
# sentence-per-line heuristic: prose lines with more than one sentence break
- Outcome: ⚠️ 1 warning across 1 run (53.1s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 2 issues found → auto-fixed (2) ✅
  • ⚠️ docs/configuration.md:1776 - Four of the new bold navigation labels sit above text they don't describe, which works against the change's goal of making settings easier to find. (1) docs/configuration.md:1776 "Open the Lavish artifact first" and docs/configuration.md:1781 "Retry interrupted Lavish polls" are in the "Trusted external process-event adapters" section. They label generic extension text ("The source waits outside the conversational turn…/classify…" and "Never run the registered blocking source command directly…"). The Lavish open-first and retry content they name is in a different section, "Process-to-event sources", at docs/configuration.md:1790-1797, and that content has no label. (2) docs/configuration.md:1742 "Bind on a remote secondmate" sits above "Use an absent destination for the copy…" and the FM_HOME/non-default-home sentence, which belong to the local file-signal bind above it. The remote part starts at 1747 ("For a configured remote secondmate…"). (3) docs/configuration.md:1381 "Arm unattended polling" sits above the header-fetch degraded-summary and retry sentences. The arming text starts at 1386 ("A home that wants mail polled unattended arms…"). Fix: move each label to the paragraph it names (or rename it), and add labels such as "Register a completion source" or "Classify and acknowledge results" for the extension text around 1765-1783. No facts change.
  • ℹ️ docs/configuration.md:482 - The intent requires preserving "every existing fact, default, qualifier", but a few rewrites drop or weaken a qualifier. (a) docs/configuration.md:482 changes "These five sentences are the single owner of the task-selector vocabulary" to "These rules define the task-selector vocabulary", which drops the single-owner claim. (b) docs/configuration.md:71 changes "This section is the single owner of the top-level operational-home layout; … own exact child-file fields and mutation contracts" to "This section defines … rules for changing them". AGENTS.md:53 still calls configuration.md the single owner of that layout. (c) docs/configuration.md:223 changes "the list is the intersection of what Pi reports … and what a fresh isolated branch runtime can run" to "The list includes only models that…". That now states only an upper bound and no longer says every such model is listed. (d) docs/configuration.md:1827 drops "the one loss window", so the text no longer says this crash is the only way a reply can be lost. (e) docs/configuration.md:971 drops "with judgment" from how firstmate chooses the matching dispatch rule. Each is a small wording loss, not a behavior change. Restoring the original qualifier in each spot is mechanical, but because it touches an explicit preservation constraint, confirm whether you want it restored.

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

  • ⚠️ docs/configuration.md:1776 - Four of the new bold navigation labels sit above text they don't describe, which works against the change's goal of making settings easier to find. (1) docs/configuration.md:1776 "Open the Lavish artifact first" and docs/configuration.md:1781 "Retry interrupted Lavish polls" are in the "Trusted external process-event adapters" section. They label generic extension text ("The source waits outside the conversational turn…/classify…" and "Never run the registered blocking source command directly…"). The Lavish open-first and retry content they name is in a different section, "Process-to-event sources", at docs/configuration.md:1790-1797, and that content has no label. (2) docs/configuration.md:1742 "Bind on a remote secondmate" sits above "Use an absent destination for the copy…" and the FM_HOME/non-default-home sentence, which belong to the local file-signal bind above it. The remote part starts at 1747 ("For a configured remote secondmate…"). (3) docs/configuration.md:1381 "Arm unattended polling" sits above the header-fetch degraded-summary and retry sentences. The arming text starts at 1386 ("A home that wants mail polled unattended arms…"). Fix: move each label to the paragraph it names (or rename it), and add labels such as "Register a completion source" or "Classify and acknowledge results" for the extension text around 1765-1783. No facts change.
  • ℹ️ docs/configuration.md:482 - The intent requires preserving "every existing fact, default, qualifier", but a few rewrites drop or weaken a qualifier. (a) docs/configuration.md:482 changes "These five sentences are the single owner of the task-selector vocabulary" to "These rules define the task-selector vocabulary", which drops the single-owner claim. (b) docs/configuration.md:71 changes "This section is the single owner of the top-level operational-home layout; … own exact child-file fields and mutation contracts" to "This section defines … rules for changing them". AGENTS.md:53 still calls configuration.md the single owner of that layout. (c) docs/configuration.md:223 changes "the list is the intersection of what Pi reports … and what a fresh isolated branch runtime can run" to "The list includes only models that…". That now states only an upper bound and no longer says every such model is listed. (d) docs/configuration.md:1827 drops "the one loss window", so the text no longer says this crash is the only way a reply can be lost. (e) docs/configuration.md:971 drops "with judgment" from how firstmate chooses the matching dispatch rule. Each is a small wording loss, not a behavior change. Restoring the original qualifier in each spot is mechanical, but because it touches an explicit preservation constraint, confirm whether you want it restored.
  • ℹ️ docs/configuration.md:169 - Round 1 fixed the five qualifier drops it listed but missed three others of the same kind. The user's round-1 instruction was to restore every original qualifier, as the intent's preservation rule requires. (1) docs/configuration.md:169 "Bash absorbs a no-op heartbeat before it reaches Pi." drops "genuinely" from the original "A genuinely no-op heartbeat is absorbed in bash and never reaches Pi". Only genuinely no-op heartbeats are absorbed. (2) docs/configuration.md:2026 "A new stranded claim announces again." drops "genuinely" from "a genuinely new stranded claim announces again". (3) docs/configuration.md:150 "An upgraded home keeps Calm on." drops "from it" (the legacy max value) and "rather than dropping to off". Read alone, it now seems to say any upgraded home keeps Calm on. Fix: restore "genuinely" in (1) and (2), and change (3) to "A home upgraded from max keeps Calm on rather than dropping to off." No other facts change, and each sentence stays on its own line. Every other qualifier check came out clean: all original headings and anchors, all nine fenced blocks (byte-identical), every inline-code span, link target, number, and quote, every external configuration.md#… anchor, and the four relocated or renamed labels.

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

⚠️ **Test** - 1 warning
  • ⚠️ this change has no live-validatable surface; proceed without live validation? (0 of 5 scenarios were driven live against the product); A reader following an existing link such as configuration.md#fm_home from another doc lands on the right section (all original anchors kept): Docs-only change with no runtime product surface; the anchors were checked statically against the Markdown source instead.; A reader copying a command or config example gets exactly the same fenced block content as before: Docs-only change with no runtime product surface to drive; checked by byte comparison against the base commit.; A reader opening the doc learns the difference between the Firstmate code root, FM_HOME private state, and the projects directory near the top: Docs-only change; comprehension cannot be driven live against a running product.; Adversarial: the rewrite silently drops a fact, identifier, link, number, or qualifier: Docs-only change with no runtime surface; preservation was checked statically, and meaning-level fidelity beyond tokens still needs human review.; Runtime behavior and operator settings are unchanged: No code, config, or script changed, so there is no runtime behavior to drive.
  • Live validation: ⚠️ no-surface - 0 of 5 scenarios driven live against the product
Scenario Result Live Evidence
A reader following an existing link such as configuration.md#fm_home from another doc lands on the right section (all original anchors kept) ⏸️ untested no Docs-only change with no runtime product surface; the anchors were checked statically against the Markdown source instead.
A reader copying a command or config example gets exactly the same fenced block content as before ⏸️ untested no Docs-only change with no runtime product surface to drive; checked by byte comparison against the base commit.
A reader opening the doc learns the difference between the Firstmate code root, FM_HOME private state, and the projects directory near the top ⏸️ untested no Docs-only change; comprehension cannot be driven live against a running product.
Adversarial: the rewrite silently drops a fact, identifier, link, number, or qualifier ⏸️ untested no Docs-only change with no runtime surface; preservation was checked statically, and meaning-level fidelity beyond tokens still needs human review.
Runtime behavior and operator settings are unchanged ⏸️ untested no No code, config, or script changed, so there is no runtime behavior to drive.
  • git diff --stat b42d4fa8 4c2b5e61 (confirmed that only docs/configuration.md changed)
  • python3 check_invariants.py base-configuration.md docs/configuration.md: compared anchors, fenced blocks, inline-code counts, link targets, numeric literals, repo-wide configuration.md# refs, and in-doc #anchor links
  • bin/fm-doc-audience-check.sh (ok, surfaces=109, local_links=528)
  • Manual read of the opening sections (Find a setting table, FM_HOME location table)
  • grep for restored qualifiers: single owner (lines 71, 482), intersection (223), genuinely (169, 2026), upgraded from max (149), with judgment (971), one loss window (1838)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @tmchow — really appreciate you taking the time on this.

mituso89 pushed a commit to mituso89/firstmate that referenced this pull request Sep 26, 2026
…henguid#5589)

* docs: make configuration settings easier to find and understand

* no-mistakes(review): Restore dropped qualifiers and fix misplaced config doc labels

* no-mistakes(review): Restore three dropped qualifiers in configuration reference
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…henguid#5589)

* docs: make configuration settings easier to find and understand

* no-mistakes(review): Restore dropped qualifiers and fix misplaced config doc labels

* no-mistakes(review): Restore three dropped qualifiers in configuration reference
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…henguid#5589)

* docs: make configuration settings easier to find and understand

* no-mistakes(review): Restore dropped qualifiers and fix misplaced config doc labels

* no-mistakes(review): Restore three dropped qualifiers in configuration reference
ashkonmousavi added a commit to ashkonmousavi/firstmate that referenced this pull request Sep 26, 2026
* fix(bin): report a Lavish source armed only after its listener is running (#5566)

* fix(bin): report a Lavish source armed only after its listener is running

Registration alone was treated as ready, so arm could succeed before anything was collecting from the board.

* no-mistakes(review): Guard Lavish arm launches, keep retire refusals, report live prior listener

* no-mistakes(review): Keep polling through window before reporting a still-live prior listener

* test: wait for a capture's claim to drop before the next arm

The result is stored before the runner exits, so a re-arm in that gap was meeting a live claim.

* no-mistakes(document): Record Lavish arm readiness evidence in verification doc

* no-mistakes(ci): Both failures were caused by this PR, and both are fixed with test-only edits. Lint 2 (ShellCheck SC2034): this branch removed the only use of `reply_id` (a `start "$reply_id"` call) from tests/fm-procevent.test.sh, which left the assignment at line 1450 unused. I deleted that assignment. It was the only `reply_id` in the file. ShellCheck is now clean on both test files. Behavior portable serial 4: the failing test was tests/fm-bearings-board.test.sh, in the check "registration consumed its answer before the any-origin binding existed". I reproduced it locally: the hold was still `state: queued` when the test checked it. - What must hold: the test's check that the hold is closed must run after the listener has captured the answer. - Why it broke: the test used a stand-in adapter that ran `fm-procevent.sh start` in the foreground after `arm`, so capture finished before build returned. On this branch, `arm` starts the listener itself in the background, so the real listener captures the answer and closes the hold a moment after build returns. - Fix: removed the now-redundant stand-in adapter, the copied runtime directory, and its extra environment variables. The test now runs the real build through the existing `run_board` helper and waits up to about 10s for the hold to reach `state: done`. The checks that follow are unchanged: `Resolution mode: answered` and the any-origin binding. - Other tests: this was the only test in the file that stood in for the adapter this way. The shard's other pure-contract-unit test (tests/fm-trace-context-lib.test.sh) passed unchanged. Verification: - tests/fm-bearings-board.test.sh passed 3 times in a row via bin/fm-test-run.sh, all 18 checks, about 53s per run. - tests/fm-procevent.test.sh was not rerun, because the lint fix only removed an unused assignment

* fix(bin): stop repeating unknown-wake escalations that were already delivered (#5599)

* fix(bin): acknowledge a delivered unknown-wake escalation

The same unrecognized wake was escalated again after it had already been handled, because delivery never recorded that identity.

* no-mistakes(review): Scope unknown-wake acknowledgements to one away session

* no-mistakes(review): Clear delivered digest when unknown-wake ack write fails

* no-mistakes(review): Limit unknown-wake suppression to acknowledged lines

* no-mistakes(document): List unknown-wake ack file among away-session artifacts

* fix(bin): keep a stated default-key retraction from cancelling a keyless wait (#5587)

* fix(bin): keep a stated default retraction from cancelling a keyless wait

A resolved line that names the shared default decision bucket was closing the keyless live wait that only prints as that same key. Keyless self-retraction still closes the keyless wait.

* no-mistakes(review): Keep declared waits standing past foreign-key resolved lines

* no-mistakes(review): Bound declared-wait read and share one decision-key parser

* no-mistakes(document): Document supervisors' key-aware declared-wait read

* fix(bin): terminate a remote job worker that lost ownership on TERM (#5544)

* fix(bin): terminate a remote job worker that lost ownership when it receives TERM

A serving worker whose lock directory is gone can no longer quarantine shutdown, and resuming service publishes a false ready heartbeat. Exit after stopping only that worker's own command tree, without removing a replacement owner's lock.

* no-mistakes(review): Check worker lock ownership before publishing shutdown quarantine

* no-mistakes(document): Correct worker shutdown comment on replacement-owned lock

* fix(bin): keep an ousted remote job worker off the replacement quarantine

Shutdown can lose the lock after the first ownership check and before it
writes or clears quarantine. Bind both operations to the directory object
this process still owns so a replacement's quarantine stays untouched.

* no-mistakes(review): Make ousted-worker shutdown test reliably reach quarantine clear

* no-mistakes(document): Reattach worker_shutdown doc comment to its function

* no-mistakes(ci): Fixed the failing check (Behavior portable serial 7) with a test-only change to the stall test in tests/fm-remote-job.test.sh. Product code is unchanged; no other test changed. Cause: after the decoy dies, both workers run the same check-exists, read, delete sequence on the job records. On the CI runner the replacement deleted a record between the ousted worker's check and its read. The ousted worker exited 125, and because the file runs under set -e the unguarded `wait` ended the test with 125. The exit trap then killed the replacement, which produced the "Killed" line. Reproduction: a temporary 0.3 s delay between the check and the read, applied to the ousted worker only, made the committed test fail exactly as in CI (exit 125 and the "Killed" line). The new test passed with the same delay. The delay is reverted, along with a similar debug hook that the timed-out attempt had left in bin/fm-remote-job-worker.sh. Test changes: - The replacement is frozen (and confirmed stopped) before the decoy is killed and resumed only after the ousted worker exits, so only one worker touches the job records at a time. - The ousted worker is stopped only once its quarantine exists and its lane is reaped, which places it inside its stop loop. - Every fixed poll loop is now a wait on a named condition with a 30 s deadline and an explicit failure message. Exit detection also handles zombies. - The exit trap kills and waits for the decoy and both workers on every path. - A non-zero exit from the ousted worker now fails with its exit code and stderr instead of silently ending the file. The test still proves that the resumed ousted worker exits 0 and leaves the replacement's lock, quarantine contents and quarantine inode unchanged. Verification: the full test file passed four times on its own and three times under nice -n 10 with four busy-loop CPU hogs; bin/fm-lint.sh passes. Changes are not committed

* no-mistakes(ci): I fixed the failing check (Behavior portable serial 7) by changing only the stall test in tests/fm-remote-job.test.sh. Product code is unchanged. **What failed:** "an ousted worker in shutdown leaves the replacement quarantine untouched" failed on CI with the ousted worker exiting 125 ("could not stop the active command tree"). **Why:** during shutdown, the worker retries the still-running decoy command group a fixed 100 times, 0.01 s apart, then gives up and exits 125. The test tried to freeze the worker partway through those retries by sending SIGSTOP from outside. On a slow runner the retries ran out before the stop arrived, so the worker had already given up. The invariant is that the test must hold the ousted worker inside that retry loop until the replacement owns the lock. That was the only place the test depended on timing. The other waits already watch for a named state change with a 30 s deadline. **Fix:** - The ousted worker now starts with a small `sleep` wrapper at the front of its PATH, and the SIGSTOP race is gone. - The wrapper only holds a `sleep` called directly by that worker's own process (it checks its parent pid against a hold file) while its quarantine file exists. - The only such `sleep` is the first retry in the shutdown stop loop, so the worker waits there as long as needed. - The wrapper writes a marker when it starts holding. The test waits for that marker, then hands the lock to the replacement, freezes the replacement, and kills the decoy. - The test releases the worker by deleting the hold file. Deleting the whole temp directory also releases it, so a failed run cannot leave the wrapper looping. - A process leak: the test overwrites the job's command-group record with the decoy, so no worker ever stopped the job's real command. `fm-hold-job.sh` and its `sleep 30` stayed running for up to 30 s after the test. The test now records that group before overwriting it and kills it at the end of the test and in the exit cleanup. - The test still asserts the same things: the ousted worker exits 0, and the replacement's lock, quarantine contents and quarantine inode are unchanged. **Verification:** - The full file passed twice on its own, twice under `nice -n 10` with six busy-loop CPU hogs, and twice more after the leak fix. - `pgrep` found no leftover processes afterwards. - With the worker from just before the fix commit (cf45cb6^), the test still fails with "the ousted worker wrote or cleared the replacement quarantine during shutdown", so it still proves the fix. - `bin/fm-lint.sh` passes. - I did not reproduce the CI failure locally. The cause comes from the fixed retry limit and the CI error message. The changes are not committed

* no-mistakes(ci): I changed only the stall test ("an ousted worker in shutdown leaves the replacement quarantine untouched") in tests/fm-remote-job.test.sh. Product code is unchanged, and so is every other test. **Invariant:** the pid written to the job's group record must be a process-group leader whose group dies when that one process is killed. Otherwise the worker's bounded stop loop never sees the group die, gives up, and exits 125 ("could not stop the active command tree") before it reaches the lost-ownership exit. The decoy is the only place in this test that depends on this. **Fix:** - The decoy used to be `set -m; sleep 30 &`. It now starts as `perl -MPOSIX=setsid -e 'setsid() >= 0 or exit 1; exec @ARGV' sleep 30 &`, which gets its own session and group without shell job control. tests/fm-procevent.test.sh already uses the same idiom. - The test now waits, with the file's usual 30 s deadline and a named failure, until `ps -o pgid=` of the decoy equals its pid before writing it into the group record. This way the worker can never read the record before `setsid` has run. - The existing steps are unchanged: the test kills the decoy, reaps it with `wait` before releasing the hold file, and the exit trap still kills and reaps the decoy and both workers. - The assertions are unchanged: the ousted worker exits 0, and the replacement's lock pid, quarantine text and quarantine inode stay the same. **Cleanup:** I reverted a debug `printf` hook that the timed-out previous attempt had left in bin/fm-remote-job-worker.sh, and deleted its untracked `.tmp-repro/` directory. Neither was committed. **Verification:** - The full tests/fm-remote-job.test.sh passed twice normally and once under `setsid -w` with stdin from /dev/null (no controlling terminal). - `bin/fm-lint.sh` passes. - No leftover `sleep 30` processes afterwards. **Not reproduced:** I could not reproduce the CI failure locally. On this host `set -m` made the decoy its own group leader even without a controlling terminal, so the cause on the runner is not confirmed. The change removes the test's reliance on shell job control, as the user asked. Changes are not committed

* no-mistakes(ci): I changed only the stall test ("an ousted worker in shutdown leaves the replacement quarantine untouched") in tests/fm-remote-job.test.sh. Product code is unchanged, and so is every other test. **Invariant:** the group record the ousted worker checks in its stop loop must stay the job's own command group, and the test must stop that group before it releases the hold. Otherwise the bounded retry keeps seeing a live group, gives up, and exits 125 ("could not stop the active command tree") before it reaches the lost-ownership exit. The test overwrote this record in one place (the decoy) and stopped the group in one place (killing the decoy); both are changed. **Fix:** - I removed the setsid decoy and the overwrite of `.claim/group`. The record keeps the job's real command group, which the test still saves as `STALL_JOB_GROUP`. - The two-line `group_start` stays. It is still needed: without it the worker kills the real group on its first pass, before the replacement takes over, so the hold would never matter. - The `sleep` wrapper that holds the worker at its first stop-loop retry is unchanged. - After the replacement owns the lock, its quarantine is planted and it is frozen, the test runs `kill -KILL -- -$STALL_JOB_GROUP`. It then waits, with the file's usual 30 s deadline and a named failure, until `kill -0` on the group fails. Only then d