Skip to content

fix: report an incompatible remote tasks-axi as OUTDATED - #8743

Merged
kunchenguid merged 1 commit into
kunchenguid:mainfrom
ironerumi:fm/up-fm-8740-pr
Nov 26, 2026
Merged

kunchenguid merged 1 commit into
kunchenguid:mainfrom
ironerumi:fm/up-fm-8740-pr

Conversation

@ironerumi

Copy link
Copy Markdown
Contributor

This is the remote-doctor counterpart of #5688. An installed tasks-axi that fails the compatibility probe is now reported as OUTDATED (incompatible) rather than MISSING. It still fails the required-tool check, and the worker-side parse accepts both prefixes. The entrypoint's pinned doctor digest is updated, and tests/fm-remote-doctor.test.sh covers the absent and incompatible cases separately.

Intent

Open an upstream PR to kunchenguid/firstmate that fixes https://github.com/kunchenguid/firstmate/issues/8740 (remote doctor reports an installed but incompatible tasks-axi as MISSING instead of OUTDATED). The captain approved this contribution.

Issue #8740's substance: when tasks-axi is on PATH but fails fm_tasks_axi_compatible, bin/fm-remote-doctor.sh prints required tasks-axi=MISSING (incompatible), telling an operator on a remote host to install a tool that is already installed and only needs an upgrade. The ask is to print required tasks-axi=OUTDATED (incompatible) for the installed-but-incompatible case, keep counting it as a required-tool failure (so the worker-side probe parse accepts OUTDATED as well as MISSING), and document the value in the header's output contract.

Risk Assessment

✅ Low: The bounded status change preserves required-tool failure handling across direct and worker probes, with behavioral regression coverage and a matching bootstrap digest.

Testing

Executed direct and real-worker doctor scenarios in an isolated account, reproduced the baseline bug, and retained CLI evidence for all classifications. All targeted assertions passed; unrelated Rex readiness gaps were intentional. Worker processes and fixtures were cleaned up; no full suite, lint, or delivery phases ran.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Local doctor reports an installed below-floor tasks-axi as OUTDATED and retains its required-tool failure ✅ pass live baseline-old.txt; direct-old.txt; worker-old.txt
Local doctor rejects a high-version tasks-axi missing required capabilities, and worker accepts OUTDATED as a valid failure ✅ pass live direct-feature-missing.txt; worker-feature-missing.txt
Removing tasks-axi preserves MISSING and a valid failing worker probe ✅ pass live direct-absent.txt; worker-absent.txt
Compatible installed tasks-axi reports its executable path and is excluded from required-tool failures ✅ pass live direct-compatible.txt; worker-compatible.txt
Evidence: Installed incompatible tool through real worker

Source: Installed incompatible tool through real worker

$ /bin/bash bin/fm-remote-doctor.sh --backend rex
exit=1
STDOUT:
mode=check
path={run-worktree}/bin:{run-worktree}/.test-8740/home/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint=yes
platform=linux
required git={run-worktree}/.test-8740/home/.local/bin/git
required jq={run-worktree}/.test-8740/home/.local/bin/jq
required rex=MISSING
required tasks-axi=OUTDATED (incompatible)
required treehouse={run-worktree}/.test-8740/home/.local/bin/treehouse
required harness=claude:{run-worktree}/.test-8740/home/.local/bin/claude
optional tmux=absent
optional no-mistakes=absent
optional gh=absent
check rex=human: the rex CLI does not resolve on the remote runtime PATH
check gui-session=skip: no Aqua login session applies on linux
check remote-job-worker=ok: the Linux remote job worker is running
check remote-job-worker-loaded=skip: Aqua launch agents do not apply on linux
check remote-job-probe=ok: the remote job worker completed the required-tool probe
check rex-server=human: rex server status cannot be read without both rex and jq on the runtime PATH
check entrypoint-link=fixable: no entrypoint symlink at {run-worktree}/.test-8740/home/.local/bin/fm-remote-entrypoint.sh
action: rex: install Rex on that account, or add a ~/.local/bin wrapper for it; the remote second mate's rex backend needs this CLI
action: rex-server: install the missing tool reported above, then rerun this command
action: entrypoint-link: rerun this command with --fix to create it

STDERR:
error: required tools do not resolve on the remote runtime PATH: rex tasks-axi
fix: install each one where it resolves on the path reported above, or put a wrapper script for it in {run-worktree}/.test-8740/home/.local/bin, which is always on that PATH.
fix: tools in an unselected nvm version or outside the discovered asdf or mise paths need an absolute wrapper; see docs/remote-secondmates.md for the wrapper recipe.
error: this host is not ready for a remote second mate; unresolved: rex rex-server entrypoint-link
Evidence: Feature-incompatible tool through real worker

Source: Feature-incompatible tool through real worker

