Skip to content

Sync the fork with upstream firstmate main (2026-11-27) - #24

Merged
Profreshor merged 25 commits into
mainfrom
fm/fork-upstream-sync-2026-11-27
Nov 28, 2026
Merged

Profreshor merged 25 commits into
mainfrom
fm/fork-upstream-sync-2026-11-27

Conversation

@Profreshor

@Profreshor Profreshor commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Brings fork main up to current kunchenguid/firstmate main (22 upstream commits, through 326ba38e) with a merge commit, keeping every fork piece still in daily use.
Removal of the Herdr-only fork pieces (herdr-core backend, crew workspace layout and overflow, crew tab caps, crew grid equalizer) is deliberately deferred to a separate follow-up: parked tasks in this home still run on the fork herdr-core backend, and removing it now would strand them.
This PR keeps those pieces exactly as they are; the follow-up removes them once those tasks end, from a prepared removal inventory.

Please land this as a merge commit, not a squash: a squash drops the upstream parent and the next weekly sync would re-conflict on the same hunks.

(a) Fork pieces

Fork piece Outcome
Secrets wrapper and guarded settings inspection tool (bin/fm-secrets.sh, bin/fm-secrets.py) Kept unchanged.
Crew memory cap (config/crew-memory-max, systemd fm-crew.slice scopes, OOM handling) Kept unchanged.
agy fixes (native OSC 7501 status without duplicates, feedback survey off) Kept unchanged.
Skip unnecessary no-mistakes rebases (bin/fm-rebase-needed.sh) Kept; its test timing hint moved into upstream's new committed timing table.
Start no-mistakes validation in the commit turn Kept unchanged.
Compact held backlog summaries Kept unchanged.
Per-worker Claude Code Mode trial Kept unchanged.
Claude session-resume monitoring fix Adapted: upstream's session-lock library now sources bin/fm-omp-process-lib.sh, so the fork's resume nudge fixture copies it too.
Supervision-host downtime fix Kept unchanged.
Three-partition CI lint Replaced by upstream's generic <k>of<n> partitions (four in CI).
Inline portable test timing hints in bin/fm-test-run.sh Replaced by upstream's committed tests/fm-test-ci-timings.tsv; the six fork-only scripts keep their previous provisional hints as rows there.
--herdr-resume-lock-wait in the Herdr presentation e2e Replaced by upstream's identical change in #7430.
Herdr crew-workspace layout and overflow (Herdr-only) Kept for now; adapted so crew placement releases the Herdr presentation lock once its pane is placed, matching upstream's narrowed lock scope (#7430 removed the post-launch release the crew path relied on).
herdr-core backend, crew tab caps, crew grid equalizer (Herdr-only) Kept for now, unchanged.

(b) Configuration or restart changes for a running home

  • Restart: running homes pick up the new scripts only after the usual update and restart (/updatefirstmate).
  • Treehouse: upstream raised the floor to 3.0.1 (pin 3.1.8) and now requires treehouse --root; bootstrap asks for an upgrade below that. This host already runs 3.1.8.
  • Local secondmate homes now take ship worktrees from their own Treehouse pool at ${TREEHOUSE_ROOT:-~/.treehouse}/fm-secondmate/<home-id> instead of the shared default pool, so a secondmate's first ship after the update clones a new pool. Tasks already in flight keep their recorded worktrees.
  • CI layout changed: four lint partition jobs, nineteen portable serial shards, and a required real hc (herdr-core) behavior lane. If the fork's branch protection pins required check names from the old layout, update them.
  • New opt-in features, all off until their config file exists: config/codex-accounts (per-task Codex account choice), config/turnend-abort-absorb, the Pi Bash timeout cap, PR health monitor reports, captain-hold answer words, and captain-named PR follow lines. No action needed to keep current behavior.

Validation

  • Fork-piece suites pass locally: secrets, crew memory cap, OSC 7501, agy harness, rebase-needed, DoD, brief, captain-hold lifecycle, CI workflow, Herdr crew, herdr-core, Herdr lease, documentation audiences, lint, Claude stop autoarm, SessionStart nudge, afk return, control relaunch, session start, supervision host, dispatch profile, worker account, backend.
  • bin/fm-test-run.sh --check-coverage and bin/fm-doc-audience-check.sh pass.
  • Known local-only failures that reproduce identically on unmodified upstream main on this host (environment, not this merge): tests/fm-busy-adapter-wiring.test.sh (stall notification case) and tests/fm-session-lock-ancestry.test.sh (pty-host reparenting), which also fails tests/fm-test-run.test.sh's proven-family case.
  • Full-analysis ShellCheck could not complete locally because the worker's own memory cap kills it; fast-mode lint passes, and CI runs the full gate.
  • The worker did not drive Herdr lifecycle suites; the pipeline's test step ran the real Herdr presentation e2e in a guarded named lab (below), and CI's Herdr and herdr-core lanes passed.
  • CI: all 33 checks green on 674b5e3b, including all four full lint partitions.