$ /bin/bash bin/fm-remote-doctor.sh --backend rex
exit=1
STDOUT:
mode=check
path={run-worktree}/bin:{run-worktree}/.test-8740/home/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint=yes
platform=linux
required git={run-worktree}/.test-8740/home/.local/bin/git
required jq={run-worktree}/.test-8740/home/.local/bin/jq
required rex=MISSING
required tasks-axi=OUTDATED (incompatible)
required treehouse={run-worktree}/.test-8740/home/.local/bin/treehouse
required harness=claude:{run-worktree}/.test-8740/home/.local/bin/claude
optional tmux=absent
optional no-mistakes=absent
optional gh=absent
check rex=human: the rex CLI does not resolve on the remote runtime PATH
check gui-session=skip: no Aqua login session applies on linux
check remote-job-worker=ok: the Linux remote job worker is running
check remote-job-worker-loaded=skip: Aqua launch agents do not apply on linux
check remote-job-probe=ok: the remote job worker completed the required-tool probe
check rex-server=human: rex server status cannot be read without both rex and jq on the runtime PATH
check entrypoint-link=fixable: no entrypoint symlink at {run-worktree}/.test-8740/home/.local/bin/fm-remote-entrypoint.sh
action: rex: install Rex on that account, or add a ~/.local/bin wrapper for it; the remote second mate's rex backend needs this CLI
action: rex-server: install the missing tool reported above, then rerun this command
action: entrypoint-link: rerun this command with --fix to create it

STDERR:
error: required tools do not resolve on the remote runtime PATH: rex tasks-axi
fix: install each one where it resolves on the path reported above, or put a wrapper script for it in {run-worktree}/.test-8740/home/.local/bin, which is always on that PATH.
fix: tools in an unselected nvm version or outside the discovered asdf or mise paths need an absolute wrapper; see docs/remote-secondmates.md for the wrapper recipe.
error: this host is not ready for a remote second mate; unresolved: rex rex-server entrypoint-link
Evidence: Absent tool remains MISSING

Source: Absent tool remains MISSING

$ /bin/bash bin/fm-remote-doctor.sh --backend rex
exit=1
STDOUT:
mode=check
path={run-worktree}/bin:{run-worktree}/.test-8740/home/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint=yes
platform=linux
required git={run-worktree}/.test-8740/home/.local/bin/git
required jq={run-worktree}/.test-8740/home/.local/bin/jq
required rex=MISSING
required tasks-axi=MISSING
required treehouse={run-worktree}/.test-8740/home/.local/bin/treehouse
required harness=claude:{run-worktree}/.test-8740/home/.local/bin/claude
optional tmux=absent
optional no-mistakes=absent
optional gh=absent
check rex=human: the rex CLI does not resolve on the remote runtime PATH
check gui-session=skip: no Aqua login session applies on linux
check remote-job-worker=ok: the Linux remote job worker is running
check remote-job-worker-loaded=skip: Aqua launch agents do not apply on linux
check remote-job-probe=ok: the remote job worker completed the required-tool probe
check rex-server=human: rex server status cannot be read without both rex and jq on the runtime PATH
check entrypoint-link=fixable: no entrypoint symlink at {run-worktree}/.test-8740/home/.local/bin/fm-remote-entrypoint.sh
action: rex: install Rex on that account, or add a ~/.local/bin wrapper for it; the remote second mate's rex backend needs this CLI
action: rex-server: install the missing tool reported above, then rerun this command
action: entrypoint-link: rerun this command with --fix to create it

STDERR:
error: required tools do not resolve on the remote runtime PATH: rex tasks-axi
fix: install each one where it resolves on the path reported above, or put a wrapper script for it in {run-worktree}/.test-8740/home/.local/bin, which is always on that PATH.
fix: tools in an unselected nvm version or outside the discovered asdf or mise paths need an absolute wrapper; see docs/remote-secondmates.md for the wrapper recipe.
error: this host is not ready for a remote second mate; unresolved: rex rex-server entrypoint-link
Evidence: Compatible installed tool resolves normally

Source: Compatible installed tool resolves normally

$ /bin/bash bin/fm-remote-doctor.sh --backend rex
exit=1
STDOUT:
mode=check
path={run-worktree}/bin:{run-worktree}/.test-8740/home/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint=yes
platform=linux
required git={run-worktree}/.test-8740/home/.local/bin/git
required jq={run-worktree}/.test-8740/home/.local/bin/jq
required rex=MISSING
required tasks-axi={run-worktree}/.test-8740/home/.local/bin/tasks-axi
required treehouse={run-worktree}/.test-8740/home/.local/bin/treehouse
required harness=claude:{run-worktree}/.test-8740/home/.local/bin/claude
optional tmux=absent
optional no-mistakes=absent
optional gh=absent
check rex=human: the rex CLI does not resolve on the remote runtime PATH
check gui-session=skip: no Aqua login session applies on linux
check remote-job-worker=ok: the Linux remote job worker is running
check remote-job-worker-loaded=skip: Aqua launch agents do not apply on linux
check remote-job-probe=ok: the remote job worker completed the required-tool probe
check rex-server=human: rex server status cannot be read without both rex and jq on the runtime PATH
check entrypoint-link=fixable: no entrypoint symlink at {run-worktree}/.test-8740/home/.local/bin/fm-remote-entrypoint.sh
action: rex: install Rex on that account, or add a ~/.local/bin wrapper for it; the remote second mate's rex backend needs this CLI
action: rex-server: install the missing tool reported above, then rerun this command
action: entrypoint-link: rerun this command with --fix to create it