Follow-ups

  • Remove the Herdr-only pieces (herdr-core backend, crew tab caps, crew workspace layout and equalizer) once the parked herdr-core tasks end; a removal inventory is prepared.
  • Rex launcher and session changes are a separate decision.
  • Upstream's tests/fm-ci-workflow.test.sh checks raw command text in the workflow file instead of running the commands; it arrived unchanged from upstream, so improving it is left to upstream or a separate task.

Pipeline testing

Ran the focused real-Herdr presentation E2E against Herdr 0.9.1 through a guarded disposable lab. It exercised concurrent projected spawns, lock contention, restart recovery, cleanup, duplicate-agent refusal, and repeated provision cycles; the lab tore down with its fleet-session tripwire intact. The diff-scope check surfaced expected upstream-sync CI, documentation, and harness changes.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Projected worker launch releases its presentation lock before lengthy allocation ✅ pass live herdr-presentation-e2e.log records real Herdr 0.9.1 spawn, allocation, cleanup, and restart waves, ending with “fleet-session tripwire intact.”
Concurrent projected workers preserve layout and focus ✅ pass live herdr-presentation-e2e.log records concurrent primary and secondmate create/order/cleanup waves with unchanged active workspace and tab.
Ambiguous recovery refuses duplicate live agent ✅ pass live herdr-presentation-e2e.log records missing, renamed, and duplicate-token recovery attempts; a stale-agent duplicate was refused without destructive or adoptive calls.
Named lab provisioning remains isolated from fleet session ✅ pass live herdr-presentation-e2e.log records repeated provision/reprovision cycles and final guarded teardown with the fleet-session tripwire intact.
Evidence: Real Herdr presentation E2E transcript

Source: Real Herdr presentation E2E transcript

ok - real Herdr lab: an opted-out spawn retains the Stage 1 Herdr command sequence with zero ordering calls
ok - real Herdr lab: a home that configured nothing is projected by default on herdr 0.9.1
ok - real Herdr lab: every projected create, task-tab create, seeded prune, and move preserves active workspace and tab
ok - real Herdr lab: persisted-focused seeded prune proceeds when no live client is attached
ok - real Herdr lab: bounded lock contention warns and falls back flat without projection or focus drift
ok - real Herdr lab: concurrent primary workers form one stable contiguous block without active workspace/tab drift
ok - real Herdr lab: forced workspace.move failure leaves a successful worker in default order with a warning and no cleanup
ok - real Herdr lab: concurrent post-create abort cleanup stays serialized with exact focus restoration
ok - real Herdr lab: Treehouse commands and metadata shape are byte-identical except for endpoint IDs and spawn incarnation
ok - real Herdr lab: exact task-pane close removes the projected workspace with no unrestored wrong-focus interval
ok - real Herdr lab: concurrent projected cleanup is serialized and leaves active workspace/tab unchanged
ok - real Herdr lab: three repeated concurrent create/order/cleanup waves have zero active workspace or tab drift
ok - real Herdr lab: the primary presentation setting inherits into real secondmate homes
ok - real Herdr lab: primary and two secondmate homes each own a top-level contiguous child block
ok - real Herdr lab: concurrent primary/A/B spawns preserve parent order and exact focus
ok - real Herdr lab: session lock contention from a secondmate home falls back flat with no journal
ok - real Herdr lab: Hi Bit and Wheelhouse-style same-identity restarts reclaim one nested space with exact focus and idempotence
ok - real Herdr lab: default exact resume proceeds while a sibling projected spawn is allocating its copy
ok - real Herdr lab: secondmate restart binding and reclaim stay isolated to the exact child home and parent
ok - real Herdr lab: concurrent cross-home recoveries replace exact husks under one session lock with no focus drift
ok - real Herdr lab: default resumed identity refuses session lock contention
ok - real Herdr lab: --herdr-resume-lock-wait waits out session lock contention instead of refusing
ok - real Herdr lab: legacy projection labels and flat secondmate tabs are left unmigrated
ok - real Herdr lab: multi-home exact-pane teardowns restore captain focus without workspace close authority
warning: no exact herdr presentation token match for missing1; leaving any stale space untouched and spawning flat
warning: no exact herdr presentation token match for renamed1; leaving any stale space untouched and spawning flat
warning: 2 exact herdr presentation token matches for duplicate1 are quarantined; inspecting only for duplicate-agent risk
warning: quarantined herdr presentation for duplicate1 is dead or agent-free; exact bound reclaim may proceed, otherwise spawning flat
warning: 2 exact herdr presentation token matches for duplicate1 are quarantined; inspecting only for duplicate-agent risk
error: quarantined herdr presentation for duplicate1 has a stale-agent pane; refusing duplicate launch
ok - real Herdr lab: missing, renamed, and duplicate tokens trigger zero destructive or adoptive calls, and live duplicate risk refuses launch
ok - real Herdr lab validation completed on Herdr 0.9.1 with the fleet-session tripwire intact

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped

Step was skipped.

⚠️ **Review** - 1 warning
  • ⚠️ tests/fm-ci-workflow.test.sh:745 - This new test asserts raw shell-command substrings from workflow YAML (--changed, fm-test-run.sh --lane, --jobs 2, and fm-ci-budget-warn.sh). A comment or dead shell branch could satisfy these checks without executing the intended command. Parse the workflow as done here, then execute the relevant run bodies with stubbed commands and assert their received arguments/behavior.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Projected worker launch releases its presentation lock before lengthy allocation ✅ pass live herdr-presentation-e2e.log records real Herdr 0.9.1 spawn, allocation, cleanup, and restart waves, ending with “fleet-session tripwire intact.”
Concurrent projected workers preserve layout and focus ✅ pass live herdr-presentation-e2e.log records concurrent primary and secondmate create/order/cleanup waves with unchanged active workspace and tab.
Ambiguous recovery refuses duplicate live agent ✅ pass live herdr-presentation-e2e.log records missing, renamed, and duplicate-token recovery attempts; a stale-agent duplicate was refused without destructive or adoptive calls.
Named lab provisioning remains isolated from fleet session ✅ pass live herdr-presentation-e2e.log records repeated provision/reprovision cycles and final guarded teardown with the fleet-session tripwire intact.
  • bash tests/fm-backend-herdr-presentation-e2e.test.sh
  • git diff 6d7ea7c11d922416b79570ee0f8c95549eca51c2 1ee974ef845eb41f0cb91fc75133ac056b181190 | jev find "a change unrelated to synchronizing the fork with upstream or retaining Firstmate runtime behavior"
✅ **Document** - passed

✅ No issues found.

⏭️ **Lint** - skipped

Step was skipped.

✅ **Push** - passed

✅ No issues found.