STDERR:
error: required tools do not resolve on the remote runtime PATH: rex
fix: install each one where it resolves on the path reported above, or put a wrapper script for it in {run-worktree}/.test-8740/home/.local/bin, which is always on that PATH.
fix: tools in an unselected nvm version or outside the discovered asdf or mise paths need an absolute wrapper; see docs/remote-secondmates.md for the wrapper recipe.
error: this host is not ready for a remote second mate; unresolved: rex rex-server entrypoint-link
Evidence: Base revision reproduces reported misclassification

Source: Base revision reproduces reported misclassification

$ /bin/bash {run-worktree}/.test-8740/base/fm-remote-doctor.sh --worker-tool-probe --backend rex
exit=1
STDOUT:
required git={run-worktree}/.test-8740/home/.local/bin/git
required jq={run-worktree}/.test-8740/home/.local/bin/jq
required rex=MISSING
required tasks-axi=MISSING (incompatible)
required treehouse={run-worktree}/.test-8740/home/.local/bin/treehouse
required harness=claude:{run-worktree}/.test-8740/home/.local/bin/claude

STDERR:
Evidence: Reproducible isolated scenario driver

Source: Reproducible isolated scenario driver

import os, pathlib, shutil, subprocess, time, signal
ROOT=pathlib.Path.cwd()
E=pathlib.Path('~/.no-mistakes/evidence/01M895V17T89T8QKFTRYFXV4EJ')
LAB=ROOT/'.test-8740'
LAB.mkdir()
H=LAB/'home'; B=H/'.local/bin'; B.mkdir(parents=True)
P=LAB/'project'; P.mkdir()
real_tasks=shutil.which('tasks-axi')
for tool in ['git','jq','node']:
    (B/tool).symlink_to(shutil.which(tool))
# Only command discovery is used for these two unrelated requirements.
for tool in ['treehouse','claude']:
    (B/tool).symlink_to('/usr/bin/true')
baseenv={k:v for k,v in os.environ.items() if not k.startswith(('FM_', 'TASKS_AXI_'))}
baseenv.update(HOME=str(H), FM_HOME=str(P), FM_ROOT_OVERRIDE=str(ROOT), PATH=f'{ROOT}/bin:{B}:/usr/bin:/bin:/usr/sbin:/sbin', FM_REMOTE_JOB_PLATFORM_OVERRIDE='linux', FM_REMOTE_JOB_TIMEOUT='20', FM_REMOTE_JOB_QUEUE_TIMEOUT='20', FM_REMOTE_JOB_WAIT_GRACE='3')
worker=None
logs=[]
def run(label, args, env=baseenv, expect=1):
    r=subprocess.run(args,env=env,cwd=ROOT,text=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE,timeout=75)
    text=f'$ {" ".join(map(str,args))}\nexit={r.returncode}\nSTDOUT:\n{r.stdout}\nSTDERR:\n{r.stderr}'
    (E/f'{label}.txt').write_text(text)
    logs.append(f'{label}: exit={r.returncode}')
    assert r.returncode==expect, text
    return r

def install(mode):
    t=B/'tasks-axi'
    if t.exists() or t.is_symlink(): t.unlink()
    if mode=='absent': return
    if mode=='compatible': t.symlink_to(real_tasks); return
    version='0.0.1' if mode=='old' else '99.0.0'
    t.write_text('#!/bin/bash\nif [ "${1:-}" = --version ]; then printf "'+version+'\\n"; fi\n')
    t.chmod(0o755)

try:
    # The real worker, not a replacement queue or mocked parser.
    with (E/'worker.txt').open('w') as wlog:
        worker=subprocess.Popen(['/bin/bash',str(ROOT/'bin/fm-remote-job-worker.sh'),'--serve'],env=baseenv,stdout=wlog,stderr=wlog,start_new_session=True)
        ready=H/'.firstmate/remote-job/worker.ready'
        for _ in range(200):
            if ready.exists(): break
            if worker.poll() is not None: raise RuntimeError('worker exited')
            time.sleep(.1)
        else: raise RuntimeError('worker not ready')
        for mode in ['old','feature-missing','absent','compatible']:
            install(mode)
            expected='MISSING' if mode=='absent' else str(B/'tasks-axi') if mode=='compatible' else 'OUTDATED (incompatible)'
            directenv=dict(baseenv,FM_REMOTE_JOB_ACTIVE='1')
            r=run('direct-'+mode,['/bin/bash','bin/fm-remote-doctor.sh','--worker-tool-probe','--backend','rex'],directenv)
            assert f'required tasks-axi={expected}\n' in r.stdout, r.stdout
            # rex is deliberately absent: no connection to a shared server is possible.
            assert 'required rex=MISSING\n' in r.stdout, r.stdout
            r=run('worker-'+mode,['/bin/bash','bin/fm-remote-doctor.sh','--backend','rex'])
            assert f'required tasks-axi={expected}\n' in r.stdout, r.stdout
            assert 'check remote-job-probe=ok: the remote job worker completed the required-tool probe' in r.stdout, r.stdout
            if mode!='compatible':
                assert 'tasks-axi' in r.stderr.split('required tools do not resolve on the remote runtime PATH: ')[1].splitlines()[0], r.stderr
            else:
                assert 'tasks-axi' not in r.stderr.split('required tools do not resolve on the remote runtime PATH: ')[1].splitlines()[0], r.stderr
        # Reproduce issue #8740 through the base revision's executable interface.
        D=LAB/'base'; D.mkdir()
        for lib in (ROOT/'bin').glob('*-lib.sh'): (D/lib.name).symlink_to(lib)
        baseline=D/'fm-remote-doctor.sh'
        baseline.write_bytes(subprocess.check_output(['git','show','2f000eb4301c2d733bef163621e9ac3d740f21cf:bin/fm-remote-doctor.sh']))
        install('old')
        r=run('baseline-old',['/bin/bash',str(baseline),'--worker-tool-probe','--backend','rex'],dict(baseenv,FM_REMOTE_JOB_ACTIVE='1'))
        assert 'required tasks-axi=MISSING (incompatible)\n' in r.stdout
        (E/'results.txt').write_text('\n'.join(logs)+'\nAll output and worker acceptance assertions passed. Oracle: issue #8740 requires OUTDATED for installed incompatible tools, MISSING for absent tools, and continued required-tool failure. Rex intentionally absent; unrelated readiness gaps are expected. Synthetic old/feature-stripped tasks-axi boundary executables; real doctor, compatibility library, queue, worker, and parser. Compatible case uses machine-installed tasks-axi with isolated HOME.\n')
finally:
    if worker and worker.poll() is None:
        os.killpg(worker.pid,signal.SIGTERM)
        try: worker.wait(timeout=12)
        except subprocess.TimeoutExpired:
            os.killpg(worker.pid,signal.SIGKILL); worker.wait()
    # Stop any remaining descendants in the disposable worker's private process group.
    if worker:
        try: os.killpg(worker.pid,signal.SIGKILL)
        except ProcessLookupError: pass
    shutil.rmtree(LAB)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Local doctor reports an installed below-floor tasks-axi as OUTDATED and retains its required-tool failure ✅ pass live baseline-old.txt; direct-old.txt; worker-old.txt
Local doctor rejects a high-version tasks-axi missing required capabilities, and worker accepts OUTDATED as a valid failure ✅ pass live direct-feature-missing.txt; worker-feature-missing.txt
Removing tasks-axi preserves MISSING and a valid failing worker probe ✅ pass live direct-absent.txt; worker-absent.txt
Compatible installed tasks-axi reports its executable path and is excluded from required-tool failures ✅ pass live direct-compatible.txt; worker-compatible.txt
  • python3 ~/.no-mistakes/evidence/01M895V17T89T8QKFTRYFXV4EJ/drive-8740.py
  • Real fm-remote-job-worker.sh --serve with disposable account and queued doctor probes
  • fm-remote-doctor.sh --worker-tool-probe --backend rex and fm-remote-doctor.sh --backend rex for old, feature-incompatible, absent, and compatible tasks-axi
  • Base revision doctor executed against the same old-version input
  • Inspected retained CLI transcripts; confirmed disposable worker processes stopped and worktree fixtures removed
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Issues

Closes #8740

bin/fm-remote-doctor.sh reported an installed but incompatible tasks-axi as
`required tasks-axi=MISSING (incompatible)`, telling the operator to install a
tool that is already present. It now reports `OUTDATED (incompatible)` while
an absent tasks-axi stays `MISSING`; both still fail readiness and name
tasks-axi among the required-tool gaps, and the worker-probe parser accepts
an OUTDATED result instead of rejecting the probe as invalid.

The entrypoint's pinned DOCTOR_SHA256 follows the new doctor bytes.

Fixes kunchenguid#8740
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @ironerumi. This is the remote-doctor counterpart to the local OUTDATED wording, and it closes #8740.

Where it stands on head 66297635: the no-mistakes attestation binds this head with every step completed, and live validation passed 4 of 4, through both the direct doctor and a real worker probe. Quick checks pass (coverage guard and repo invariants, CI run 45601646948).