kunchenguid and others added 25 commits November 24, 2026 01:26
…ome (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 <kunchenguid@users.noreply.github.com>

* 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 <kunchenguid@users.noreply.github.com>

---------

Co-authored-by: Hamish Gray <hamish.gray@petcircle.com.au>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
…unchenguid#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
…#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
…uid#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
…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.
…#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

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
…uid#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 <aviv.laufer@gmail.com>
* 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 <270960355+mehulbhagwani@users.noreply.github.com>
Co-authored-by: Pitch Perfekt Collective <pitchperfekt@Pitchs-Mac-Studio.local>
Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
* 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.
…uid#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
… lavish board (kunchenguid#6357)

* fix(bearings): show full Charted Next titles and reasons on the lavish board

Charted Next rows on the board clipped their title and reason with an
ellipsis, and the snapshot shortened gate titles before the board saw them.
Charted Next rows now wrap their full text, and the snapshot's new
--fields gate-text opt-in carries untruncated title_full and reason_full
for the board while the chat digest keeps its compact bounds.

* fix(bearings): keep secondmate Charted Next text whole across the home summary

A secondmate's home summary shortened queued titles to 120 characters and
hold or blocked reasons to 160 before the bearings projection saw them, so
--fields gate-text still handed the lavish board clipped text for secondmate
gates. The summary now keeps up to 500 characters for those fields, which
covers any realistic backlog item while 20 bounded rows stay far inside the
summary byte cap. The stock macOS Bash CI lane's pinned Bearings test count
moves to 61 for the gate-text regression.

* no-mistakes(review): Pass secondmate queued title and reasons untruncated

* test(bearings): expect untruncated queued text in the secondmate home summary
…ancels it (kunchenguid#8779)

* fix(bin): exec the herdr lab server launch so a timed-out provision cancels it

On bash builds that keep a subshell for an async function (macOS /bin/bash
3.2, the Linux CI bash), $! of the backgrounded launch was that subshell, so
fm_herdr_lab_cancel_provision left the herdr server running after a timed-out
provision. The launch now execs herdr through fm_herdr_lab_raw_exec, making
$! the server process on every bash; the cancel is unchanged.

The timed-out provision test now asserts, right after the provision returns,
that the launch process is gone, synchronized on the launch recording its pid
instead of a fixed sleep.

Fixes kunchenguid#8775

* no-mistakes(document): Document lab provision timeout cleanup

---------

Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
…ist (kunchenguid#8457)

* feat(bin): choose a codex account per ship or scout from a declared list

Add config/codex-accounts, the Codex counterpart of config/claude-accounts:
one Codex home per line (ordinary for the default ~/.codex, or an absolute
CODEX_HOME). While the list exists, every Codex ship or scout spawn names one
declared entry with --account, chosen at intake by the quota-array-dispatch
procedure from bin/fm-codex-account-quota.sh rows. The entry is checked with
codex login status in a stripped environment, launched with CODEX_HOME set
(or unset for ordinary) and CODEX_API_KEY and CODEX_ACCESS_TOKEN unset,
recorded as account=, and reused by relaunch unless --account moves it.
Without the list every Codex launch is unchanged and --account refuses.

bin/fm-worker-account-lib.sh now keys the declared list, its root variable,
and its shed credentials by runner, and the per-account quota read moves into
bin/fm-account-quota-lib.sh shared by the Claude and Codex entry points.

* no-mistakes(ci): I fixed both Greptile findings, and the new tests for each fail before the fix and pass after it. ci-1, Codex secondmates (`bin/fm-worker-account-lib.sh`). The rule: a secondmate without its own account pin file (Codex) must never read `config/codex-accounts`. `fm_worker_account_select` now returns early for such a secondmate, right after it refuses an explicit `--account`, and before the list is parsed. So an empty, malformed or unreadable list no longer blocks the launch or a relaunch. I checked the other place that reads the list, `fm_worker_account_relaunch_request`: it already returns before the read when given a secondmate. Ships, scouts, Claude and Pi follow the same path as before. New test: `test_codex_account_list_leaves_secondmates_alone` in `tests/fm-worker-account.test.sh` now writes a malformed `config/codex-accounts` and checks that a Codex secondmate still launches unchanged (exit 0, no `account=`). Before the fix it was refused with "config/codex-accounts must hold one account per line". ci-2, quota timeout (`bin/fm-account-quota-lib.sh`). The rule: each Claude account read must still honor the old `FM_CLAUDE_ACCOUNT_QUOTA_SECONDS`. `fm_account_quota_report` now picks the per-read limit once: `FM_ACCOUNT_QUOTA_SECONDS` first, then `FM_CLAUDE_ACCOUNT_QUOTA_SECONDS` for Claude only, then 60. The old variable is documented in the lib header. New test: `test_the_claude_read_timeout_is_honored` in `tests/fm-claude-account-quota.test.sh` uses a fake quota-axi that takes 3 seconds. With `FM_CLAUDE_ACCOUNT_QUOTA_SECONDS=1` the account is reported unreadable. Adding `FM_ACCOUNT_QUOTA_SECONDS=10` overrides it and the account is measured. Checks: `tests/fm-worker-account.test.sh`, `tests/fm-claude-account-quota.test.sh` and `tests/fm-codex-account-quota.test.sh` all pass, and `shellcheck -x` is clean on the four changed files. I did not reply to or resolve any PR comment
kunchenguid#8708)

* feat(watch): opt-in absorb of turn-ends after an aborted run

An aborted no-mistakes run keeps current state at failed until a fresh run
starts, so every turn-end of a worker that kept working surfaced.
config/turnend-abort-absorb absorbs it only when the run store records an
abort and an exact busy verdict is newer than the run's end.

Fixes kunchenguid#8675

* no-mistakes(document): Document turnend-abort-absorb flag

* fix(watch): match the exact abort errors no-mistakes records

A gate abort fails the run with 'step <name>: aborted by user[: <reason>]'
and 'axi abort' cancels it with 'cancelled: aborted by user'. Match those
errors exactly and no longer treat a run cancelled by a new push as aborted.

* no-mistakes(review): Fix abort-absorb docs for cancelled runs

* fix(watch): take the abort-absorb busy state from the busy-state verdict

* fix(lint): clear ShellCheck findings the new classify sources expose
…guid#8565)

Claude Code 2.1.323+ type-checks the Calm mod without
allowImportingTsExtensions and ignores a plugin tsconfig, so
`claude plugin validate --strict` refused the mod (TS5097 on the
.ts import specifiers) and the mod's test fixtures drifted from the
engine's declarations. Keep the .ts specifiers Node needs behind
@ts-ignore TS5097, update the fixtures (Spinner suffix, UserMessage
isExpanded, fs.stat isLink, ui.blit cells variant), and record the
2.1.326 verification. Runtime behavior is unchanged.

Closes kunchenguid#8558
…d#8174)

* fix(codex): admit Stop-park releases from 0.163.0

* no-mistakes(document): Remove stale Codex version selection claim

* fix(bin): reach a Codex primary from its SessionStart hook depth

Codex publishes no harness marker, so the session start digest identifies a
Codex primary only through the ancestry walk in bin/fm-harness.sh. That walk
examined eight processes, while the installed Codex runs the tracked
SessionStart wrapper nine parents above the digest's harness probe (eleven
and thirteen for the wake drain and guard probes). The digest therefore
reported harness unknown and rendered the generic supervision block, while
the session lock walker, which examines sixteen processes, still named the
Codex session.

The harness walks now share one sixteen-process reach matching
fm_harness_ancestry_pids, so the digest verdict and the lock owner come from
walks of the same reach. Marker and ancestry precedence is unchanged.

The Pi rebuild cases in the session-open suite set only the Pi marker beneath
the suite's long-lived codex fixture, which the shorter walk never reached;
they now run beneath a pi-named process, as a real Pi session's hooks do.

Adds a portable depth regression, a composed SessionStart regression under a
renamed codex process, and a token-free live SessionStart case for the
installed Codex.

* docs(codex): align version policy and ancestry trial scope

* no-mistakes(document): Clarify Codex SessionStart release coverage

* no-mistakes(document): Correct Stop park script reference

* no-mistakes(document): Clarify Codex Stop park and startup coverage
* fix: read a wrapped typed line in a named Claude composer

In a Claude session started with a name, the session title is drawn into
the composer's top rule. A titled top rule was accepted only when the
prompt glyph row sat directly on the closing rule, so typed text that
wrapped onto a second row read unknown and could not be extracted. A
backend that reads back its typed payload before pressing Enter then
withheld Enter: on a pane narrower than the text, the send failed, or
the text stayed in the composer and blocked every later send.

Accept the wrap rows between the glyph row and the closing rule when
they are contiguous, non-blank, edge-free and within
FM_COMPOSER_PI_MAX_LINES. A glyph followed by a blank row or a longer
region before the next rule still reads unknown.

* no-mistakes(document): Document wrapped named Claude composer reads
…guid#8786)

* fix(bin): read the PR scan past a review wait on the same PR

A worker may declare its review wait with a paused: line right after its
ready done: line. The scan treated that wait as a later crew line and never
recorded the PR or armed its merge poll. The scan now reads back over paused:
lines whose every PR URL is the ready PR, while a paused: line naming no PR or
another PR, and any working:, blocked: or failed: line, still stop it.

Fixes kunchenguid#8762

* no-mistakes(review): ignore punctuation around a PR URL in a paused line
…ng home's state (kunchenguid#8785)

fm-teardown.sh ran the retiring home's fm-procevent.sh with only FM_HOME and
FM_ROOT_OVERRIDE, so an inherited FM_STATE_OVERRIDE sent preflight, sweep, and
reconcile to the parent's state root. Retirement then refused on the parent's
directory mode, or swept the parent's own registrations and left the child's.

Pass FM_STATE_OVERRIDE="$home/state" on all three calls, match the docs and
recovery command, and replace the fake sweep test with the real fm-procevent.sh
under a parent override at modes 775 and 700, checking the parent's source and
directory mode stay unchanged.
Sync kunchenguid/firstmate main (22 commits) into the fork. Take upstream's generic k-of-n lint partitions and committed CI timing table, release the Herdr crew-placement session lock after placement to match upstream's narrowed presentation lock scope, carry fork-only test timing hints into the table, and copy the omp process library into the session-resume nudge fixture.
Upstream's session-lock library now sources bin/fm-omp-process-lib.sh, so the fork's Pi, OpenCode, and Calm fixtures that copy the session-lock library need it too.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T00:39:57.053683Z 674b5e3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 674b5e3b37

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/fm-teardown.sh Resolved
@Profreshor Profreshor changed the title feat(bin): add PR following and account quota reporting Sync the fork with upstream firstmate main (2026-11-27) Nov 28, 2026
@Profreshor
Profreshor merged commit 99c9b0e into main Nov 28, 2026
35 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.

10 participants