Diff review: safe. I read the whole diff. An installed tasks-axi that fails the compatibility probe now prints required tasks-axi=OUTDATED (incompatible) and is still counted as a required-tool failure. The worker-side parse accepts OUTDATED* as well as MISSING*, so a worker result can't slip through as "ready". An absent tasks-axi still reports MISSING. I checked the integrity pin separately: the new DOCTOR_SHA256 (42fd0076…) matches the SHA-256 of bin/fm-remote-doctor.sh at this head, and the old pin matches main's current file. No other script parses that line. There are no workflow, network, or credential changes.

Contract class: restore. docs/configuration.md already says a present but incompatible tasks-axi reports OUTDATED, not MISSING. The remote doctor now says the same, and readiness still fails the same way.

VISION, rule by rule: One captain, one interface: aligns (an operator is no longer told to install a tool that is already there). Authority is explicit: n/a. Scripts own the mechanics: aligns. A restart is a non-event: n/a. Delegation with a spine: aligns (the readiness gate is unchanged). The fleet outlives any vendor: aligns (remote hosts). Scope: aligns.

I'm adding full-ci now. It's the last gate. If the full suite passes on this head, this gets merged. Nothing is needed from you.

@kunchenguid kunchenguid added the full-ci Maintainer go-ahead: run the full CI suite on this outside pull request label Nov 26, 2026
@kunchenguid
kunchenguid merged commit 351432a into kunchenguid:main Nov 26, 2026
43 of 44 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

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

Full suite passed on head 66297635 (run 45775227055) and every other gate held, so this landed as squash 351432a3 and closes #8740.

rub-a-dub-dub added a commit to rub-a-dub-dub/firstmate that referenced this pull request Nov 27, 2026
* ci: pack every job to ~15 min from measured timings, warn at 20 min, faster lint (kunchenguid#8431)

* Port of kunchenguid#7390: per-secondmate Treehouse pool outside the home (kunchenguid#8718)

* fix(bin): spawn a secondmate's ships from a pool of its own clone

Treehouse names a pool from the repository basename and origin URL alone, so a
secondmate home's standalone clone of a project resolved to the same default
pool as the root home's clone, whose slots are worktrees of the root clone.
fm-spawn then stopped at Claude trust registration with "not a worktree of
project".

The root home keeps Treehouse's default pool unchanged. Every other local home
now passes `treehouse --root <home state>/treehouse get`, so its slots are
worktrees of its own clone; a remote home is the root of its own machine and
keeps the default. The worktree-of-project checks are untouched.

* fix(bin): require treehouse --root support at bootstrap

A local secondmate spawn now types `treehouse --root <dir> get`, and --root
arrived in treehouse 2.2.0 while --lease dates from 1.8.0, so a treehouse that
passed the lease-only gate could still lack it. Bootstrap now reports such an
install as an upgrade request.

* no-mistakes(test): Teach secondmate-pool test fake tmux to list windows

* no-mistakes(document): Raise CI Treehouse pin to 2.3.0 for --root

* test(spawn): cover a local secondmate's Herdr lease from its own pool

* fix(bin): keep secondmate Treehouse pools outside the home

Root a local secondmate's pool at
${TREEHOUSE_ROOT:-$HOME/.treehouse}/fm-secondmate/<home-id> so a slot's
ancestors never include that home's CLAUDE.md or AGENTS.md.

Co-authored-by: Kun Chen <[email protected]>

* fix(bin): refuse in-home Treehouse roots and drop secondmate pools on teardown

Review-2 corrections on the outside-home pool move: ignore a relative
TREEHOUSE_ROOT, refuse a root under the home, skip fm-secondmate pools in
the duplicate-clone check, drop the unused state-dir parameter, and remove
a secondmate's per-home pool when the home is removed.

Co-authored-by: Kun Chen <[email protected]>

---------

Co-authored-by: Hamish Gray <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Kun Chen <[email protected]>

* Raise Treehouse pin to 3.1.8 and floor to 3.0.1 (kunchenguid#8733)

* fix(bin): treat a watcher beacon stamped ahead of the clock as fresh (kunchenguid#8720)

* fix(guard): treat a beacon stamped ahead of the clock as fresh

fm_watcher_supervision_verdict ran a negative beacon age through its digit
test, so a beacon one or two seconds ahead of the guard's clock read left the
watcher looking down and printed the full banner. Clamp a negative age to 0
before the test, matching fm_watcher_healthy.

* no-mistakes(document): document future-stamped beacon guard coverage

* feat: follow captain-named PRs with direct outcome lines (kunchenguid#8598)

* feat: follow requested PRs without model turns

* no-mistakes(review): announce only new PR conditions; bound poll pass

* no-mistakes(review): validate check timeout; always read one follow

* no-mistakes(test): load private Calm mod copy in live follow test

* no-mistakes(document): index PR follow in script, layout and Calm docs

* fix: expose PR follow guidance only after opt-in

* no-mistakes(document): note opt-in follow line in session-start header

* no-mistakes(review): prove Pi follow surface by lock owner alone

* no-mistakes(review): accept only published follow surface values

* fix: tolerate missing Pi session start context

* no-mistakes(review): keep Calm replay and shown cursor in one sequence

* feat(bin): add opt-in answer words for captain-hold answers (kunchenguid#8161)

* Preserve selected captain answers

* no-mistakes(review): Guard option answers and keep one selected line

* no-mistakes(review): Say when the selected-answer line is absent

* no-mistakes(document): Document option-word guard and selected answer

* no-mistakes(ci): Fixed both Greptile findings in bin/fm-captain-hold.sh and extended tests/fm-captain-hold-lifecycle.test.sh. The timed-out prior agent had left uncommitted edits in this worktree covering both findings; I reviewed them, kept them, simplified the marker matching to one pattern set, and aligned the help text. ci-2 (spaces bypass the option guard). Invariant: an answer that is only an option selection never closes a call without its displayed words, regardless of surrounding blanks. is_option_selection now trims leading and trailing whitespace before matching, so both intake points (load_decision for direct `answer`, and the keyed `answers` row loop) reject `A ` and ` b`. The keyed label check uses a new is_blank helper, so a whitespace-only label counts as missing. The original answer and label text are still what gets stored. Help text for `answer` and `answers` now says surrounding blanks are ignored and a blank label skips the row. Tests: shapes `A ` and ` b` added to the direct-answer refusal loop and the keyed-answer skip loop, plus a keyed row `A` with label ` ` asserting the `skipped:` message and `held: yes`. ci-3 (first-line answers missed). Invariant: an `Answer as shown to the captain:` marker wins over `Answer:` wherever either appears, including on the first line. resolution_block now prefixes the decision text with one newline and matches `\nAnswer as shown to the captain: ` and `\nAnswer: ` against that prefixed text, so a first-line marker is found by the same pattern as any later line, and the displayed-answer arm is checked first. Multi-line text with no marker still writes no Selected answer line, and single-line free text is still selected whole. Tests: a decision file starting with `Answer: Off until checks pass.` and one starting with `Answer as shown to the captain: ...` followed by `Answer: A`, both asserting `Selected answer: Off until checks pass.`. Verification: shellcheck -x passes on both files. A direct harness sourcing is_blank, is_option_selection, and resolution_block confirmed every reported sequence. bin/fm-test-run.sh tests/fm-captain-hold-lifecycle.test.sh ran the whole suite: every test passed up to the final one, test_archived_answer_in_a_user_configured_archive_satisfies_the_gate, which failed with "compatible tasks-axi is required". That test redirects HOME, and on this host tasks-axi is a node script behind a mise shim that refuses to run under a redirected HOME (mise "config not trusted" error, reproduced with HOME=tmpdir tasks-axi --version). It is a host environment issue, not caused by this change. Rerunning test_answer_records_and_closes, test_option_answers_keep_their_displayed_words, and both archive tests with /home/firstmate/.local/share/mise/installs/node/22.23.1/bin ahead on PATH passed all four. Changes are confined to bin/fm-captain-hold.sh and tests/fm-captain-hold-lifecycle.test.sh; no full-ci label was requested or added

* no-mistakes(review): Ignore blank answer labels and drop skill step 8

* no-mistakes(document): Document blank-label handling in keyed answers

* no-mistakes(ci): I added the missing interview example to `.agents/skills/captain-hold-lifecycle/SKILL.md`, under step 5 of the operating sequence. The Greptile Review finding ci-1 was correct: the step described the interview in prose but showed no concrete call. Invariant: the skill must show one concrete interview that registers a call, presents a keyed question, feeds the answer, and verifies closure. Step 5 is the only place in the changed area that describes the interview, so there are no sibling sites. The example uses task id `sample-start-state` and the question `Should the feature start enabled? A: Off until checks pass. B: On now.`. It shows three commands: `bin/fm-captain-hold.sh hold` to register the call, a `printf 'sample-start-state\tA\tOff until checks pass.\n'` row piped into `bin/fm-captain-hold.sh answers --source "captain interview"`, and `tasks-axi show sample-start-state --full`. A closing sentence says the last command must print `state: done` and `Selected answer: Off until checks pass.`. I took the command shapes and expected output from the existing test `test_option_answers_keep_their_displayed_words` in `tests/fm-captain-hold-lifecycle.test.sh` and from the usage header of `bin/fm-captain-hold.sh`. The example omits `--repo` because `hold` defaults a new task's repo to `firstmate`. The change is 11 added lines in that one file. I changed no code and no tests. Not tested: I did not run the example commands or any test suite, because the driver instructions for this round say it is documentation-only and to run no tests. The commit named in the driver instructions (38e0f30) touches only `bin/fm-captain-hold.sh` and the test file, so it took no example away from the skill

* fix: make answer-word enforcement opt-in

* no-mistakes(review): List hold-answer-words in home layout inventory

* fix: publish extension packages on macOS before making them read-only (kunchenguid#8744)

installPackage made the staged package root 0555 and then renamed it into
the content-addressed store. macOS rename(2) refuses to move a directory its
owner cannot write, so every extension package install failed with EACCES.
Keep the staged root owner-writable for the rename, then set the installed
root to 0555; installed-package validation is unchanged.

tests/fm-extension-binding.test.sh restores owner write before moving an
installed package aside and restores 0555 when moving it back.

Fixes kunchenguid#8739.

* fix: report an incompatible remote tasks-axi as OUTDATED (kunchenguid#8743)

bin/fm-remote-doctor.sh reported an installed but incompatible tasks-axi as
`required tasks-axi=MISSING (incompatible)`, telling the operator to install a
tool that is already present. It now reports `OUTDATED (incompatible)` while
an absent tasks-axi stays `MISSING`; both still fail readiness and name
tasks-axi among the required-tool gaps, and the worker-probe parser accepts
an OUTDATED result instead of rejecting the probe as invalid.

The entrypoint's pinned DOCTOR_SHA256 follows the new doctor bytes.

Fixes kunchenguid#8740

* feat(bin): add opt-in reports to the PR health monitor (kunchenguid#8773)

* feat(bin): add opt-in reports to the PR health monitor

Each new report needs its own config file and stays off until that file exists.
A failing check, required or not, wakes only after a second pass still sees it.
Approved and green never starts a merge.
A merged or closed pull request names the account once and is not read again.
A change request on an older commit waits on the reviewer.

* no-mistakes(review): Baseline already-final PRs silently when final report is on

* no-mistakes(review): Gate final report on open_seen marker

* no-mistakes(review): Drop open_seen on flag-off reads

* no-mistakes(review): Clear open_seen on each flag-off poll

* fix(lock): never record an omp daemon worker as the session (kunchenguid#8731)

omp's daemon broker (omp __omp_worker_daemon_broker) runs every bash call made with name, carries the bare process name omp, and is shared by every omp in one project directory, so it outlives sessions and its parent is whichever omp started it. A named bin/fm-session-start.sh call recorded the broker in state/.lock, which then pinned the home's lock: every later session saw another live firstmate session holding it and supervision never started (omp 18.8.0-18.8.4).

The lock library now rejects omp __omp_worker_* processes as harnesses and stops its ancestry walk at one, so a worker-pinned lock reads stale and the session reclaims it, and a lock-taking script run under a worker refuses with a message naming the cause instead of recording the wrong pid. The omp protocol and harness reference say to run lock-taking scripts as ordinary bash calls.

(cherry picked from commit defe8dc)

Co-authored-by: Aviv Laufer <[email protected]>

* feat: add opt-in Pi Bash timeout cap (kunchenguid#8445)

* feat(pi): add opt-in bash timeout cap

* no-mistakes(review): Convert Pi Bash timeout caps from milliseconds to seconds

* no-mistakes(document): Clarify Pi Bash timeout configuration and scope

* no-mistakes(ci): Captain, added the missing test-duration hint and documented its provisional local measurement. The coverage guard now passes within both limits. Five focused test runs, lint, and documentation checks passed. Full suite remains blocked by the maintainer’s full-ci label requirement; that external approval condition needs no code change

* test(pi): isolate timeout test extension state

* no-mistakes(test): Reject Pi Bash timeout settings above native timer limit

* feat(pi): add opt-in bash timeout cap

* no-mistakes(review): Convert Pi Bash timeout caps from milliseconds to seconds

* no-mistakes(document): Clarify Pi Bash timeout configuration and scope

* no-mistakes(ci): Captain, added the missing test-duration hint and documented its provisional local measurement. The coverage guard now passes within both limits. Five focused test runs, lint, and documentation checks passed. Full suite remains blocked by the maintainer’s full-ci label requirement; that external approval condition needs no code change

* test(pi): isolate timeout test extension state

* no-mistakes(test): Reject Pi Bash timeout settings above native timer limit

* chore: align test runner with main timing source

* no-mistakes(review): Remove duplicate timeout timing note

---------

Co-authored-by: mehulbhagwani <[email protected]>
Co-authored-by: Pitch Perfekt Collective <[email protected]>
Co-authored-by: Kun Chen <[email protected]>

* fix: narrow Herdr presentation lock scope (kunchenguid#7430)

* fix(spawn): give presentation recovery a longer bounded lock wait

* no-mistakes(document): Updated Herdr lock-recovery documentation

* no-mistakes(document): Restored authoritative Herdr reclaim fallback rule

* no-mistakes(document): Clarified Herdr reclaim documentation ownership

* fix(spawn): release the Herdr presentation lock after the layout mutation

A clean projected create or an exact resume now holds the session-wide
Herdr presentation-order lock only for the projected layout mutation and
releases it before the remaining spawn setup and the launch handoff. A
concurrent recovery therefore no longer gives up while a sibling spawn
finishes unrelated setup. Abort cleanup still re-acquires the lock before
any projection cleanup.

This replaces the earlier longer recovery retry: a resume again makes one
bounded attempt and refuses on contention by default, and the e2e suite's
concurrent resume opts into --herdr-resume-lock-wait so the two recoveries
serialize.

* no-mistakes(review): Release presentation lock before allocation

* no-mistakes(test): Cover Herdr recovery lock scope deterministically

* no-mistakes(document): Consolidate Herdr reclaim recovery guidance

* no-mistakes(lint): Check replacement endpoint command status directly

* test(spawn): capture the lock holder pid outside a subshell

Run the projection lock holder as a backgrounded function so ShellCheck's
extended analysis no longer reports SC2031 on the parent's $! capture.

* test: make behavior fixtures portable and isolated on macOS (kunchenguid#8756)

* test: portable fixtures for macOS hosts and hermetic operator environments

Fixture-only changes so these suites pass on a macOS operator host and no
longer read or write the operator's live environment: a GNU stat shim
(fm_fake_gnu_stat) for fixtures that fake a non-Darwin uname, sed -i.bak,
canonical /tmp socket paths, a PATH_MAX-aware deep-path case,
order-independent directory reads and structurally built manifest
corruptions, FIFO gates in place of sleeps, scrubbed dispatch credentials,
a scratch FM_HOME in the spawn-batch and teardown cases, and wider bounds
in two timing-sensitive cases.

Fixes kunchenguid#8741

* no-mistakes(test): Fix watcher timing; extension install still blocked

* no-mistakes(test): Stabilize source race; extension install still blocked

* test: keep the late-launch check main-equivalent so it holds on non-exec bash

* no-mistakes(review): add missing fm-pi-bash-timeout serial timing hint row

* no-mistakes(review): revert out-of-scope fm-pr-poll quoting sweep to parent spelling

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Hamish Gray <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Michael <[email protected]>
Co-authored-by: Tiago <[email protected]>
Co-authored-by: YifuGu <[email protected]>
Co-authored-by: Tim Kleinschmidt <[email protected]>
Co-authored-by: Aviv Laufer <[email protected]>
Co-authored-by: Mehul Bhagwani <[email protected]>
Co-authored-by: mehulbhagwani <[email protected]>
Co-authored-by: Pitch Perfekt Collective <[email protected]>
hoang-ross-dinh added a commit to hoang-ross-dinh/firstmate that referenced this pull request Nov 30, 2026
* origin/main: (99 commits)
  feat(bin): reclaim returned Treehouse pool slot disk at teardown (kunchenguid#8778)
  fix(omp): consume every watcher wake omp merges into one message (kunchenguid#8711)
  fix: keep watcher liveness beacon fresh during long cycles (kunchenguid#8823)
  feat(calm): add selectable spaceship working presentation (kunchenguid#8769)
  fix(bin): pin secondmate retirement process-event calls to the retiring home's state (kunchenguid#8785)
  fix(bin): read the PR scan past a review wait on the same PR (kunchenguid#8786)
  fix: support wrapped Claude composer readback (kunchenguid#8501)
  fix: support newer Codex releases for native Stop parking (kunchenguid#8174)
  fix(calm): pass Claude Code 2.1.326 strict plugin validation (kunchenguid#8565)
  fix(watch): absorb turn-end wakes after a user-aborted no-mistakes run (kunchenguid#8708)
  feat(bin): choose a codex account per ship or scout from a declared list (kunchenguid#8457)
  fix(bin): exec the herdr lab server launch so a timed-out provision cancels it (kunchenguid#8779)
  fix(bearings): stop truncating Charted Next titles and reasons on the lavish board (kunchenguid#6357)
  test: make behavior fixtures portable and isolated on macOS (kunchenguid#8756)
  fix: narrow Herdr presentation lock scope (kunchenguid#7430)
  feat: add opt-in Pi Bash timeout cap (kunchenguid#8445)
  fix(lock): never record an omp daemon worker as the session (kunchenguid#8731)
  feat(bin): add opt-in reports to the PR health monitor (kunchenguid#8773)
  fix: report an incompatible remote tasks-axi as OUTDATED (kunchenguid#8743)
  fix: publish extension packages on macOS before making them read-only (kunchenguid#8744)
  ...

Resolved conflicts by hunk:
- bin/fm-procevent.sh
- bin/fm-spawn.sh
- bin/fm-test-run.sh
- docs/configuration.md
- docs/fm-test-portable-shards.md
- docs/scripts.md
- tests/fm-session-lock-ancestry.test.sh
- tests/fm-spawn-batch.test.sh
- tests/fm-spawn-dispatch-profile.test.sh
- tests/fm-turnend-guard.test.sh
- tests/lib.sh

Carried the local recap publish timing hint into tests/fm-test-ci-timings.tsv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Maintainer go-ahead: run the full CI suite on this outside pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote doctor reports an installed but incompatible tasks-axi as MISSING

2 participants