Skip to content

fix(sync): merge upstream changes into the fork - #22

Merged
ywplee merged 191 commits into
mainfrom
fm/fm-fork-sync-conflicts
Nov 12, 2026
Merged

ywplee merged 191 commits into
mainfrom
fm/fm-fork-sync-conflicts

Conversation

@ywplee

@ywplee ywplee commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Merge this PR using Create a merge commit. Do not squash or rebase: upstream ancestry must remain reachable so later fork syncs can merge cleanly.

Summary

Merges the author's 188 commits through a9ae3c0c (kunchenguid/firstmate main) into the fork, keeping every fork change.
This clears the 409 "There are merge conflicts" that has failed the scheduled Fork sync every day since 2026-10-28 (the comments on #17).
The branch also contains fork main through fe584223 (#21), which landed while this was in progress.

Conflicts and how each was resolved

Sixteen files conflicted in the upstream merge, plus one when #21 was brought in.
Both sides are kept everywhere except the three points listed under "Fork behavior kept over upstream".

File Resolution
AGENTS.md Upstream's preferred_provider, declared Claude accounts, and --dispatch-override wording, with the fork's runway-aware ranking and FM_DISPATCH_RANK=weekly wording.
.agents/skills/quota-array-dispatch/SKILL.md Upstream's provider-preference step first, then the fork's runway-then-spendPriority ranking inside the resulting candidate set.
docs/configuration.md Upstream's preferred_provider, shared_quota, and new dispatch variables, with the fork's runway ranking link and FM_DISPATCH_RANK; one stale anchor repointed to the fork's heading.
bin/fm-dispatch-resolve.sh Upstream's preferred-provider pool and shared-quota declared-order pick, with the fork's runway and weekly ranking for every other case; the ranking: line is not printed under shared quota.
tests/fm-dispatch-resolve.test.sh Both the fork's weekly-ranking cases and upstream's shared-quota cases.
bin/fm-pr-merge.sh Upstream's branch-update flow, pending/failed classification, and shared required-check helpers, fed by the fork's Actions-runs and commit-status read instead of the check rollup.
tests/fm-pr-merge.test.sh One mock serving both the fork's Actions endpoints and upstream's update-branch endpoint; both sides' new tests kept.
tests/fm-pr-check-security.test.sh Upstream's static-poll mock case and the fork's rollup-free merge view case.
bin/fm-dod-lib.sh Fork's targeted task-branch refresh and upstream's all-remotes refresh with its "could not refresh remote" refusal.
bin/fm-contributions.sh Upstream's review-bot allowlist argument on the fork's Actions-based CI read.
tests/fm-contributions.test.sh Upstream's new test names plus the fork's Actions CI test.
bin/fm-config-inherit-lib.sh Union of inherited config names: the fork's codex-home plus upstream's codex-approval-mode and t3code-instances.
bin/fm-spawn.sh Fork's GH_TOKEN forwarding for Claude workers kept beside upstream's explicit FM_HOME launch block.
.github/workflows/ci.yml Upstream's label-aware job name, pinned runner, and trust condition, with the fork's 45-minute serial tier.
tests/fm-ci-workflow.test.sh, docs/fm-test-portable-shards.md Fork's four-tier timeout policy with upstream's new full-suite and tests-hc jobs placed in their tiers.
bin/fm-subagent-pretool-check.sh (from #21) Upstream's .toolCall.name tool-name read with #21's read-only RemoteTrigger action read.

Fork behavior kept over upstream

  1. Merge checks come from Actions runs and commit statuses, not check runs.
    Upstream's new github_read_required_producers (a check-runs read) is not used by fm-pr-merge.sh; producer binding still compares against the GitHub Actions app id, because the fork's fine-grained token cannot read check data.
    A head with no run and no status still refuses, and now also counts as "checks pending" so upstream's wait after a branch update keeps waiting instead of failing at once.
  2. Dispatch ranking stays runway-first.
    Upstream's absent preferred-provider test expected the highest spendPriority to win even when it projects exhaustion; the expectation now names the through-reset candidate.
  3. Targeted task-branch refresh runs before upstream's all-remotes refresh.
    Upstream's refresh fetches every branch, which the fork's test forbids; the targeted fetch now runs first, so the broad one only runs when the head is still missing.
    When both fail, the refusal carries both diagnostics.

Not changed, but worth knowing: upstream's new bin/fm-park.sh and bin/fm-pr-poll.sh read the check rollup through GraphQL, so with a fine-grained token they will hit the same unreadable-check-data limit the fork already worked around elsewhere.

Why pull-request workflows are not starting

No repository setting was changed.
The cause could not be confirmed from the API; this is what the evidence shows.

Ruled out:

  • Actions is enabled with all actions allowed; ci.yml and no-mistakes-required.yml are active and trigger on pull_request to main (CI also on push to main).
  • feat(guard): allow read-only RemoteTrigger actions in a primary home #21 was opened by the repository owner from a branch in this repository, merged cleanly, and carries no skip-CI marker in its commit or squash message.
  • No run is queued, waiting, or awaiting approval; the fork-PR approval policy does not apply to same-repository branches.
  • The repository is public, so hosted-runner minutes are not metered.
  • githubstatus.com reported all systems operational at the time, with no open incident.

Observed:

  • It is not limited to pull requests. feat(guard): allow read-only RemoteTrigger actions in a primary home #21's open, reopen, and its merge push to main (2026-11-12 17:52-18:02 UTC) produced zero workflow runs, and GitHub created no GitHub Actions check suite at either commit.
  • The last pull_request and push runs are from 2026-10-27; since then the only runs are the scheduled Fork sync.
  • The schedule is degraded too: the 37 5 * * * cron has been starting between 11:00 and 14:20 UTC, six to nine hours late, and the 2026-11-12 run had not started by 18:17 UTC.

Conclusion: GitHub is not turning this repository's push and pull-request events into workflow runs, and is heavily delaying its scheduled ones.
Nothing in the tracked workflows or the settings the API exposes explains that, which leaves account-level state the API does not expose (billing or spending-limit status, or an Actions restriction on the account).
Owner follow-up: check Settings > Billing and plans for a payment or spending-limit notice, re-save Settings > Actions > General for this repository, and if runs still do not start, ask GitHub Support why events on ywplee/firstmate create no runs.
Whether this PR itself got workflow runs is noted in the first comment.

Validation

Run locally on the merged tree:

  • ShellCheck 0.11.0 on changed scripts and actionlint 1.7.12 on all four workflows pass (bin/fm-lint.sh); bin/fm-doc-audience-check.sh passes.
  • Pass: fm-pr-merge, fm-pr-check-security, fm-dispatch-resolve, fm-dod-lib, fm-contributions, fm-ci-workflow, fm-crew-state, fm-captain-hold-lifecycle, fm-pr-health, fm-spawn-dispatch-profile, fm-brief, fm-afk-contract, fm-branch-supervision, fm-subagent-pretool-check.
  • Fails locally: fm-park (upstream's new suite, no fork change in it), with child setpgid ... Operation not permitted from the test shell in a different case on each of two runs; this looks like a limit of the local sandboxed shell and needs a hosted CI run to confirm.
  • The full suite was not run locally.
  • This is a direct PR, so no no-mistakes attestation is supplied and that compliance check may fail.

kunchenguid and others added 30 commits October 22, 2026 21:03
* Fix Rex secondmate session lifecycle

* no-mistakes(review): Retire Rex secondmate sessions under the owning home identity

* no-mistakes(review): Limit Rex FM_ROOT label override to secondmate launches

* no-mistakes(document): Clarify Rex secondmate grouping and lifecycle documentation
…gins, and exit (kunchenguid#7336)

* feat(opencode): add OpenCode 2 support with version-gated launch and plugins

OpenCode 2 dropped the v1 server-plugin hook API, so the five fm.primary.*
plugins now export a default definition with an id and a setup function
alongside their legacy OpenCode 1 server export, backed by a new shared
lib/fm-opencode2.js helper; the turn-end guard, watch-arm, cd-check,
pretool-check, and sessionstart-nudge install their behavior from setup(ctx)
on OpenCode 2 and keep the server entrypoint for OpenCode 1.

fm-spawn probes the resolved opencode executable's --version once and branches
the launch, model flag, reasoning config, exit key, and busy-state plugin off
the detected major. A parsed major >= 2 takes the OpenCode 2 shape (no --model,
the model pinned through OPENCODE_CONFIG_CONTENT, a raw Ctrl-C exit, the
session.execution.* busy plugin); OpenCode 1.x and any undetected or
unparseable version fall back to the 1.x shape (--model, 1.x config, /exit)
everywhere. The worker busy-state plugin is always provisioned, but OpenCode 1
keeps the pre-port session.status/session.idle plugin so its busy-state wiring
is unchanged, and only a major >= 2 gets the session.execution plugin. Adapter
and supervision docs, OpenCode 2 live fixtures, and regression tests for the
unknown->1.x launch path and the version-gated busy-plugin shape are included.

* no-mistakes(review): gate OpenCode 2 busy plugin turn-end touch on notifyTurnEnd

* feat(opencode): launch detected OpenCode 2 workers with --standalone

OpenCode 2's default launch attaches to the shared background service, which
hosts plugins with the service's environment and ignores the pane's
OPENCODE_CONFIG_CONTENT. A private server keeps per-worker model, permissions,
FM_HOME, and lock ancestry correct. 1.x and undetected versions are unchanged.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* fix(opencode): resolve the OpenCode 2 project location and treat every terminal turn as a turn end

OpenCode 2.0.x hands plugins the project only as ctx.location.project.directory
and takes ctx.session.prompt({ sessionID, text }), so the V2 setup path never
found its root or delivered a prompt. Interrupted and failed turns now end a
turn like a succeeded one, while a server shutdown does not.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* test(opencode): add a token-free OpenCode 2 native plugin fixture to the live e2e

A private opencode serve plus a loopback provider proves the five primary
plugins load and act on OpenCode 2: startup nudge, cd and watcher-redirection
guards, turn-end guard, watcher arming across succeeded, interrupted, and
failed turns. The fixture declares the complete model capabilities object,
which OpenCode 2.0.11 requires and 2.0.22 accepts. FM_OPENCODE_LIVE_BINS runs
it across several OpenCode 2 executables. The credentialed half now picks its
run flags and session tables by detected major, so it keeps working on 1.x.

Fixture ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* feat(opencode): send one Enter when an OpenCode 2 launch leaves the brief unsent

OpenCode 2.0.11 prefills the --prompt brief without submitting it, while 2.0.22 submits it.
After launch, fm-spawn waits for the worker's busy-state plugin to report the turn start, sends one Enter only if it has not started and the composer is not empty, and fails the spawn if the turn never starts.

* docs(opencode): document the OpenCode 2 launch, delivery gate, and standalone primary homes

Records the 2.0.11 and 2.0.22 live evidence for the native plugin fixture and the post-launch brief delivery gate.

* no-mistakes(review): Trim OpenCode 2 adapter shapes and harden Ctrl-C exit

* no-mistakes(review): Record OpenCode 2 live seatbelt and exit evidence

* no-mistakes(test): Document OpenCode 2.0.22 wide-pane sidebar exit refusal limitation

* no-mistakes(document): Refresh OpenCode 2 exit-key and seatbelt payload docs

* test(opencode): verify OpenCode 1.x live with the dual-export plugins

Pin the live e2e TUI panes to the resolved opencode executable, and record
OpenCode 1.15.7, 1.18.20, and 1.18.31 evidence for plugin loading, the
turn-end guard, watcher continuity, and 1.x worker launch and exit.

* no-mistakes(review): Defer OpenCode 2 Enter on unknown composer; widen turn-end docs

* no-mistakes(document): Document OpenCode 2 delivery gate unknown-composer test outcomes

---------

Co-authored-by: Niranjan <nniranc@gmail.com>
Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…t the most recent group member (kunchenguid#7662)

* fix(bin): resolve the tmux container from the caller's own session, not the most recent group member

* no-mistakes(test): Fall back when the $TMUX session id is stale

* no-mistakes(document): Document tmux container choice under grouped sessions
…er (kunchenguid#7647)

* fix(bin): read a fully dim Cursor placeholder as an empty composer

cursor-agent 2026.10.19 draws the composer glyph and its idle placeholder
as one SGR 2 run with no reverse-video cell, so ghost stripping empties the
row and the empty-content guard returned unknown. Relaunch and exit then
refused on every idle Cursor pane on tmux.

When a styled bare row strips to empty and the plain row is an agent glyph
followed by an anchored idle placeholder, read it empty. Bright typed text,
other dim text, and unstyled rows keep their existing verdicts.

Fixes kunchenguid#7413

* docs(verification): record the fully dim Cursor placeholder verdict and refresh command
… composer as empty (kunchenguid#6163)

* fix(bin): recognize a named Claude session's titled composer rule on cursorless backends

`claude -n <name>` right-aligns the session name in the rule above the
composer. Cursorless backends (Herdr) accepted only solid rules, so the
scan saw the lower rule alone, the idle composer read `unknown`, and
away-mode delivery to a named Claude primary deferred until return.

A rule carrying one right-aligned title now opens a separator pair. It
never closes one, the pair it opens counts only over an agent-glyph row,
and it is never a valid Pi pair, so Pi's verdict is unchanged.

The away-mode composer deferral now names which refusal it was:
unsubmitted text, or no composer shape recognized.

* no-mistakes(review): Reword composer deferral reason to cover busy harness

* no-mistakes(ci): ci-3 (Greptile, user chose to fix): The rule that must always hold is that Claude's titled opening rule is accepted for any non-empty session name that doesn't start with a space and doesn't contain the rule glyph `─`, including a multiword name. The only place that check lives is the title `case` in `_fm_composer_titled_rule_row` (bin/fm-composer-lib.sh). It now reads `case "$title" in ''|' '*|*─*) return 1 ;; esac`, as the user asked, and the comment above the function mentions multiword titles. I added regression fixtures to `test_matrix_claude_named_session_titled_rule` in tests/fm-composer-lib.test.sh, next to the existing single-word `Andrew` cases. They use the title `Andrew Chen` and check that an idle composer on herdr reads `empty` and a composer with typed text reads `pending`. Something you should know: the old pattern already accepted a title with a space in the middle. It only rejected a title ending in a space. So the new multiword fixtures also pass against the old code, and the bot's failure scenario did not actually happen for "Andrew Chen". What the fix really changes is that it drops the trailing-space rejection, as instructed. Checks run: tests/fm-composer-lib.test.sh and tests/fm-composer-ghost.test.sh both pass (exit 0, no failures), and `shellcheck -x` is clean on both changed files

* no-mistakes(review): Match unnamed-ghost fixture rule width to the partner rule
…process groups (kunchenguid#7666)

* fix(tests): reap Pi test process groups and stop arms whose ground is removed

Orphaned stub-arm pollers from tests/fm-pi-watch-extension.test.sh outlived
a failed case: they waited for release/stop files the failed driver never
wrote, teardown only removed the temp root, and the loops had no other exit.

Run each node driver in its own recorded process group and reap those groups
in teardown before the root is removed; end every blocking stub loop once its
own script is gone. bin/fm-watch-arm.sh now exits with a typed ground-removed
line within one poll when its script, state directory, or home is deleted,
instead of polling through the successor window.

* no-mistakes(document): Document arm exit when its ground is removed
…alidating (kunchenguid#5947)

* fix(bin): defer wedge escalation while an attributed validation run is running or fixing

While a no-mistakes run executes a round, the worker is correctly idle behind
its own blocking drive call, yet the watcher's wedge timer escalated a possible
wedge every FM_STALE_ESCALATE_SECS. The timer now consults the attributed run
step before escalating: a run the current-state reader reports as
validating (running) or validating (fixing) for a named run defers onto the
FM_PAUSE_RESURFACE_SECS recheck cadence, aged from a marker bound to that run
id. Parked, terminal, ci-monitoring, coarse, runless, absent and unreadable
runs keep the unchanged escalation ladder.

* test: count only the validating-run read in the unarmed parked-gate probe

* no-mistakes(document): add .validating-* to watcher-internals marker inventory

* no-mistakes(document): Update fm-watch.sh comments for validating-deferral chain

* no-mistakes(document): Document validating-run deferral in guard and handoff docs

* feat(watch): gate the validating-run wedge deferral behind config/wedge-defer-validating

The deferral changed the default for every home, unlike the comparable
config/wedge-defer-parked-gate and config/wedge-defer-worker-wait waits.
Absent the new presence flag the wedge timer spends no current-state read
for it and keeps the unchanged ladder.
…unchenguid#6300)

* fix(session-lock): identify a harness session on Windows/Git Bash

Every session start on Cygwin (Git for Windows) refused the fleet lock and
dropped to read-only with "cannot locate harness process in ancestry", so
spawning, steering, merging, the wake-queue drain, and supervision repair were
skipped on every start. Two independent causes, both on the identity path.

Cygwin's ps has no -o option at all and fails the whole invocation with
"unknown option -- o", so the ancestry walk aborted on its first hop. The walk
now reads comm, args, and ppid through accessors that fall back to Cygwin's
fixed ps columns, leaving the procps/BSD path unchanged.

That alone does not resolve the session: the parent link from a shell the
harness spawns does not cross the Cygwin boundary, and Cygwin reports that
shell's PPID as 1, so no walk can reach a harness that is a native Windows
process. Identity is instead taken from the session pid the harness publishes
and confirmed against the Windows process table before it is used - the pid
must still be live and its executable must independently identify a verified
harness - so an absent, stale, or non-harness value is discarded rather than
bound.

Walking the real Windows parent chain was implemented and then removed as
unsafe. MSYS emulates exec by spawning a fresh Windows process and exiting the
old one, so intermediate shells vanish and a child's recorded parent is
routinely a pid that no longer exists; Windows never reparents an orphan, so
that dangling id stays and can be reissued to an unrelated process. Following
it can bind a home's lock to the wrong process, which is the failure this file
exists to prevent. A harness that publishes nothing stays unresolved, which
leaves the session read-only exactly as before.

Windows pids are tagged rather than stored bare. They are a different namespace:
kill -0 reports a live Windows process as dead, and the number can collide with
an unrelated live Cygwin pid. The tag makes the value non-numeric, so a consumer
that treats it as a local pid - including a future kill - refuses it instead of
acting on the wrong process.

fm-sessionstart-nudge.sh carried a private second copy of the ownership walk and
so stayed wrong after the owner was fixed, nudging a session that already held
the lock. It now asks the owning function.

Verified on Windows 11 (Git Bash, Cygwin ps 3.4.10): the lock is acquired,
reports its holder, is idempotent, and refuses a bogus, dead, or non-harness
published pid. Regressions cover both platform departures behind a fake process
table, so they run on Linux and macOS CI too. The pre-existing e2e failure in
this suite on Windows is unchanged from main; it cannot exec its symlinked
fixture.

Refs kunchenguid#3396

Claude-Session: https://claude.ai/code/session_01F9T29YDqYSkQeDTC2Nfi7h
(cherry picked from commit 8b281b7)

* fix(session-lock): keep the nudge's own ancestry question intact

Delegating the nudge to fm_session_lock_owned_by_self changed the question it
asks. The nudge asks whether a process in this ancestry took the lock; the
ownership predicate additionally requires a verified harness in that ancestry,
so a session whose lock was written by a plain shell started being nudged to
run session start again. tests/fm-sessionstart-nudge.test.sh pins the looser
contract deliberately.

The walk stays local, now reading ppid through the portable accessor so it also
survives a ps with no -o option, and defers to the ownership predicate only for
a Windows-tagged holder, which is not in this process table at all.

(cherry picked from commit 0baf64f)

* fix(session-lock): accept a tagged identity in every gate that reads the lock

The Windows identity added in this branch introduced a second shape into
state/.lock. Six gates read that field, and each one answered "is this value
usable" with its own inline numeric test, so every one of them read a valid
Windows holder as malformed.

The visible cost was concentrated in startup completion: the record was never
written, and the clear/compact check that consumes it could never match, so
every clear or compact on Windows repeated the full startup sequence. The
deferred network sweeps reported ownership as changed when it had not, and the
Stop auto-arm treated a dead Windows session as an unreadable lock rather than
a recoverable one. fm-lease.sh was the outlier: rather than refusing a value it
could not use, `tr -cd '0-9'` reduced the tag to its digits and produced a
number naming an unrelated process in the local table. It happened to fail
closed downstream, but deriving a wrong-namespace pid is precisely what the tag
exists to prevent, so it now takes the value whole and requires a local pid.

fm_session_pid_valid is now the single owner of that question and every gate
delegates to it, so a third identity shape cannot split them again.

Verified against the shipped bytes of each gate with a tagged lock: startup
completion now records and is recognized (main's gate reruns the full startup
on the same input), both network-ownership gates authorize their sweeps, and a
tagged lock yields no lease holder pid instead of 7204.

(cherry picked from commit 9256182)

* fix(session-lock): gate the tagged identity on Windows and read it in every lock reader

Accept win:<digits> only where fm_win_boundary_applies, with an all-digit
remainder, so a Linux/macOS reader of a win:N lock stays inert as before.
The sessionstart nudge routes its tagged case through fm_win_untag_pid.
fm_session_lock_foreign_owner_live and fm_session_lock_inspect now validate
through fm_session_pid_valid and resolve a tagged holder through
fm_harness_pid_alive, so a live win:N holder reads as a live foreign owner
and as held; unverifiable tagged holders stay unknown.

* no-mistakes(document): Document Windows tagged session-lock identity in nudge and scripts docs

* fix(session-lock): keep task leases and stale detection working for a tagged holder

A Windows session can now hold the session lock as win:<pid>, but the task
lease still accepted only a local pid: the claim recorded the short-lived
fm-lease.sh process instead, and fm_lease_live rejected the tagged lock, so
the lease was never live and the other supervision actor could clear it and
act on the same task. The lease now records a live tagged lock holder whole
and treats it as live while it is still the lock holder and a verified
harness in the Windows process table. The session-lock library is loaded
only for a win:-shaped value, so POSIX lease verdicts are unchanged.

fm_session_lock_inspect left an exited tagged holder unknown, because
fm_win_command could not tell an absent pid from an unreadable table. It now
returns 1 only when a readable table proves the pid absent and 2 when the
table cannot be read, so inspection matches the local-pid contract: absent
is stale, a live non-harness is unknown with no live harness, and an
unreadable table stays unknown.

* no-mistakes(review): Restrict caller-supplied lease holder pid to local numeric

* no-mistakes(review): Pass tagged session-lock holder whole to task lease

* no-mistakes(review): Make tagged lease-holder regression tests fail without their fixes

* fix(session-lock): take a Windows CLAUDE_PID only with its session id

On Windows the session identity comes from CLAUDE_PID, which every process
started from a Claude pane inherits, so an unrelated process carrying a copy
could take the lock as that session and both would own it. The bridge now
accepts CLAUDE_PID only together with CLAUDE_CODE_SESSION_ID. The trusted
session-id gate matches the tagged win:<pid> form, so that id is recorded
beside the lock, and the anchor stays tagged. fm-lock.sh and the ownership
readers refuse the same tagged pid under a different recorded id as another
live session's. A non-Claude primary hand-started from a Claude pane inherits
both values and still resolves as that session; that remains a known
limitation. POSIX behavior is unchanged: every new branch applies only to a
tagged pid.

* fix(session-lock): let a Windows /clear re-key its own lock

/clear keeps the Claude process, so CLAUDE_PID stays while the session id
changes. Refusing the same tagged pid under a different recorded id locked a
session out of its own lock after /clear, which POSIX handles by re-keying
the sidecar. Drop that refusal: a Windows CLAUDE_PID is still taken only
together with its CLAUDE_CODE_SESSION_ID, and that id is still recorded
beside the lock and re-keyed on /clear as on POSIX.

* no-mistakes(review): Give tagged host test a session id; clarify Windows lock error

* no-mistakes(document): Point the trust-gate comment to the Windows limitation

---------

Co-authored-by: Lloyd <lloydkakunguwo@gmail.com>
…d#7421)

* feat(bin): add opt-in local Claude usage threshold warner

A usage window is exhausted without warning: work is cut off mid-run
rather than stopping deliberately, and nothing says a window is close to
its cap until it is already gone.

bin/fm-usage-warner.sh is a threshold warner, not a usage viewer.
quota-axi is already the one Claude-quota reader this repo depends on
(bin/fm-quota-axi-lib.sh), so the warner runs that existing read rather
than adding a second reader that could drift from it: one bounded
`quota-axi --provider claude --json --full --no-credential-refresh`, the
snapshot validated with fm_quota_json_valid, and the provider row picked
with the same FM_QUOTA_ROW_JQ join the dispatch consumers use, under
schema 5 and schema 6 alike.

Thresholds are `<window-id>:<percent>` directives in config/usage-warner,
naming quota-axi's own window ids (five_hour, seven_day, model:<name>)
rather than a second vocabulary, and compared against each window's own
percentUsed. Naming the window is the point: the session and weekly
windows exhaust at very different times, so a figure that does not say
which window is close misleads.

One read with two callers and no new schedule: `check` is what a human
runs on demand and what the watcher runs on its ordinary check-shim
cadence once `arm` registers state/usage-warner.check.sh through
bin/fm-check-register.sh. There is no daemon.

Warnings post through macOS Notification Center with the same osascript
call bin/fm-supervise-daemon.sh's wedge alarm makes, without sourcing or
coupling to that daemon's away-mode-specific config and rate limiting.
Delivery is edge-triggered against state/.usage-warner: a crossing warns
once, stays quiet while it holds, and re-arms when the window next reads
back below its threshold, the same standing-report contract
fm-mail-check.sh and fm-tool-update-check.sh already use.

bin/fm-procevent-quota.sh already reads the same snapshot, so docs name
the boundary rather than leaving two similar surfaces unexplained. That
source fires at most once, wakes firstmate with a durable check event,
and compares a provider's aggregate effectivePercentRemaining. This
warner is the standing, human-facing half: per-window, delivered to the
person through Notification Center, and self-re-arming. Neither replaces
the other and arming both is reasonable.

Opt-in is load-bearing and enforced in code. With no valid directive,
`check` returns before any read and `arm` refuses, so an unconfigured
home gains no behaviour change, no new failure mode, and no new hard
dependency at dispatch. Notification Center is macOS-only, so `arm`
refuses on other platforms instead of registering a check that could
never speak.

The warner only warns. It does not stop or pace dispatch, and its
coverage is exactly what quota-axi can see locally, so a plan or
organisation spend cap quota-axi does not report is not covered; the doc
says so rather than implying coverage it does not have.

The new test script carries no measured CI duration hint yet, so the
portable-serial lane balances it on the conservative default until the
hints are next refreshed from a green run, per docs/fm-test-portable-shards.md.

* no-mistakes(review): Key usage-warner de-dupe on window and threshold; fix docs

* no-mistakes(review): Keep absent-window crossings recorded; stub osascript in tests

* no-mistakes(document): Document absent-window de-dupe carry-forward in usage-warner header

* fix: correct Rex secondmate grouping and lifecycle (kunchenguid#7656)

* Fix Rex secondmate session lifecycle

* no-mistakes(review): Retire Rex secondmate sessions under the owning home identity

* no-mistakes(review): Limit Rex FM_ROOT label override to secondmate launches

* no-mistakes(document): Clarify Rex secondmate grouping and lifecycle documentation

* feat(opencode): add OpenCode 2 support with version-gated launch, plugins, and exit (kunchenguid#7336)

* feat(opencode): add OpenCode 2 support with version-gated launch and plugins

OpenCode 2 dropped the v1 server-plugin hook API, so the five fm.primary.*
plugins now export a default definition with an id and a setup function
alongside their legacy OpenCode 1 server export, backed by a new shared
lib/fm-opencode2.js helper; the turn-end guard, watch-arm, cd-check,
pretool-check, and sessionstart-nudge install their behavior from setup(ctx)
on OpenCode 2 and keep the server entrypoint for OpenCode 1.

fm-spawn probes the resolved opencode executable's --version once and branches
the launch, model flag, reasoning config, exit key, and busy-state plugin off
the detected major. A parsed major >= 2 takes the OpenCode 2 shape (no --model,
the model pinned through OPENCODE_CONFIG_CONTENT, a raw Ctrl-C exit, the
session.execution.* busy plugin); OpenCode 1.x and any undetected or
unparseable version fall back to the 1.x shape (--model, 1.x config, /exit)
everywhere. The worker busy-state plugin is always provisioned, but OpenCode 1
keeps the pre-port session.status/session.idle plugin so its busy-state wiring
is unchanged, and only a major >= 2 gets the session.execution plugin. Adapter
and supervision docs, OpenCode 2 live fixtures, and regression tests for the
unknown->1.x launch path and the version-gated busy-plugin shape are included.

* no-mistakes(review): gate OpenCode 2 busy plugin turn-end touch on notifyTurnEnd

* feat(opencode): launch detected OpenCode 2 workers with --standalone

OpenCode 2's default launch attaches to the shared background service, which
hosts plugins with the service's environment and ignores the pane's
OPENCODE_CONFIG_CONTENT. A private server keeps per-worker model, permissions,
FM_HOME, and lock ancestry correct. 1.x and undetected versions are unchanged.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* fix(opencode): resolve the OpenCode 2 project location and treat every terminal turn as a turn end

OpenCode 2.0.x hands plugins the project only as ctx.location.project.directory
and takes ctx.session.prompt({ sessionID, text }), so the V2 setup path never
found its root or delivered a prompt. Interrupted and failed turns now end a
turn like a succeeded one, while a server shutdown does not.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* test(opencode): add a token-free OpenCode 2 native plugin fixture to the live e2e

A private opencode serve plus a loopback provider proves the five primary
plugins load and act on OpenCode 2: startup nudge, cd and watcher-redirection
guards, turn-end guard, watcher arming across succeeded, interrupted, and
failed turns. The fixture declares the complete model capabilities object,
which OpenCode 2.0.11 requires and 2.0.22 accepts. FM_OPENCODE_LIVE_BINS runs
it across several OpenCode 2 executables. The credentialed half now picks its
run flags and session tables by detected major, so it keeps working on 1.x.

Fixture ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* feat(opencode): send one Enter when an OpenCode 2 launch leaves the brief unsent

OpenCode 2.0.11 prefills the --prompt brief without submitting it, while 2.0.22 submits it.
After launch, fm-spawn waits for the worker's busy-state plugin to report the turn start, sends one Enter only if it has not started and the composer is not empty, and fails the spawn if the turn never starts.

* docs(opencode): document the OpenCode 2 launch, delivery gate, and standalone primary homes

Records the 2.0.11 and 2.0.22 live evidence for the native plugin fixture and the post-launch brief delivery gate.

* no-mistakes(review): Trim OpenCode 2 adapter shapes and harden Ctrl-C exit

* no-mistakes(review): Record OpenCode 2 live seatbelt and exit evidence

* no-mistakes(test): Document OpenCode 2.0.22 wide-pane sidebar exit refusal limitation

* no-mistakes(document): Refresh OpenCode 2 exit-key and seatbelt payload docs

* test(opencode): verify OpenCode 1.x live with the dual-export plugins

Pin the live e2e TUI panes to the resolved opencode executable, and record
OpenCode 1.15.7, 1.18.20, and 1.18.31 evidence for plugin loading, the
turn-end guard, watcher continuity, and 1.x worker launch and exit.

* no-mistakes(review): Defer OpenCode 2 Enter on unknown composer; widen turn-end docs

* no-mistakes(document): Document OpenCode 2 delivery gate unknown-composer test outcomes

---------

Co-authored-by: Niranjan <nniranc@gmail.com>
Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(bin): add opt-in local Claude usage threshold warner

A usage window is exhausted without warning: work is cut off mid-run
rather than stopping deliberately, and nothing says a window is close to
its cap until it is already gone.

bin/fm-usage-warner.sh is a threshold warner, not a usage viewer.
quota-axi is already the one Claude-quota reader this repo depends on
(bin/fm-quota-axi-lib.sh), so the warner runs that existing read rather
than adding a second reader that could drift from it: one bounded
`quota-axi --provider claude --json --full --no-credential-refresh`, the
snapshot validated with fm_quota_json_valid, and the provider row picked
with the same FM_QUOTA_ROW_JQ join the dispatch consumers use, under
schema 5 and schema 6 alike.

Thresholds are `<window-id>:<percent>` directives in config/usage-warner,
naming quota-axi's own window ids (five_hour, seven_day, model:<name>)
rather than a second vocabulary, and compared against each window's own
percentUsed. Naming the window is the point: the session and weekly
windows exhaust at very different times, so a figure that does not say
which window is close misleads.

One read with two callers and no new schedule: `check` is what a human
runs on demand and what the watcher runs on its ordinary check-shim
cadence once `arm` registers state/usage-warner.check.sh through
bin/fm-check-register.sh. There is no daemon.

Warnings post through macOS Notification Center with the same osascript
call bin/fm-supervise-daemon.sh's wedge alarm makes, without sourcing or
coupling to that daemon's away-mode-specific config and rate limiting.
Delivery is edge-triggered against state/.usage-warner: a crossing warns
once, stays quiet while it holds, and re-arms when the window next reads
back below its threshold, the same standing-report contract
fm-mail-check.sh and fm-tool-update-check.sh already use.

bin/fm-procevent-quota.sh already reads the same snapshot, so docs name
the boundary rather than leaving two similar surfaces unexplained. That
source fires at most once, wakes firstmate with a durable check event,
and compares a provider's aggregate effectivePercentRemaining. This
warner is the standing, human-facing half: per-window, delivered to the
person through Notification Center, and self-re-arming. Neither replaces
the other and arming both is reasonable.

Opt-in is load-bearing and enforced in code. With no valid directive,
`check` returns before any read and `arm` refuses, so an unconfigured
home gains no behaviour change, no new failure mode, and no new hard
dependency at dispatch. Notification Center is macOS-only, so `arm`
refuses on other platforms instead of registering a check that could
never speak.

The warner only warns. It does not stop or pace dispatch, and its
coverage is exactly what quota-axi can see locally, so a plan or
organisation spend cap quota-axi does not report is not covered; the doc
says so rather than implying coverage it does not have.

The new test script carries no measured CI duration hint yet, so the
portable-serial lane balances it on the conservative default until the
hints are next refreshed from a green run, per docs/fm-test-portable-shards.md.

* no-mistakes(review): Key usage-warner de-dupe on window and threshold; fix docs

* no-mistakes(review): Keep absent-window crossings recorded; stub osascript in tests

* no-mistakes(document): Document absent-window de-dupe carry-forward in usage-warner header

* no-mistakes(review): Serialize usage-warner check, dedupe directives, drop vacuous greps

* no-mistakes(document): List usage-warner check lock in state layout

---------

Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
Co-authored-by: Kostadin Pop-Kochev <kostadin.popkocev@gmail.com>
Co-authored-by: Niranjan <nniranc@gmail.com>
Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(bin): use clock-stable /proc starttime for remote job worker ownership

Linux remote job ownership compared ps lstart, which drifts on WSL2 while
/proc starttime stays fixed, so ensure treated a healthy worker as dead and
started another supervisor on every call. fm_remote_job_process_start now emits
a proc-starttime token when /proc is readable and falls back to ps lstart
otherwise. The Linux start path hands a live worker of the configured root
whose lock still records a legacy start over to one replacement, checked
against the recorded and live command so no unrelated pid is signaled.

Fixes kunchenguid#2921

* no-mistakes(review): Treat legacy lstart claim starts as indeterminate, not mismatched

* no-mistakes(test): Assert legacy handoff interrupts job once

* no-mistakes(test): Remove scratch debug test; legacy job case git-tracked

* no-mistakes(test): Revert legacy start comparator; simplify legacy handoff test

* fix(bin): drop automatic legacy worker upgrade; document manual one-time restart

* chore: remove stray file

* no-mistakes(document): Drop stale handoff mention from remote worker docs

* fix(bin): verify pre-update remote job workers via legacy lstart

When a recorded start lacks the proc-starttime= prefix, compare it against
ps -o lstart= without LC_ALL=C so a healthy pre-update worker still verifies.
The ordinary code-identity path then replaces it once instead of piling
supervisors. Add regression coverage for the bare-lstart cookie and the
lock upgrade path.

* no-mistakes(document): Clarify legacy remote-job start verification docs

* no-mistakes(review): Preserve C-locale legacy cookie verification, captain

* no-mistakes(document): Clarify legacy process identity cookie compatibility

* no-mistakes(lint): Replace deprecated fgrep with lint-compliant grep -F

---------

Co-authored-by: Pitch Perfekt Collective <pitchperfekt@Pitchs-Mac-Studio.local>
Co-authored-by: mehulbhagwani <270960355+mehulbhagwani@users.noreply.github.com>
…ude (kunchenguid#6722)

* fix: use managed-compatible worker approval modes

* no-mistakes(document): update codex and claude worker approval mode docs

* no-mistakes(ci): Fixed two test files that weren't updated when the PR changed the default claude permission mode from `--dangerously-skip-permissions` (bypass) to `--permission-mode auto`. Changes: - `tests/fm-claude-trust.test.sh` lines 664 and 696: updated two `assert_grep` assertions from `claude --dangerously-skip-permissions` → `claude --permission-mode auto` - `tests/fm-backend-orca.test.sh` line 568: updated one `assert_contains` assertion from `claude --dangerously-skip-permissions` → `claude --permission-mode auto` Both tests now pass locally (orca: exit=0, backend-dispatch/claude-trust: exit=0)

* fix: remove stray scratch directories from tests/

tests/.tmp-managed-approvals-test.bBuGhY/ and tests/.tmp-managed-approvals2.exz2qr/
were accidentally committed as worktree-local scratch dirs and do not belong in the repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: preserve bypass defaults with persistent managed approval failover

* no-mistakes(review): fix approve-for-me fixture and bypass diagnostic messages

* no-mistakes(review): restore absent-Claude-default test and fix pass messages

* fix: recognize managed Codex approval prompts in the C locale

* no-mistakes(review): Fix managed approval failover bounds, authorization, inheritance, and capture

* Simplify managed approval recovery to persistent explicit failover

* no-mistakes(review): Guard failover authorization and unlink staging before recovery

* no-mistakes(document): Correct managed approval documentation and consolidate owner references

* no-mistakes(document): Correct managed-approval references and stale hook guarantees

* fix: require approval and inherit managed modes from primary

* no-mistakes(document): Clarify live hook verification scope

* no-mistakes(review): Remove dead approval_configured key from relaunch metadata

* fix: resurface queued wakes from handling successors (kunchenguid#7466)

* fix(bin): resurface wakes appended while a handling successor is parked

The supervision host parks on the handling successor it starts for a wake
its engine handled, and a handling successor never resurfaced recovery, so
a row another script appended during the park (a captain inbox note from
the Basecamp integration) sat queued until an unrelated close - four hours
in the observed case.

A handling successor now records the newest queued sequence at its start
and closes once with the recovery wake while a newer row is still queued;
a newer row already consumed only advances that mark, so the predecessor's
delivered episode is still never re-announced.

Follow-ups, not built here:
- A row appended in the short window between a handled close and its
  successor's start (about a second) is below the successor's mark; if the
  engine handles that close without claiming the row, the row waits for the
  next close. Closing that window needs the host to treat rows left queued
  after a handled attended turn as main's, which is a separate host change.
- After a machine reboot the primary session does not restart on its own,
  so queued wakes wait until it is resumed by hand. Either auto-resume the
  primary session after boot, or alert the owner when the primary session
  is down while wakes are queued.

* no-mistakes(review): Close handling-successor startup wake race

* no-mistakes(test): Stabilize parked-host inbox wake regression timeout

* no-mistakes(document): Clarify handling-successor wake continuity guarantees

* no-mistakes(ci): Stabilized the flaky remote secondmate lifecycle test by extending the auto-relaunch watcher deadline from ~30 to ~60 seconds. The CI runner exceeded the old deadline by about 3 seconds; the changed production branch was not reachable in this fixture. `bash -n` and `git diff --check` pass. The full test was attempted but exceeded the 600-second local execution limit before reaching this case

* no-mistakes(ci): Fixed flaky concurrent Herdr recovery testing by retrying only documented session-lock contention after both competitors finish. Cleanup now handles fixture-owned read-only hooks. Targeted E2E passed; bash syntax and diff checks passed. Shellcheck reported only existing SC1091 source-following notices

* no-mistakes(test): Preserve successor wake boundaries across handoffs

* no-mistakes(test): Revert successor boundaries and drain teardown fixture wake

* no-mistakes(test): Notify main when downtime handback publication fails

* no-mistakes(test): Revert downtime handback notification changes

* no-mistakes(document): Correct stale supervision wake routing documentation

* fix(bin): stop the supervision host deadlocking and re-announcing handed-back closes

Two defects in this branch's handling-successor changes surfaced as the
"Behavior portable serial 2" shard hanging at its 30-minute limit.

A TERM that lands while the host settles a handled turn's successor handoff
left the host holding the wake-queue and recovery-marker locks; its exit
cleanup then waited forever on the queue lock it still owned. The cleanup now
releases those locks if this process owns them before releasing its grant.

When an accepted close turns main-only at its turn, the host hands it back and
leaves the successor running, but republished the episode as pending
downtime, so that successor re-announced the same close and exited. The
handback now republishes the episode as already announced; a later durable
append still opens a pending episode the successor recovers.

* no-mistakes(test): Park on successor after handling settlement failure

* no-mistakes(test): Use tab-delimited handled-settlement failure logs

---------

Co-authored-by: Caleb LeNoir <calebl@users.noreply.github.com>

* fix(bin): preserve accents in pending-reply summaries (kunchenguid#7618)

* fix(bin): keep accented letters in pending-reply request summaries

fm_pending_reply_summarize deleted every byte outside printable ASCII, so a Portuguese summary lost its accents: "não faça a correção" was stored as "no faa a correo". It now removes control characters only. The 120-character cap counts UTF-8 characters from lead bytes, so it never splits a letter under any caller locale, including the C locale.

* no-mistakes(document): Documentar preservação de acentos nos resumos

---------

Co-authored-by: Alexandre Custodio <alexandre.custodio@soraschools.com>

* feat: add OpenRouter support for typed dispatch resolution (kunchenguid#7149)

* Add explicit OpenRouter Jev dispatch resolution

* no-mistakes(document): Clarify dispatch documentation and remove stale duplicates

* chore: exclude local Stele binding from PR

* no-mistakes(document): Correct dispatch help and never-send documentation

* ci: retrigger CI after a timed-out test shard

* no-mistakes(document): Correct dispatch architecture documentation ownership

* feat(bin): publish lane capacity facts with beat pressure and keyed limits (kunchenguid#6983)

Opt-in: fm-watch.sh publishes state/lane-capacity.json via bin/fm-capacity.sh --publish only while config/lane-capacity exists; adds beat pressure and keyed limits to fm-capacity.sh. Unconfigured fm-capacity output unchanged.

* fix(bin): propagate contribution input assembly failures (kunchenguid#5359)

* fix(bin): transport contribution-input JSON through slurpfile, not argjson

bin/fm-fleet-snapshot.sh --contribution-input passed the full backlog and
task-record JSON to jq through --argjson. A single --argjson argument is
capped by the kernel's MAX_ARG_STRLEN (131072 bytes on Linux), so a large
enough backlog made the kernel refuse to exec jq while the script still
exited 0 with a broken result.

Transport both documents through temporary files and --slurpfile, matching
the pattern the default snapshot path already uses, and propagate a
non-zero exit when that jq invocation fails.

Fixes kunchenguid#5349

* test: narrow contribution-input regression to final assembly failure

The ARG_MAX transport is already fixed on main by kunchenguid#6830, so keep only the regression proving a failing final jq assembly exits non-zero.

* fix: correct Rex secondmate grouping and lifecycle (kunchenguid#7656)

* Fix Rex secondmate session lifecycle

* no-mistakes(review): Retire Rex secondmate sessions under the owning home identity

* no-mistakes(review): Limit Rex FM_ROOT label override to secondmate launches

* no-mistakes(document): Clarify Rex secondmate grouping and lifecycle documentation

* feat(opencode): add OpenCode 2 support with version-gated launch, plugins, and exit (kunchenguid#7336)

* feat(opencode): add OpenCode 2 support with version-gated launch and plugins

OpenCode 2 dropped the v1 server-plugin hook API, so the five fm.primary.*
plugins now export a default definition with an id and a setup function
alongside their legacy OpenCode 1 server export, backed by a new shared
lib/fm-opencode2.js helper; the turn-end guard, watch-arm, cd-check,
pretool-check, and sessionstart-nudge install their behavior from setup(ctx)
on OpenCode 2 and keep the server entrypoint for OpenCode 1.

fm-spawn probes the resolved opencode executable's --version once and branches
the launch, model flag, reasoning config, exit key, and busy-state plugin off
the detected major. A parsed major >= 2 takes the OpenCode 2 shape (no --model,
the model pinned through OPENCODE_CONFIG_CONTENT, a raw Ctrl-C exit, the
session.execution.* busy plugin); OpenCode 1.x and any undetected or
unparseable version fall back to the 1.x shape (--model, 1.x config, /exit)
everywhere. The worker busy-state plugin is always provisioned, but OpenCode 1
keeps the pre-port session.status/session.idle plugin so its busy-state wiring
is unchanged, and only a major >= 2 gets the session.execution plugin. Adapter
and supervision docs, OpenCode 2 live fixtures, and regression tests for the
unknown->1.x launch path and the version-gated busy-plugin shape are included.

* no-mistakes(review): gate OpenCode 2 busy plugin turn-end touch on notifyTurnEnd

* feat(opencode): launch detected OpenCode 2 workers with --standalone

OpenCode 2's default launch attaches to the shared background service, which
hosts plugins with the service's environment and ignores the pane's
OPENCODE_CONFIG_CONTENT. A private server keeps per-worker model, permissions,
FM_HOME, and lock ancestry correct. 1.x and undetected versions are unchanged.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* fix(opencode): resolve the OpenCode 2 project location and treat every terminal turn as a turn end

OpenCode 2.0.x hands plugins the project only as ctx.location.project.directory
and takes ctx.session.prompt({ sessionID, text }), so the V2 setup path never
found its root or delivered a prompt. Interrupted and failed turns now end a
turn like a succeeded one, while a server shutdown does not.

Ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* test(opencode): add a token-free OpenCode 2 native plugin fixture to the live e2e

A private opencode serve plus a loopback provider proves the five primary
plugins load and act on OpenCode 2: startup nudge, cd and watcher-redirection
guards, turn-end guard, watcher arming across succeeded, interrupted, and
failed turns. The fixture declares the complete model capabilities object,
which OpenCode 2.0.11 requires and 2.0.22 accepts. FM_OPENCODE_LIVE_BINS runs
it across several OpenCode 2 executables. The credentialed half now picks its
run flags and session tables by detected major, so it keeps working on 1.x.

Fixture ported from kunchenguid#5143.

Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>

* feat(opencode): send one Enter when an OpenCode 2 launch leaves the brief unsent

OpenCode 2.0.11 prefills the --prompt brief without submitting it, while 2.0.22 submits it.
After launch, fm-spawn waits for the worker's busy-state plugin to report the turn start, sends one Enter only if it has not started and the composer is not empty, and fails the spawn if the turn never starts.

* docs(opencode): document the OpenCode 2 launch, delivery gate, and standalone primary homes

Records the 2.0.11 and 2.0.22 live evidence for the native plugin fixture and the post-launch brief delivery gate.

* no-mistakes(review): Trim OpenCode 2 adapter shapes and harden Ctrl-C exit

* no-mistakes(review): Record OpenCode 2 live seatbelt and exit evidence

* no-mistakes(test): Document OpenCode 2.0.22 wide-pane sidebar exit refusal limitation

* no-mistakes(document): Refresh OpenCode 2 exit-key and seatbelt payload docs

* test(opencode): verify OpenCode 1.x live with the dual-export plugins

Pin the live e2e TUI panes to the resolved opencode executable, and record
OpenCode 1.15.7, 1.18.20, and 1.18.31 evidence for plugin loading, the
turn-end guard, watcher continuity, and 1.x worker launch and exit.

* no-mistakes(review): Defer OpenCode 2 Enter on unknown composer; widen turn-end docs

* no-mistakes(document): Document OpenCode 2 delivery gate unknown-composer test outcomes

---------

Co-authored-by: Niranjan <nniranc@gmail.com>
Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(bin): resolve the tmux container from firstmate's own session, not the most recent group member (kunchenguid#7662)

* fix(bin): resolve the tmux container from the caller's own session, not the most recent group member

* no-mistakes(test): Fall back when the $TMUX session id is stale

* no-mistakes(document): Document tmux container choice under grouped sessions

* fix(bin): read a fully dim Cursor idle placeholder as an empty composer (kunchenguid#7647)

* fix(bin): read a fully dim Cursor placeholder as an empty composer

cursor-agent 2026.10.19 draws the composer glyph and its idle placeholder
as one SGR 2 run with no reverse-video cell, so ghost stripping empties the
row and the empty-content guard returned unknown. Relaunch and exit then
refused on every idle Cursor pane on tmux.

When a styled bare row strips to empty and the plain row is an agent glyph
followed by an anchored idle placeholder, read it empty. Bright typed text,
other dim text, and unstyled rows keep their existing verdicts.

Fixes kunchenguid#7413

* docs(verification): record the fully dim Cursor placeholder verdict and refresh command

* fix(bin): say why away-mode inject deferred and pin named Claude idle composer as empty (kunchenguid#6163)

* fix(bin): recognize a named Claude session's titled composer rule on cursorless backends

`claude -n <name>` right-aligns the session name in the rule above the
composer. Cursorless backends (Herdr) accepted only solid rules, so the
scan saw the lower rule alone, the idle composer read `unknown`, and
away-mode delivery to a named Claude primary deferred until return.

A rule carrying one right-aligned title now opens a separator pair. It
never closes one, the pair it opens counts only over an agent-glyph row,
and it is never a valid Pi pair, so Pi's verdict is unchanged.

The away-mode composer deferral now names which refusal it was:
unsubmitted text, or no composer shape recognized.

* no-mistakes(review): Reword composer deferral reason to cover busy harness

* no-mistakes(ci): ci-3 (Greptile, user chose to fix): The rule that must always hold is that Claude's titled opening rule is accepted for any non-empty session name that doesn't start with a space and doesn't contain the rule glyph `─`, including a multiword name. The only place that check lives is the title `case` in `_fm_composer_titled_rule_row` (bin/fm-composer-lib.sh). It now reads `case "$title" in ''|' '*|*─*) return 1 ;; esac`, as the user asked, and the comment above the function mentions multiword titles. I added regression fixtures to `test_matrix_claude_named_session_titled_rule` in tests/fm-composer-lib.test.sh, next to the existing single-word `Andrew` cases. They use the title `Andrew Chen` and check that an idle composer on herdr reads `empty` and a composer with typed text reads `pending`. Something you should know: the old pattern already accepted a title with a space in the middle. It only rejected a title ending in a space. So the new multiword fixtures also pass against the old code, and the bot's failure scenario did not actually happen for "Andrew Chen". What the fix really changes is that it drops the trailing-space rejection, as instructed. Checks run: tests/fm-composer-lib.test.sh and tests/fm-composer-ghost.test.sh both pass (exit 0, no failures), and `shellcheck -x` is clean on both changed files

* no-mistakes(review): Match unnamed-ghost fixture rule width to the partner rule

* fix: use managed-compatible worker approval modes

* no-mistakes(document): update codex and claude worker approval mode docs

* no-mistakes(ci): Fixed two test files that weren't updated when the PR changed the default claude permission mode from `--dangerously-skip-permissions` (bypass) to `--permission-mode auto`. Changes: - `tests/fm-claude-trust.test.sh` lines 664 and 696: updated two `assert_grep` assertions from `claude --dangerously-skip-permissions` → `claude --permission-mode auto` - `tests/fm-backend-orca.test.sh` line 568: updated one `assert_contains` assertion from `claude --dangerously-skip-permissions` → `claude --permission-mode auto` Both tests now pass locally (orca: exit=0, backend-dispatch/claude-trust: exit=0)

* fix: remove stray scratch directories from tests/

tests/.tmp-managed-approvals-test.bBuGhY/ and tests/.tmp-managed-approvals2.exz2qr/
were accidentally committed as worktree-local scratch dirs and do not belong in the repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: preserve bypass defaults with persistent managed approval failover

* no-mistakes(review): fix approve-for-me fixture and bypass diagnostic messages

* no-mistakes(review): restore absent-Claude-default test and fix pass messages

* fix: recognize managed Codex approval prompts in the C locale

* no-mistakes(review): Fix managed approval failover bounds, authorization, inheritance, and capture

* Simplify managed approval recovery to persistent explicit failover

* no-mistakes(review): Guard failover authorization and unlink staging before recovery

* no-mistakes(document): Correct managed approval documentation and consolidate owner references

* no-mistakes(document): Correct managed-approval references and stale hook guarantees

* fix: require approval and inherit managed modes from primary

* no-mistakes(document): Clarify live hook verification scope

* no-mistakes(review): Remove dead approval_configured key from relaunch metadata

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Caleb LeNoir <caleb.lenoir@constructease.com>
Co-authored-by: Caleb LeNoir <calebl@users.noreply.github.com>
Co-authored-by: Alexandre Custodio <xandy.alexandrec@gmail.com>
Co-authored-by: Alexandre Custodio <alexandre.custodio@soraschools.com>
Co-authored-by: Pedro Guimarães <21346846+0x7067@users.noreply.github.com>
Co-authored-by: Konner Moshier <39997550+Moshik21@users.noreply.github.com>
Co-authored-by: Oscar Santis Brante <49914973+osantis@users.noreply.github.com>
Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
Co-authored-by: Kostadin Pop-Kochev <kostadin.popkocev@gmail.com>
Co-authored-by: Niranjan <nniranc@gmail.com>
Co-authored-by: Girik Bajaj <bajajgirik2010@gmail.com>
Co-authored-by: Tomas Perez <71987424+tomasperezcoscia@users.noreply.github.com>
Co-authored-by: Cameron Aragon <69489633+camaragon@users.noreply.github.com>
Co-authored-by: Brian <bthome@users.noreply.github.com>
…ounter loss (kunchenguid#6467)

* fix: notify handling successors about newer inbox wakes

* no-mistakes(document): Document handling-successor inbox regression in watcher coverage list

* no-mistakes(ci): Fixed Greptile P1 (comment 4172295712): a handling successor could miss a new inbox wake when `.wake-queue.seq` was missing or malformed. What must always hold: a row added after the successor took its snapshot must be announced and must never be consumed by an older acknowledgement. Two places were breaking this: 1. `bin/fm-watch.sh`: the successor only recorded the highest inherited sequence number. If the counter was reset, a new row could get a number at or below that and be treated as already covered. This now stays silent forever once the inherited rows are acknowledged and the queue drains. 2. `bin/fm-wake-lib.sh` `fm_wake_append_locked`: a reset counter reused the sequence number of a row still in the queue. The predecessor's pending `--ack-through` consumes rows by sequence number, so it deleted the new row before anyone handled it. This was a gap in the existing allocator, and it is what made the before-ack cases fail even after fix 1. Fixes: - Watcher: the successor now snapshots the inherited rows themselves instead of their highest sequence. On each poll it announces if any queued row is not in that snapshot. It still never consumes rows, and inherited rows alone stay silent. - Allocator: the next sequence is now one more than the larger of the counter and the highest sequence still queued, so a new row can't land inside an outstanding acknowledgement's range. - `docs/watcher-continuity.md`: the paragraph and coverage list are updated to match. Tests: `test_append_wakes_handling_successor` in `tests/fm-watch-arm.test.sh` now inherits two rows and takes a counter state (intact, missing, malformed). The four new cases are after-ack and before-ack with a missing or malformed counter, and they run real watcher, arm and drain processes. In after-ack the queue is fully drained before the new append. Evidence: - Before any production change (on 92c724d), all four new cases failed: "not ok - handling successor stranded the second inbox wake" for after-ack and before-ack. - With only the watcher fix, the after-ack cases passed and the before-ack cases still failed, which shows the allocator fix is needed. - With both fixes, all four pass. Full results: `fm-watch-arm` 36/36 (including the intact after-ack and before-ack cases, so ordinary silence and fresh-beacon delivery still hold), `fm-watch-recovery-loop` 2/2, `fm-inbox` 16/16, `fm-pi-watch-extension` 60/60, `fm-wake-queue` 67/67, and all four `fm-wake-drain-*` suites passed (9, 9, 18, 14). Canonical `bin/fm-lint.sh` with `PATH=/home/nino/.local/bin:$PATH` passed: ShellCheck clean, actionlint 1.7.12, 3 workflows valid. That lint run was in local changed-file mode with ShellCheck source following disabled. In a first run of all nine suites in parallel, `fm-wake-queue` failed on "presentation lock delayed the drain for 10s" and one `fm-pi-watch-extension` timing test failed. Both passed in full when rerun on their own, so I read that as load contention, not this change. Design decision to flag: the allocator change sits in the shared wake library, so it goes beyond the watcher comparison the bot pointed at. It is a one-expression change, and the before-ack tests can't pass without it, because otherwise the predecessor's acknowledgement deletes the new message. Not done, per the phase boundary: nothing committed, pushed or posted, and the live fleet was not touched. Evidence logs are in /tmp/fmci, not in a pipeline logs/evidence directory

* no-mistakes(ci): Fixed both Greptile findings on PR kunchenguid#6467. Nothing was committed, pushed or posted, and the live fleet was not touched. **ci-1 (4172409813): a new wake was mistaken for an inherited one.** - Invariant that must hold: a successor treats a row as covered only if it is an unchanged inherited row in the inherited recovery episode. - Cause: after the predecessor's acknowledgement and a lost counter, a re-append with the same kind, key, payload and epoch was byte-identical to the snapshot row, so the successor stayed silent. - Fix (`bin/fm-watch.sh`): I used the existing recovery generation rather than a new identity scheme. Any append after an acknowledgement mints a new generation. The successor records the generation with its row snapshot, under the queue lock and in arm-check's lock order. Each poll counts the queue as newer if a row is not in the snapshot, or if the queue is non-empty and the generation changed. The existing arm-check then decides whether to announce. No rows are consumed, and inherited rows alone stay silent. - The row snapshot is still needed for before-ack, because an append before the acknowledgement keeps the same generation. **ci-2 (4172409821): large sequence numbers became unusable.** - Invariant that must hold: sequence numbers are always exact digit-only decimals. - Fix (`bin/fm-wake-lib.sh`): the allocator picks the largest of the counter and the queued sequences by comparing decimal text (length, then string order, leading zeros stripped), then adds 1 in bash with `$((10#$seq + 1))`. This restores the 64-bit exactness of the original bash counter. - Same fix at two places in `bin/fm-wake-drain.sh` that print sequences: `presented_max_row` and `ACK_THROUGH` print the matched text instead of `max + 0`. **Tests** - `tests/fm-watch-arm.test.sh`: two new `identical` cases, after-ack with a missing and with a malformed counter. A fake `date` pins the epoch, and the test asserts the row is byte-identical, then checks timely notification, preservation until its own acknowledgement, and no repeat notification. - `tests/fm-wake-queue.test.sh`: new `test_large_sequences_stay_exact_decimal_identifiers` starts from 2147483647, 9007199254740991 and 9223372036854775806, each with an intact, missing and malformed counter. It checks the next sequence is exact and digit-only. For the first two it also checks a real drain shows both rows, names the exact acknowledgement sequence, and acknowledging empties the queue. - `docs/watcher-continuity.md` now describes the generation check. **Evidence** (in `/home/nino/.no-mistakes/evidence/01M40CDTX2000A5TFFRZN27YFR/ci-round3/`) - Before, on 050a5fc: both identical cases failed with "handling successor stranded the second inbox wake (after-ack)". The large-sequence test failed with "advanced to '9223372036854775808', not 9223372036854775807". - After the fix, all three pass (`after-*.log`). - All nine suites passed, each run on its own, all with 0 not ok (`final-results.txt`): `fm-wake-queue` 68/68, `fm-watch-arm` 38/38, `fm-watch-recovery-loop` 2/2, `fm-inbox` 16/16, `fm-pi-watch-extension` 60/60, `fm-wake-drain-open-decisions-cursor` 9/9, `fm-wake-drain-open-decisions` 9/9, `fm-wake-drain-outcome-backstop` 18/18, `fm-wake-drain-unread-status` 14/14. - `bin/fm-lint.sh` with `PATH=/home/nino/.local/bin:$PATH` passes: ShellCheck clean, actionlint 1.7.12, 3 workflows valid (local changed-file mode). **Not run** - The only OpenCode suite is an opt-in live test, so I did not run it. **Limits** - The 2.14748e+09 symptom doesn't reproduce with the awks here (gawk, mawk 1.3.4, busybox). The failure reproduced locally is the precision loss at 64-bit values. - The drain's awk comparisons are only exact up to 2^53. That predates this PR and I left it alone, so the drain test stops at 2^53

* no-mistakes(document): Reattach successor poll-loop sentence to its subject
… directory is removed (kunchenguid#7685)

* fix(tests): bound lock waits on removed dirs and reap fixture-root processes

A lock wait spun every 0.1s forever once its directory was removed, so a
watcher or reconcile scan of a deleted test home never reached its own
home-gone exit. fm_lock_acquire_wait now returns within 0.2s once the
lock's parent directory is gone.

Test teardown now signals every process naming the exact fixture root
(TERM, then KILL) before removing it, in both fm_test_cleanup and the
orphan sweep. The supervision-host fake harness sessions stop once their
home is gone or the suite pid has died, so a hard-killed runner no longer
leaves them polling under init.

Fixes kunchenguid#7672

* fix(tests): bound the session-lock concurrency barrier

Forty workers polled a find pipeline every 0.01s to wait for each other,
so the barrier alone launched thousands of processes a second, and once a
stopped run removed the barrier directory the workers polled forever under
init. Count entries with a builtin glob every 0.05s, and end the wait once
the directory is gone, the suite has died, or the stub block bound passes.

Refs kunchenguid#7672
* fix(bin): admit listed review-bot comments as contribution signals

* no-mistakes(review): Persist review-bot config in contribution check shim

* no-mistakes(review): Classify allowlisted collaborators as review bots

* no-mistakes(document): Document review-bot contribution signals

* no-mistakes(review): Preserve review-bot config and re-raise classification

* no-mistakes(review): Prevent acknowledged bot signals replaying after allowlist changes

* no-mistakes(document): Document configurable review-bot contribution watching

* no-mistakes(document): Clarify review-bot thread documentation

* fix(bin): make review-bot contribution watching opt-in

* docs(bin): state review-bot allowlist has no built-in default

* no-mistakes(document): Document per-home review-bot configuration

---------

Co-authored-by: Caleb LeNoir <calebl@users.noreply.github.com>
…unchenguid#7674)

The generated Waiting section told workers to wait on a heavy-test slot that nothing in the repository defines. Remove the phrase and assert that a brief generated with config/wait-no-turns does not name one.
…7675)

* fix(bin): read the no_ci ci-monitor marker as no-checks instead of validating

Fixes kunchenguid#7644

* no-mistakes(document): Rewrap nm_ci_checks_state no_ci comment
…unchenguid#7683)

* feat: add opt-in restricted permissions for Codex workers

* no-mistakes(review): Document restricted Codex network and git approval limits
… scripts (kunchenguid#7699)

* fix(test): keep serial packing at-budget when a script has no hint

tests/fm-approval-failover.test.sh landed without a serial duration hint,
so the at-budget packing fixture overflowed by 1040ms. Record a measured
5410ms hint and give the fixture its own complete hint table so unmeasured
defaults cannot join the boundary shard.

Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>

* docs: note the local approval-failover packing hint

Record the 5410 ms provisional local sample for the next CI refresh,
and describe the packing-boundary fixture as independent of unhinted
scripts.

Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
* fix: terminate steering inbox records with newline

* no-mistakes(ci): Fixed Greptile P2 by updating the shared generated `INBOX_SECTION` in `bin/fm-brief.sh`, which is the single guidance source consumed by ship, scout, and secondmate scaffolds. The guidance now tells workers to prefer `fm_task_inbox_body`, explains that `body-terminator=1` marks exactly one synthetic record-termination newline that is not logical body content, and says to remove only that marked terminator while preserving intentional trailing newlines and legacy EOF bodies. Added generated-brief behavioral coverage for all three scaffold paths in `tests/fm-brief.test.sh`. Verified with `./tests/fm-brief.test.sh && bash ./tests/fm-task-inbox.test.sh`
* fix(bin): make fm-send.sh --help print usage before FM_HOME resolution

* fix: parse list-form Lavish results without dropping answers (#5404)

* fix(bin): parse Lavish list-form results and refuse unparsed blocks

Lavish emits its queued prompts in TOON list form instead of table form as
soon as the items stop being uniform, for example when some annotations carry
a nested target object or a message carries an attachments table. The adapter
only recognized the table header, so read reported a complete, empty result
and answers closed nothing.

Move the result parsing into one shared reader used by read, answers, and
reconciles that accepts both forms, keeps only column-zero headers, skips
nested structures only beneath the field that opened them, and counts
anything it cannot account for as malformed. An unrecognized header naming
the block is now malformed rather than an empty result, answers and
reconciles exit nonzero when the result is not fully accounted for, and the
queued-content check treats a list header as content.

Refs #4726

* no-mistakes(document): Document Lavish capture formats and incomplete-result handling

* test: expect captain_message_count for the open-board list-form capture

* fix: correct Pi wake ownership and processing-turn handling (#5835)

* fix(pi): let the supervision branch claim Orca stale wakes

The watcher keys Orca endpoints by terminal=, but the branch dispatcher
only indexed window=, so every Orca stale row vetoed the wake scan and
went to main. Index both endpoint fields.

Local hotfix ahead of upstream; refs kunchenguid/firstmate#5623.

* test(pi): cover terminal-keyed Orca stale rows in branch dispatch

Pins the terminal= endpoint lookup: a terminal-keyed stale row queued with
another eligible row must resolve to its task in both routine and heartbeat
scans, instead of vetoing the wake to main.

* no-mistakes(document): Update supervision dispatch doc for Orca terminal-keyed stale rows

* fix(pi): reject conflicting wake endpoint ownership

Index task keys and window/terminal aliases through one ownership check.
Ambiguous records must leave the wake on MAIN instead of selecting the
last task and possibly bypassing another owner's open decision.

Cover duplicate terminals and collisions with window and task keys in
both record orders while preserving unique terminal routing.

* no-mistakes(document): Document conflicting alias ownership as scope corruption

* fix(pi): retain ownership claims from incomplete task records

Check endpoint and task alias ownership before project eligibility so a
projectless record cannot lose its open decision to another terminal owner.
Require project context before decision filtering can grant routing scope.

Cover missing and empty project fields in both record orders, and preserve
refusal for a uniquely mapped terminal without project context.

* no-mistakes(review): Fix canonical routing ownership and custom SDK event handling

* no-mistakes(review): Preserve dedicated custom processing run ownership

* no-mistakes(document): Clarify Pi event handling and fail-closed routing documentation

* feat(bin): add a forge=external review rail that never pushes task branches (#7368)

* feat(bin): add a forge=external review rail that never pushes task branches

A project whose review tool uploads its own snapshot of the worker's local
commits can now be registered [direct-PR forge=external]. Workers on such a
project never need to push a branch to publish, and must never push a task
branch to the shared origin.

- fm-project-mode.sh: external joins the closed forge set; never detected,
  refused on local-only, and +yolo reports yolo=off with a refusal.
- fm-dod-lib.sh: external ships direct-PR only; its first rule forbids origin
  and task-prefixed pushes, its Definition of done renders the home's
  config/external-review.md adapter verbatim, and the ready-report gate
  accepts `done: review <url> uploaded for review` on the URL alone or, with a
  recorded backup remote, once HEAD is on the backup namespace.
- fm-git-push-guard.sh (new): per-task pre-push guard refusing pushes to
  origin or a URL matching origin's, task-branch and task-prefixed refs on any
  remote, and refs outside the backup prefix on the backup remote.
- fm-git-strip-ai-trailers.sh: install gains --push-guard and --no-strip.
- fm-spawn.sh: refuses yolo, a missing adapter, and an unusable backup
  remote before launch; installs the guard even under keep-ai-trailers; and
  records forge=external, backup_remote=, and backup_prefix=.
- fm-review-check.sh (new): records review= and review_head= with no merge
  watch, and publishes the child's ready line in a secondmate home.
- fm-promote.sh refuses promotion onto forge=external, because a scout
  launches without the guard.
- Docs: docs/external-review-forge.md (design), configuration.md's new
  "External review tool" section, scripts.md, and the ship-landing and
  project-management skills.

* no-mistakes(review): Drop string-grep hook assertion from external-review spawn test

* no-mistakes(document): Note forge=external contract token and direct-PR-only composition

* test(pi): Lauf ohne prompt in before_agent_start festnageln (#7387)

Ein Lauf, den sendCustomMessage startet, traegt eine Custom-Nachricht und
keinen prompt. Das Lesen des prompt an dieser Stelle warf, womit jeder
solche Lauf mit einem Fehler auftauchte statt zu starten.

Die Verengung dagegen steht seit 8c9c67de im Zweig, ein Test, der sie
benennt, fehlte: die einzige Abdeckung lag beilaeufig in einem
Abbruch-Fall der Abwesenheits-Haltung und verschwindet mit ihm. Der neue
Fall erweitert den bestehenden Mirror-Test und prueft, dass ein solcher
Lauf weder wirft noch als Dialog gespiegelt wird.

Gegenprobe: ohne die Verengung wirft genau dieser Fall mit
"Cannot read properties of undefined (reading 'trim')".

Co-authored-by: thelad-dev <ladwein@firstmate.bost8.thelad.loc>

* fix(bin): stop tmux target checks reporting gone windows as alive (#7409)

* fix(tmux): verify exact endpoint membership

* fix(tmux): preserve exact target forms

* test(tmux): align endpoint fixture lifecycles

* test(tmux): guard isolated cleanup and shell reader

* no-mistakes(review): Limit tmux .pane target split to window indexes

* fix(composer): prove opencode 1.19 de-emphasised mode footer from the plain row (#7395)

* fix(bin): stop misreading opencode's own footer as pending composer text

An idle OpenCode composer classified as `pending`, and that verdict gates every
typed-plane action firstmate owns: fm-send skips the doorbell, and fm-control
refuses both relaunch and exit. A firstmate operator lost a full session to it and
had to type into worker panes by hand three times.

Root cause: opencode 1.19 draws the mode/model footer's identifying cells
de-emphasised (mode word RGB 67;133;190, middle-dot separators 111;110;105,
luminances ~119.8 and ~109.7, both under fm_composer_strip_ghost's 128
threshold). That helper exists to answer "what did the human type?", so it
deleted exactly the cells that identify the footer. The `^(Build|Plan)` anchor
then became unreachable on every styled backend - tmux, Herdr, and Zellij - not
just one pane, because the unstyled row keeps its styling bytes everywhere.

The fix proves the footer from both forms of that row: the ghost-stripped
content and the ANSI-stripped plain row. Proving it on the form ghost stripping
cannot reach is the whole repair.

What makes that safe, and why the previous argument was not: the earlier draft
argued safety by noting that on a plain capture the two forms collapse to one
string, so the verdict is unchanged. That is true and carries no weight, because
styled=0 is the only configuration where the new proof does nothing. The
exemption is safe because a row reaches the plain form only when the
ghost-stripped row still fails the pattern, which means the stripped content is
non-empty while its own leading Build/Plan cell was deleted as ghost. Nothing
opencode draws de-emphasises a typed row's leading cells - only its furniture is
drawn dimmed - so the only rows the plain form admits beyond the stripped one
are de-emphasised furniture, and the mode footer is the only furniture opencode
draws that opens with a mode word. That is self-confirming rather than asserted,
and it is the argument to recheck when a new opencode release moves a colour.

A review also caught a second change riding along in the same diff: the footer
pattern had been widened from `[[:space:]]+` to `[[:space:]]*`, admitting
`Build ·x` and a bare `Build ·`. Both read as more typeable than the footer, so
they moved the verdict in exactly the direction this rule exists to prevent. No
recorded opencode footer ends at the dot, so the original `+` matches every real
capture and the widening is reverted.

Verification:
- fm-lint.sh exit 0 on pinned shellcheck 0.11.0 and actionlint 1.7.12.
- fm-doc-audience-check.sh ok across 119 surfaces and 757 local links.
- tests/fm-composer-lib.test.sh green via bin/fm-test-run.sh.
- The new regression case fails on exactly one assertion when this change is
  reverted: "opencode 1.19.0 de-emphasised footer row: expected empty, got
  'pending'", which is the reported symptom.
- Confirmed end to end against live panes rather than only fixtures: a real idle
  opencode 1.19.0 worker classified empty after the change and pending before,
  and firstmate reached the worker over the steer channel afterwards.

* no-mistakes(review): fix(bin): apply leftbar footer rule in content extractor; correct cursorless claim

* no-mistakes(document): document opencode 1.19 footer furniture and extractor coverage

* no-mistakes(document): document ghost-luma knob coupling to opencode footer furniture

* no-mistakes(document): document opencode de-emphasised footer recognition invariant

* no-mistakes(review): fix(docs,bin): correct ghost-luma knob direction, gate plain-row extraction

* no-mistakes(review): fix(docs,bin,tests): correct ghost-luma knob wording, share plain-content helper, cover Herdr/Zellij idle

* no-mistakes(document): narrow overstated backend coverage claim in runtime-backends.md

* no-mistakes(document): document leftbar footer override and opencode 1.19 pointer

* test(send): codex im Tuerklingel-Test hook-frei starten (#7406)

Der Kopf des Tests sagt, jedes Programm werde so gestartet, wie
bin/fm-spawn.sh es startet. Im codex-Zweig von launch_cmd fehlte dabei
--disable hooks, das fm-spawn im crewmate- und scout-Pfad setzt.

Ohne den Schalter parkt codex auf dem Hook-Vertrauensdialog ("N hooks
are new or changed"), dessen Auswahl auf "Review hooks" aufsetzt und der
mit der Tastenebene dieses Werkzeugs nicht beantwortbar ist. Der Lauf
meldet dann die Tuerklingel als nicht befolgt, obwohl er ueber die
Tuerklingel gar nichts ausgesagt hat - und das auf jedem Checkout, weil
schon die projekteigene .codex/hooks.json den Dialog aufzieht.

Dazu eine knappe Zusicherung am Startrezept, damit der Schalter beim
naechsten Umbau nicht wieder still ausfaellt.

Co-authored-by: ladwein <ladwein@firstmate.bost8.thelad.loc>

* fix(bin): store only classified review fields in contribution records (#7096)

* fix(bin): store only classified review fields in contribution records

A pull observation stored GitHub's raw reviews payload, so a PR with a few
hundred reviews wrote a record past the 1 MiB read cap and every pending,
verdict and ack read then refused the whole home. Project each stored review
to id, state, submitted_at, commit_id and user.login, the only fields the
classifier reads, and add a many-review regression.

* no-mistakes(document): clarify contribution record read cap in script header

* fix: handle Pi 1.1 and 1.2 supervision events correctly (#7216)

* fix(pi): retain custom-event handling and processing cancellation

* fix(pi): identify custom triggers before legacy prompt narrowing

* no-mistakes(test): Correct branch fixture retirement and verify real notification ownership

* no-mistakes(document): Clarify Pi event boundaries and verification scope

* fix(pi): retain custom-event handling and processing cancellation

* fix(pi): identify custom triggers before legacy prompt narrowing

* no-mistakes(test): Correct branch fixture retirement and verify real notification ownership

* no-mistakes(document): Clarify Pi event boundaries and verification scope

* no-mistakes(review): Fix SDK1.1 prompt staging and verify branch context

* no-mistakes(document): Clarify SDK prompt compatibility and branch-context verification

* no-mistakes(test): Require dual-SDK compiler checks; execution remains pending

* no-mistakes(document): Correct SDK typecheck documentation and stale dependency claims

* no-mistakes(document): Correct stale Pi typecheck documentation and ownership pointers

* no-mistakes(ci): Fixed SC2329 in tests/fm-pi-primary-types.test.sh by inlining EXIT cleanup. Also fixed a reproduced macOS npm-prefix/lockfile path failure without changing dependency pins or assertions. Canonical targeted lint, strict TypeScript 5.9.3 checks against Pi 1.1.0 and 1.2.0, and success/failure cleanup checks pass. Both behavior-shard failures were upstream npm ETARGET errors in workflow steps unchanged from base; no workflow/runtime changes warranted. Hosted CI remains for the outer executor

* fix(test): reconcile queued processing probes after rebase

* no-mistakes(document): Correct Pi compiler-phase documentation and stale CI comments

* fix(bin): verify cursor launch binaries with a bounded probe (#6380)

* fix(cursor): verify cursor-agent by running it, not by name

Cursor's installer writes its `cursor` IDE shim through the
~/.local/bin/cursor -> cursor-agent symlink, which can replace a versioned
cursor-agent with a script that only prints "No Cursor IDE installation
found" and exits non-zero. That file keeps Cursor's own name and install-tree
path, so the name shortcut (and the structural check alone) accepted it and
every Cursor spawn launched the broken file instead of the working agent alias.

A launch candidate now has to print Cursor's CLI identity under the bounded
probe, or carry the structural evidence and run --help successfully. Hosts
without a bounded runner keep the structural verdict, as before.

* no-mistakes(document): Align cursor launch-verify docs with runtime

* no-mistakes: apply CI fixes

* test: restore fm-watch-triage ack_stopped_cycle assertion

The CI fix round loosened ack_stopped_cycle so a drain that prints no
acknowledgement command and exits zero counts as success. That test is
unrelated to the Cursor executable verification this branch changes, so
restore its original assertion rather than mask a watcher failure here.

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* fix(bin): restore fm-afk-contract clock sampling

A CI fix round changed how fm_afk_contract_cmd_enter samples its epoch.
That away-mode behavior is unrelated to the Cursor executable verification
this branch changes, so restore it here and leave any fix to its own change.

* fix(cursor): load the timeout library only when a probe runs

Sourcing bin/fm-timeout-lib.sh at load time made every consumer of
fm-cursor-lib.sh, including the session-lock and turn-end hook paths that
never probe, depend on that file being next to it. Load it lazily from the
probe instead.

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* test: restore herdr focus-flash e2e test

A CI fix round edited this Herdr end-to-end test, which is unrelated to the
Cursor executable verification this branch changes. Restore it here and leave
any fix to its own change.

---------

Co-authored-by: ladwein <ladwein@firstmate.bost8.thelad.loc>

* fix: require actual PR references in CI-ready ship notes (#7422)

* fix(dod): require a PR reference in CI-ready notes

* no-mistakes(review): Recognize Forgejo plural pull request URLs

* feat(herdr): opt-in project groups with status tags and a sorted agents view (#7434)

* feat(herdr): opt-in project groups with status tags and a sorted agents view

Add config/herdr-project-groups (absent or off: unchanged behavior). When on,
Firstmate tags each Herdr task pane, and its own projected workspace, with
display-only fm_group/fm_state/fm_task/fm_sort tokens, sets a Herdr agents
view sorted by group then status (needs-captain, problem, running, done), and
places a new projected task at the end of its own group inside the parent
block with the same single verified move as before.

The watcher reconciles tags once per poll and a spawn tags its task at once;
bin/fm-herdr-groups.sh also previews (plan), clears, and prints or appends
suggested sidebar rows with a backup. The agents view helper needs python3.
The only test-runner change is the serial weight hint for the new suite.

* docs(herdr): record the live lab check of project groups

The four hand checks for tags, the sorted agents view, placement at the
end of the group, and clear passed against a real Herdr 0.9.5 server
(protocol 22) in a guarded lab session.

* docs(herdr): align project group verification notes with the live check

* fix(bin): pin LC_ALL=C for remote job process identity reads (#7410)

ps -o lstart= renders in the caller's locale, so a lock or claim owner
recorded under one locale (de_DE renders "Di Okt 13 ...") failed identity
verification under another, was declared dead, and a second worker split
the queue: two serve loops reclaimed and reaped each other's live jobs,
which vanished mid-claim and failed staged jobs with exit 125 and no
output. Pin LC_ALL=C in fm_remote_job_process_start and pin the
cross-locale invariant with a regression test.

Co-authored-by: researchworldwide2026 <researchworldwide2026@gmail.com>

* fix(opencode): ignore child stdin EPIPE in guard and encoder (#7447)

* fix(bin): ignore crew state overrides for other tasks (#5881)

* Guard fm-crew-state overrides by task-name basename

bin/fm-crew-state.sh honours FM_CREW_STATE_META_OVERRIDE and FM_CREW_STATE_STATUS_OVERRIDE only when the override's basename is the requested task's own .meta or .status file name.
An override naming a different task, for example one inherited through a server started inside another task's snapshot child, falls through to the task's own records under the state directory.
A snapshot's own override, which names the task it was captured for, is still honoured.
This is complementary to #5622, which keeps the overrides out of the Herdr server launch: whatever path leaks an override, the reader never trusts one that names a different task.
Regression tests cover a mismatched override being ignored and a matching one being honoured.

* no-mistakes(review): Make metadata override tests behaviorally distinct

* fix(bin): re-anchor a Claude session's lock so /clear keeps ownership (#7415)

* fix(bin): re-anchor a Claude session's lock so /clear keeps ownership

A same-session confirmation over a live lock line 1 outside the current
harness ancestry now rewrites line 1 to the session's CLAUDE_PID anchor
under the claim lock, so a later /clear re-key in the same process is
still proven by ancestry instead of being refused as a foreign owner.

Fixes #6820

* fix(bin): move task leases with a session-lock re-anchor

A same-session re-anchor rewrote lock line 1 off a live pid while task
leases still named that pid, so a lease held by main or the supervision
branch read as stale and the other actor could claim the task. The
re-anchor now takes the lease-command lock after the claim lock and,
in the same critical section as the line-1 write, rewrites leases
recorded against the old pid to the new anchor (fm_lease_rekey_holder).
If the lease-command lock stays busy past a short bound, the
confirmation keeps line 1 as before and a later acquisition re-anchors.

The foreign-owner reproduction now asserts the re-anchor contract: the
same trusted id from a live process outside the owner's ancestry moves
line 1 onto that process's CLAUDE_PID, and a different id is refused
against it afterwards. The ancestry membership loop is shared through
one session-lock lib helper.

The earlier commit dropped the ancestry suite's dead-front-end reclaim
phase; that coverage lives in the existing reclaim tests
(test_verified_reclaim_keeps_new_sidecar and the Stop auto-arm's
test_reclaims_stale_session_lock_before_arming).

* fix(bin): record the lock holder for a lease pinned before a re-anchor

The supervision host pins FM_LEASE_HOLDER_PID to lock line 1 at the
start of each engine turn. A same-session re-anchor inside that turn
moved line 1 to a new pid while the pinned holder stayed alive, so a
later claim or same-actor refresh in the turn recorded the old pid and
the lease read stale, letting main claim the branch's task.

A claim now records the live line 1 when the pinned holder is alive but
is no longer line 1. Another session takes the lock only from a dead
owner, so that state comes from a re-anchor; a dead pin is still
recorded as before and its lease stays stale.

* no-mistakes(review): Move auto-arm rewake session pid with lock re-anchor

* no-mistakes(review): Align startup-network downgrade test and lock-rewrite comment

* no-mistakes(review): Correct lock takeover and re-anchor signal-window comments

* no-mistakes(review): Record re-anchor rewake and pinned-claim verification evidence

* no-mistakes(document): Update network-checks diagnostic for re-anchored lock holder

* feat: support version URLs for watched tool updates (#7449)

* feat(bin): watch a tool's published version through version_url

A watched tool whose CLI never announces its own updates can name a version_url; the document is fetched read-only inside the probe bound, its first dotted number is the published version, and an update is reported when that is newer than the version PATH resolves. Claude Code is the shipped example entry.

* no-mistakes(review): Compare published versions against newest installed tool copy

* no-mistakes(document): Clarify watched-tool version URL documentation

* fix(pi): keep a live session's extension markers when a nested Pi command loads them (#7287)

* fix(pi): keep a live session's extension markers when a nested Pi command loads them

A short-lived Pi command started from inside a live session, such as the
`pi --help` capability probe, auto-loads the two primary extensions. Both
treated the session lock as owned because an ancestor holds it, so the child
rewrote `.pi-watch-extension-loaded` and `.pi-turnend-extension-loaded` with
its own pid and exited. Session start then rejected the markers and printed a
false `PI_WATCH_EXTENSION: not loaded` alarm.

Before writing, each extension now reads the marker's pid and leaves the
marker untouched when that pid is a live strict ancestor of the current
process. A missing marker, a dead pid, the current pid, or a live pid outside
the ancestry still writes as before, so a fresh start and a relaunch over a
dead session bind unchanged. Lock ownership and the reader are untouched.

Fixes #5202.

* fix(tests): drop apostrophes from the nested-load marker heredocs so stock Bash 3.2 parses them

* fix: reclaim orphaned Claude auto-arm claims (#5939)

* fix(bin): supersede an orphaned Claude auto-arm claim after a session restart

An auto-arm claim is open only while its owner still descends from the session-lock pid.
A hook whose session exited mid-cycle stays alive with no parent to receive its exit 2, so deferring to its claim left the home unsupervised until the next session turn.
The replacement session's first Stop now takes the next generation, attaches to the running watcher, and delivers the wake itself, while the orphan goes silent.
A claim with no readable numeric session lock is never open.

* no-mistakes(review): accept pid-1 ancestor and session-id-matched autoarm claims

* no-mistakes(review): pin autoarm session-id claim signal to lock holder pid

* no-mistakes(review): exercise real lock recovery in orphan supersession tests

* no-mistakes(review): record lock-holder pid-identity instead of bare pid

* no-mistakes(document): complete autoarm claim-open coverage list

* no-mistakes(ci): Greptile finding ci-1 (hidden session-lock dependency in bin/fm-wake-lib.sh) fixed. Invariant: every function fm-wake-lib.sh calls must either be defined in that file or explicitly loaded by it before the call, so a caller sourcing only the wake library cannot silently degrade. Violating sites in the changed area: fm_autoarm_claim_open's fm_session_lock_recorded_session_id call, and the sibling writer fm_autoarm_claim_next's fm_session_lock_trusted_session_id call (which would otherwise silently omit the two new ledger fields). Both fixed at one shared boundary: a new lazy loader _fm_wake_require_session_lock (bin/fm-wake-lib.sh:38), matching the file's existing _fm_wake_require_classify/_fm_wake_require_timeout idiom, invoked immediately before each call. Lazy rather than top-level source so the ~40 scripts sourcing the wake library pay no harness-identity machinery cost; no circularity (fm-session-lock-lib.sh sources only fm-cursor-lib.sh). No new behaviour, state, or fallback. Verification: sourcing only fm-wake-lib.sh, a claim with broken ancestry plus matching sidecar id and matching recorded lock-holder identity now reads OPEN and the session-lock library is loaded on demand; ordinary descent path unaffected. Suites tests/fm-claude-stop-autoarm.test.sh, tests/fm-turnend-guard.test.sh, tests/fm-wake-queue.test.sh all pass; shellcheck -S warning reports only the pre-existing SC2034 present on HEAD. tests/fm-session-lock-ancestry.test.sh fails its final case ("the pty-host was not reparented to init after the daemon ended") identically with the change reverted, so that failure is a pre-existing WSL environment behaviour, not caused by this fix

* no-mistakes(document): Clarify auto-arm claim documentation

* feat(bin): add Polytoken crewmate/scout worker adapter (#7321)

* wip: polytoken worker adapter (detection, launch, wiring, control, composer; tests mid-iteration)

* feat: verify the polytoken worker adapter (crewmate + scout)

Add polytoken 0.8.19 as a verified crewmate/scout adapter on the
captain-approved TUI-pane-plus-REST hybrid: the pane keeps inspection
and backend parity while the control verbs ride the session daemon's
typed REST API.

Detection is ancestry alone on the anchored polytoken comm (a tool
subprocess's parent is the session daemon, verified live), with the
launch boundary clearing every foreign ORCA_/FM_ marker plus the fixed
harness-identity set. The launch generates the per-task worker config
dir (mirrored operator config with the unattended permission posture
enforced, because a project config.yaml fully replaces the global
config), the worker role-contract facet (no model pin, delegation and
facet switching denied at the tool registry), and the worktree hook
layer binding the verified busy pair - pre_user_prompt and
pre_model_turn open, stop closes - to a no-argv generated writer. The
readiness gate binds the session id, port, and credential into task
metadata through sessions --format json and fails loudly on any
first-start dialog, because the license terms are a blocker by captain
decision and --accept-license-terms is never passed.

Interrupt is POST /turn/cancel with its typed settle (the TUI has no
interrupt chord, so no key is ever improvised), exit is /quit, and a
cancelled turn's busy close is written by the control plane because no
stop hook fires. The composer is the verified separated shape with
polytoken as its second owner, and Enter mid-turn queues, so the
busy-queued conversion applies. Crewmate and scout only: a secondmate
launch is refused, and a project's own .polytoken/hooks.json is refused
rather than clobbered.

* no-mistakes(review): Fix polytoken launch flag order, token argv, live guard

* no-mistakes(document): Correct polytoken REST doc comment and token-on-stdin invariant

* no-mistakes(lint): Silence intentional SC2016 in polytoken live guard treehouse shim

* no-mistakes(review): Retire polytoken pool wiring, drop FIFO config, test env clearing

* no-mistakes(review): Scope polytoken teardown wiring removal to untracked polytoken files

* no-mistakes(review): Refuse existing polytoken hook layer before writing any wiring

* no-mistakes(document): Note teardown as consumer of harness wiring-path table

* no-mistakes(review): Retire only firstmate-generated polytoken worktree wiring

* no-mistakes(review): Guard polytoken hook layer before relaunch cleanup arms

* no-mistakes(document): Note relaunch also skips git-tracked wiring paths

* test: stub polytoken in the refused-relaunch fixture

The refused relaunch onto polytoken resolves the polytoken binary before
its hook-layer refusal, so the case failed on CI hosts without the real
CLI installed. A no-op stub on the fixture PATH stands in; it is never
launched.

* no-mistakes(review): Guard polytoken interrupt close; refuse whitespace hook paths

* no-mistakes(review): Snapshot busy record after cancel settles before idle close

* no-mistakes(review): Guard interrupt close with pre-cancel snapshot and sync recheck

* no-mistakes(test): Clear inherited AGENT at the polytoken launch boundary

* no-mistakes(document): Document guarded polytoken interrupt close and whitespace refusal

* test: preserve Polytoken hook refusal coverage with explicit pins

* no-mistakes(review): Refuse invalid Polytoken relaunch profiles before stopping the worker

* no-mistakes(document): Document Polytoken relaunch refusals before stopping the worker

* fix: scope worker wiring cleanup to Polytoken

* fix(bin): point Polytoken workers away from tool_flow for the task directory

Polytoken 0.9.0 offers no launch-time path grant: tool_flow's file_read
refuses the Firstmate task directory while the direct file tools reach it
under the generated bypass matcher. The worker facet now says so, and the
verification record carries the live evidence.

* fix(bin): leave the pool as found when a fresh spawn fails

A fresh spawn that fails and leaves no task record now closes the endpoint
it opened before its launch was delivered, so the shell whose treehouse get
leases the slot ends and the pool gets the slot back. It also removes the
harness wiring, task temp root, and staged launch file it wrote, and drops
its slot claim under a retaken project lock after metadata publication.

* no-mistakes(review): Stop pre-launch refusals pointing at windows abort cleanup closes

* fix(bin): scope failed-spawn cleanup and the Running-for busy row to Polytoken

The failed-spawn pool cleanup and the Running-for busy row now apply only to
Polytoken, so every other harness keeps main's abort behavior, header text,
operator messages, and harness-less busy union. Tests prove the Polytoken
path cleans up and a non-Polytoken refused launch behaves as on main.

* no-mistakes(review): Scope submit-core busy reads to Polytoken pane identity

* no-mistakes(review): Stop polytoken treehouse isolation refusal pointing at closed window

* test: track the spawned window in the Polytoken harness tmux stand-in

Main now requires exact tmux window membership before sending keys
(aa9ab042), and the Polytoken harness stand-in listed no windows, so the
merged spawn could never deliver Enter. Record the created window, list
it, and forget it on kill, as tests/fixtures.sh does.

* no-mistakes(document): Scope fresh-endpoint abort comment to Polytoken spawns

* no-mistakes(ci): Lint 1 (ci-3) was caused by this PR, and I fixed it. Commit d18014e1 added the in_polytoken_submit_pane() subshell helper to tests/fm-polytoken-harness.test.sh. That helper sources bin/fm-tmux-lib.sh without the `# shellcheck source=/dev/null` line that every other source in the file carries (lines 55-63 and 200). With --external-sources, ShellCheck followed the library into the subshell and flagged `local pid=$!` at line 690 as SC2031. The fix is that one missing line, added above the source at line 318. After the fix, `shellcheck -x` reports nothing on the file, `bin/fm-lint.sh tests/fm-polytoken-harness.test.sh` passes with full extended analysis, and the Polytoken harness test passes. Behavior portable serial 2 (ci-1) and serial 5 (ci-2) failed in timing-sensitive tests this PR does not touch, so I made no code change for them. I reran both test files in full on this branch on macOS, and both passed (rc=0, no failures). tests/fm-supervision-host.test.sh passed, including the 'host-only transition veto changed Pi's existing offer rule' check that failed in CI. tests/fm-remote-secondmate-lifecycle-e2e.test.sh passed, including 'watch liveness: a dead remote secondmate is auto-relaunched on its own host with one wake'. Main's own recent CI runs (38950070853, 38719784765) also failed on different timing assertions in these serial shards. Together that points to runner flakes rather than a defect in this change

* no-mistakes(review): Retake per-id spawn lock before Polytoken abort deletions

* no-mistakes(document): Document per-id lock guard on Polytoken abort cleanup

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Fix away branch relaunch admission (#7444)

* fix(bin): show reported checks when a pull request's base requires none (#7450)

Port the reported-check fallback and regressions from df605386963686dff138f89bea84541c0ade6c96. Preserve required-only reporting when required checks exist and refuse failed fallback reads.

* fix: support durable per-secondmate account pins (#7452)

* fix(tests): clean read-only relaunch fixtures

Use the shared fixture cleanup so generated read-only Git hook directories do not leave permission errors and temporary trees behind.

* fix(accounts): support durable per-secondmate account pins

Resolve optional primary-home secondmate account files through the worker pin parser and checks. Preserve existing defaults when no override exists and re-read the selected pin on spawn, relaunch, and recovery.

* no-mistakes(review): Name the rejected pin file in account refusals

* no-mistakes(document): Document per-secondmate account pins in relaunch and layout docs

* feat(bin): consult operator evidence guards before wedge escalation (#6958)

* feat(watch): consult opt-in operator guards before a wedge escalation

Add config/wedge-evidence-guards, an opt-in list of operator-owned guard
executables that the watcher's at-threshold wedge branch consults after the
wait evidence, worktree-write probe and dead-endpoint probe. A CRITICAL
answer defers one window at a time, capped by FM_WEDGE_GUARD_DEFER_MAX
consecutive deferrals recorded beside the other wedge-window records, and
the escalation that ends a capped run names the guard and its reason.
Timeouts, failures, malformed output, UNKNOWN and WARNING fail open, and an
untrusted config or guard is never run. With the config absent the ladder is
unchanged.

Refs #6919

* no-mistakes(document): Document wedge-evidence-guards in home layout index

* no-mistakes(document): Align jev-guards CRITICAL verdict with bounded deferral

* fix(bin): make inbox listing succeed when the inbox is empty (#7460)

* fix(bin): make the brief's inbox listing succeed on an empty inbox

The worker brief told crewmates to list the inbox with a bare *.msg glob.
On an empty inbox that glob fails: bash ls exits 2 and zsh aborts with
'no matches found'. Use find piped to sort -V so the listing is silent on an
empty or absent inbox and keeps numeric order past 999.

Refs #7244

* no-mistakes(review): Make relaunch note inbox listing safe when empty

* fix: bound remote secondmate convergence and preserve owed re-reads (#7394)

* fix(bin): fit remote second-mate convergence inside the startup network bound

The deferred startup network stage (120s) timed out once four second mates
were remote: the mates already converge concurrently, but each mate's
inheritance push sent its fifteen allowlisted items one SSH round trip after
another, so a single mate's convergence took 64-76s after a ~16s liveness
pass.

- fm-remote-inherit-push.sh validates and snapshots every item locally first,
  so a local refusal now sends nothing, then sends the items up to
  FM_REMOTE_INHERIT_PUSH_JOBS (default 4) at a time and replays their output in
  allowlist order. A failed item still fails the push with its own error, and
  no further item is started after it. The receiver is unchanged: each item is
  its own file and generation record, and the host's job worker still runs one
  home's commands one at a time.
- fm-bootstrap.sh gives each remote mate's convergence its own budget,
  FM_SECONDMATE_CONVERGENCE_TIMEOUT (default 75s). A mate whose sync or push
  hits it is reported as that mate's SECONDMATE_SYNC skip and keeps its retry
  marker, instead of holding the whole stage past its bound.

* fix(bin): nudge a remote second mate to re-read only when something changed

Each remote convergence attempt records its retry marker before it starts,
so a sweep cut off by the startup network bound or failing before any change
left a marker that made the next session start nudge every remote mate even
though its instructions and inherited files were unchanged. The marker now
records whether a re-read is owed, set only once an attempt actually changed
the home, and a tracked-file sync that moved nothing under AGENTS.md, bin/,
or .agents/skills/ no longer counts as a change.

* fix(bin): keep a remote mate's re-read owed when its convergence is cut short

A convergence step stopped by the per-mate budget loses its output, so a
push that had already applied an item reported nothing and left the retry
marker with no re-read owed; the next start then saw every item unchanged
and never told the mate to re-read. A step cut off by the budget now marks
the re-read owed, and so does a failed push whose output shows items it had
already pushed or removed.

The lifecycle e2e suite runs every remote leg through the real entrypoint
and job worker on the test machine, so it now gives convergence ample time;
the budget's own behavior is pinned in fm-bootstrap-network-parallel, whose
budget and failure cases are also made independent of machine load.

* no-mistakes(review): Keep re-read owed on partial or unknown completion

* no-mistakes(review): Persist owed re-read when killed mid-mutation

* no-mistakes(document): Fix stale remote re-read owed docs

* test: send inherited items one at a time in the remote lifecycle e2e fixture

Behavior portable serial 5 failed on the watcher auto-relaunch leg of
tests/fm-remote-secondmate-lifecycle-e2e.test.sh after the inheritance push
started overlapping its sends. Across 14 recent main CI runs that suite's
remote-spawn leg took 30.8-35.6s and the watcher leg 27.3-34.5s, already close
to its 30s wait; on the PR run remote spawn took 42.1s, well outside that range,
while legs that push nothing were only 5-10% slower. The watcher relaunch is a
remote spawn, and the only changed code on that path is the inheritance push.

This fixture's transport has no network latency and its job worker runs one
home's commands one at a time, so overlapping sends cannot hide any round trip
there and only add submission overhead to every remote spawn. The suite now
sends one item at a time, as it did before; the overlapped scheduler stays
covered by tests/fm-bootstrap-network-parallel.test.sh, and the production
default of four is unchanged. The watcher leg's failure now also prints the
watcher's output.

* no-mistakes(document): Clarify remote re-read obligations and consolidate documentation

* fix(bin): record a remote mate's re-read as owed before convergence can change its home

A live run against a real remote second-mate home showed the owed re-read
still lost when the startup network bound stopped the stage. That bound
stops it the way `timeout -k 1` does: TERM to the stage's process group, then
KILL one second later. Bash defers a TERM trap while the convergence worker
waits in a command substitution, and the remote call runs in its own timed
process group, so the KILL landed before the trap could record the re-read.
The remote home had already applied the change, the next start saw every item
unchanged, sent nothing, and deleted the marker, so the mate was never told
to re-read.

Bootstrap convergence and config-push now write the record owed before any
remote step can change the home, and write it back only after the attempt has
reported: removed after confirmed unchanged convergence or a successful send,
and back to owed=0 when a failed attempt's outcome proves nothing changed. A
kill at any point therefore leaves the re-read owed. The TERM/INT traps are
gone. The kill regression now sends TERM and then KILL one second later, as
the startup bound does; it fails on the previous head and passes here.

* no-mistakes(document): Clarify convergence timeout scope and consolidate reread documentation

* fix: require positive daemon running status in crew-state (#7317)

* fix(tests): stabilize supervision host drain and offer fixtures (#7467)

* fix(bin): refuse spawn into a project with an unborn HEAD (#6987)

* fix(bin): refuse spawn into a project with an unborn HEAD

Spawn into a repository with no commit waited 60s for treehouse and then reported that the worktree was the spawning project itself, never naming the cause. Refuse before the wait and name the unborn HEAD and the remedy. The project-management skill now states that a new local repository needs a first commit.

* docs(skills): tell the captain a new project needs a first commit

The Create a project step no longer reads as firstmate committing into the project. It states that spawn refuses an unborn HEAD and that the captain is told the project needs a first commit.

* test: give spawn fixtures a first commit for the unborn-HEAD refusal

* no-mistakes(review): Commit foreign consent fixture so spawn guard passes

* feat(bin): add GitLab --allow-no-pipeline merge waiver and close backlog items for GitLab MRs (#7462)

* feat(bin): add an attended GitLab --allow-no-pipeline merge waiver

A GitLab repository that deliberately runs no merge request pipeline could
never be merged through fm-pr-merge.sh: the guard requires a successful head
pipeline at the current head, and GitLab has no per-check waiver.

--allow-no-pipeline waives only the pipeline condition, and only when GitLab
reports head_pipeline as present and null. A failed, running, canceled, or
stale pipeline still refuses, every other condition (open, mergeable
detailed_merge_status, no conflicts, discussions resolved) still holds, and
the verified head is still passed to glab as --sha. The flag is attended-only
(refused while the away-posture record exists), GitLab-only, and takes no
value; without it the default refusal is unchanged.

* fix(bin): close a GitLab merge request task's backlog item with a note

tasks-axi accepts a --pr link only as a GitHub or Forgejo pull request, so
after a GitLab merge request landed, teardown could never complete the
backlog Done transition and left the close pending forever.

Extend the existing Gerrit carve-out in fm_backlog_done and
fm_backlog_retain, and the captain-hold answer replay that shares it, to
record a GitLab merge request URL as a "GitLab merge request <url>" note,
until tasks-axi accepts GitLab merge request URLs. GitHub and Forgejo pull
requests are still recorded as pr links.

* no-mistakes(document): Note GitLab --allow-no-pipeline waiver in merge-watch record

* test(tests): stop orphan-storm fixture failing on slow launches (#7451)

* fix(tests): tolerate slow orphan-storm source launches

* no-mistakes(document): docs: pin orphan-storm row to pacing, not lease expiry

* fix: honor gh-resolved publication targets (#7540)

* fix: respect gh-resolved base in publication target selection

* no-mistakes(document): Document gh-resolved publication target selection

* feat(bin): add Paseo as an experimental session backend (#4728)

* feat(bin): add Paseo as an experimental session backend

Modeled on the cmux adapter, with Herdr's one-workspace-per-task UX:
terminal NAME is the routing authority, workspace title is decoration
only. tmux stays the default; Paseo is opt-in via config/backend,
FM_BACKEND=paseo, or PASEO_AGENT_ID/bundle-id auto-detection.

* no-mistakes(document): docs(paseo): register Paseo across backend inventories and lists

* no-mistakes(document): docs(paseo): list paseo in AGENTS.md config/backend entry

* fix(bin): give Paseo one shared workspace per project with a tab per task

Paseo's sidebar is project > workspace > terminal tab. The adapter used
to create one workspace per task, so a fleet showed up as a pile of
sidebar entries. It now mirrors Herdr's container shape: one shared
`firstmate` (or `2ndmate-<id>`) workspace per project, adopted by cwd
and title or created once, with each task as a terminal tab inside it.
Kill closes only the task's tab; the shared workspace is never archived
and the adapter never runs a `paseo project` command, so Paseo reuses
the project registered for the path instead of multiplying projects.

Live findings folded in: the CLI prints an Electron warning on stderr
when firstmate itself runs inside a Paseo agent, so parsed `--json`
calls no longer merge stderr into stdout; `workspace ls` reports the
cwd normalized but not symlink-resolved, so adoption matches the raw,
logical, and physical path; a bare Escape stays pending in zsh's emacs
keymap and fuses with the next key, so the smoke test verifies labels
with Enter and sends Escape last.

The smoke test now owns a throwaway project directory and deletes the
project it registered, so a captain's real sidebar is never touched.
Both paseo suites get a portable-serial duration hint and a `paseo`
family so the coverage guard stays under its unhinted cap.

* test(bin): teach the backend-list suites about paseo

CI serial shard 5 failed because tests/fm-bootstrap.test.sh still
expected the known-backend list to end at cmux. Add paseo to that
expectation and to the sibling lists in the control, trace-context, and
teardown-safety suites (with a valid paseo endpoint record), and scrub
PASEO_AGENT_ID and __CFBundleIdentifier in the bootstrap suite's hermetic
unset so running the tests from inside a Paseo agent cannot flip a
default-backend case onto paseo the way $TMUX or HERDR_ENV would.

* no-mistakes(review): Fix paseo control keys, secondmate fallback, docs, and tests

* no-mistakes(review): Send paseo C-u as raw byte, refuse untokenized keys

* no-mistakes(document): Sync Paseo docs for key tokens, secondmate fallback

* no-mistakes(lint): Use prefix-form PATH in paseo autodetect tests

* fix(bin): make paseo explicit-only and adopt the tab's own workspace

Paseo stamps its markers into every descendant process: an agent exports
PASEO_AGENT_ID, a terminal tab exports PASEO_TERMINAL_ID and
PASEO_WORKSPACE_ID, and both carry __CFBundleIdentifier=sh.paseo.desktop.
A tmux server started from a Paseo tab inherits all of them, so their
presence never proves the captain chose Paseo (the same finding recorded
on #4484 and #3884). fm_backend_detect now ignores every Paseo marker;
paseo is reachable only through config/backend, FM_BACKEND=paseo, or
--backend paseo, exactly like zellij and orca. That also retires the
auto-detected-paseo secondmate fallback to tmux, which only existed
because of auto-detection: an explicit paseo still refuses --secondmate,
and an unconfigured home inside Paseo stays on tmux silently.

Once Paseo has been selected explicitly, PASEO_WORKSPACE_ID is still
useful: a firstmate running inside a Paseo tab adopts that tab's own
workspace as the project's shared workspace when its cwd is the project,
before falling back to the firstmate-title lookup (herdr's
launcher-identity rule). Verified live that CLI-created tabs export
PASEO_WORKSPACE_ID and no PASEO_AGENT_ID.

Docs also note that `paseo run --cwd` is ignored when PASEO_AGENT_ID is
set; the adapter never uses `paseo run`.

* no-mistakes(test): Drop stale Paseo auto-detect mention from fm-spawn help

* no-mistakes(document): Document Paseo own-workspace adoption order

* no-mistakes(ci): Fixed ci-3 with a test-only change. The unconfigured-spawn case in test_secondmate_spawn_refuses_explicit_paseo_only failed on CI with "error: no launch template for harness unknown". CI runners have no agent process above the test, so harness detection returned unknown before the spawn reached the home check. The fix pins the harness with `printf claude > "$dir/config/secondmate-harness"` just before that spawn call, with a two-line comment explaining why (tests/fm-backend-paseo.test.sh). I verified locally that tests/fm-backend-paseo.test.sh passes, including the secondmate test, and that shellcheck is clean on the file. I did not rerun it detached from the agent process chain; your earlier report of it failing without the pin and passing with it is the evidence for that part. As you instructed, I made no change for ci-1 or ci-2 (the fork approval gate) or for the Lint 2 runner shutdown, which was infrastructure

* fix(bin): let the adapter precheck load paseo

Main now checks that a backend's adapter and its sibling libraries are
readable before sourcing it, and refuses any backend it has no sibling
list for. Paseo had no entry, so every paseo call failed to load the
adapter and fell back to 'unknown'. Paseo sources the same siblings as
cmux, so it shares that entry and sources through the checked path.

* no-mistakes(document): Make fm_backend_source adapter-count comment count-free

* test(bin): prove the Pi branch claims paseo stale wakes

The watcher keys a non-Orca stale wake by the task's window= value, and
the Pi supervision branch resolves a stale row to its task only through
window= (Orca's terminal= key is not indexed, which is how Orca stale
wakes ended up waking main). Paseo records
window=<terminal-uuid>:<workspace-uuid>, so pin that a stale row keyed
by that value is claimed by the branch for the right task.

* no-mistakes(document): Note Paseo adapter in composer capture-window config doc

* fix(bin): refuse a paseo spawn when its inventory is unreadable

Paseo allows duplicate workspaces and terminal names, so the adapter
looks up the project's shared workspace and checks the task's terminal
name before creating either. Both lookups treated a failed or unreadable
listing as empty, so a transient daemon error during spawn created a
second workspace for the project or a duplicate task terminal. The spawn
now refuses instead, and creates nothing, when either inventory cannot be
read.

* docs(paseo): note why capture reads the whole scrollback

Paseo caps terminal scrollback at 1024 lines, so reading all of it and
trimming locally stays bounded however long a task runs. A bounded
`--start -<n>` read is not a drop-in replacement: it counts the blank
screen rows below the prompt as the tail, so a quiet terminal captures
as empty.

* no-mistakes(document): Document Paseo spawn refusal on unreadable inventory

* no-mistakes(lint): Rewrite paseo workspace inventory check as explicit if-block

* feat(bin): keep paseo tasks from cluttering the sidebar

Every project a firstmate worked in got its own "firstmate" workspace in
Paseo, and those workspaces and their projects stayed in the sidebar
after the work was done.

When firstmate itself runs inside Paseo, task tabs now go into its own
workspace, whatever the project. A terminal tab names that workspace
through PASEO_WORKSPACE_ID; an agent session only has PASEO_AGENT_ID, so
its workspace is the one live workspace whose folder is the firstmate
home.

Otherwise the per-project shared workspace is still used, and closing
its last task tab archives it and deletes its project when the folder is
one of the home's own clones. Archiving a workspace also archives its
agents and leaves the project listed, so cleanup skips firstmate's own
workspace, workspaces titled by someone else, workspaces with an agent
in their folder, and projects outside the home, and does nothing when an
inventory cannot be read.

* no-mistakes(review): Retire paseo workspace when tab already gone; rename spawn vars

* no-mistakes(document): Align Paseo doc workspace wording with own-workspace placement

* fix(bin): serialize paseo spawns with workspace cleanup

Cleanup checked that a per-project workspace had no tabs, made more
Paseo calls, and then archived it. A spawn could open a tab in that
workspace in between, and the archive would then take a live task's tab
with it.

Spawning (choosing or creating the workspace and opening the tab) and
cleanup now share one home-wide lock, the stale-owner lock from
fm-wake-lib.sh that herdr already uses. A spawn that cannot get it
refuses and cleanup skips. Cleanup now only archives a workspace for one
of the home's own clones, which only this home spawns into, so a
per-home lock covers every spawn that could use it.

* no-mistakes(document): Scope Paseo workspace retirement to home clones in architecture

* test(paseo): fix shellcheck SC2031 lint warning in fm-backend-paseo test

The workspace-lock holder helper read $! after backgrounding the holder,
which ShellCheck's dataflow analysis flags as SC2031 because the helper
only runs inside command substitution. The holder now records its own
PID ($$, the same process $! named) before signalling readiness, and the
helper returns that. No behavior change.

* test(paseo): keep the smoke test from archiving a workspace it did not create

Run from a Paseo tab or agent, PASEO_WORKSPACE_ID/PASEO_AGENT_ID steered
create_task into the caller's own workspace, which cleanup then archived.
The smoke test now unsets both before sourcing the adapter, archives the
workspace create_task returned only while its cwd is the test's own temp
dir, and runs cleanup once. Test-only; assertions are unchanged.

* no-mistakes(document): List paseo in FM_BACKEND and README backend lists

* no-mistakes(document): Add paseo to backend dependency docs and lists

* no-mistakes(document): docs: list paseo among Command Code refused backends

* no-mistakes(document): Note Paseo as unstyled in opencode footer record

* fix(skills): keep recovery-skill triggers inside Claude Code's listing budget (#7545) (#7558)

Claude Code lists skill descriptions within a budget of 1% of the context
window and drops the least-invoked skills' descriptions first, which are
the rarely-loaded recovery skills whose descriptions AGENTS.md section 13
uses as the trigger index.

- Remove the decision-hold-lifecycle redirect stub; nothing on main
  points briefs at it any more (captain-hold-lifecycle owns the policy and
  docs/captain-hold-lifecycle.md still documents the fm-decision-hold.sh
  shim).
- Tighten the longest skill descriptions to their load triggers, keeping
  every trigger. Total description size drops from 11312 to 6142
  characters across the listing.
- Document /doctor, /skill-doctor, skillListingBudgetFraction, and
  skillOverrides "name-only" in the Claude harness adapter notes as
  opt-in, home-local vendor settings.

No session-start budget warning or other default-on surface is added.

* fix(extension): launch lifecycle helpers through verified Bash (#7563)

* fix(extension): launch lifecycle helpers through verified Bash

The extension host spawned bin/fm-procevent.sh directly with
shell:false, which native Windows Node rejects with spawn EFTYPE because
it cannot run a script through its shebang. Resolve an absolute Bash
from $BASH or PATH, verify it with a short probe (on Windows it must
report an MSYS or Cygwin OSTYPE, so WSL bash.exe is skipped), and pass
the script as its first argument. The child keeps shell:false, the
sanitized environment, literal argv, and the existing failure mapping.

Fixes #7559

* no-mistakes(review): Harden lifecycle Bash interpreter verification

* no-mistakes(document): Document lifecycle Bash verification contract

* fix(extension): try exported BASH only on Windows for lifecycle helpers

* feat(bin): add an opt-in no-mistakes home resolver for host reads (#7348)

Sites that run one no-mistakes daemon per isolated workspace keep each
task's runs in a per-workspace NM_HOME that cannot be derived from the
shared gate remote, so crew state, pipeline spend, and teardown read the
wrong home.

When NM_HOME is unset and config/nm-home-resolver names a site-provided
executable, fm-nm-run-lib.sh now calls it with the task copy path and
exports the printed home for that one call. Only host reads (axi status,
the axi overview, axi logs, runs, daemon status, the state database) and
axi abort --run use it. An explicit NM_HOME always wins, and with no file
behaviour is unchanged.

Fixes #7309

* feat(bin): defer wedge escalation for a worker's own open blocked/needs-decision line (#7361)

* feat(bin): let a worker's own open blocked: or needs-decision: line defer wedge escalation behind config/wedge-defer-worker-wait

Opt-in only: absent the flag the wedge ladder is unchanged. Counts only the worker's own newest line (reserved keys excluded via status_own_open_decisions), defers onto the existing bounded recheck with a verb-specific clearing action and no escalation-count increase, and ends on any newer status line or a newer acknowledged inbox record. The away daemon honors the same evidence before escalating an enriched wedge.

Refs #6899

* no-mistakes(document): Document worker-wait deferral in wait-evidence lists

* feat(brief): forbid leading cd in generated scout and ship briefs (#7481)

* feat: support per-mate secondmate runtime pins (#6917)

* feat(bin): pin per-mate secondmate runtime overrides in config/secondmate-harness

A single default pin line gives every secondmate one runtime, so raising the
default pin silently migrates a mate the captain ruled onto its own runtime.
config/secondmate-harness now accepts optional
"mate <secondmate-id>: <harness> [<model>] [<effort>]" override lines, and
fm-harness.sh secondmate, secondmate-model, and secondmate-effort take the
secondmate id as an optional second argument that selects that line.

Spawn, the control-plane relaunch, and the secondmate restart each pass the
mate id they already know, so all three resolve one decision. A malformed pin
file is refused with its line number and prints no token instead of resolving
around it to the default runtime.

* no-mistakes(review): Bypass unused pins during explicit secondmate relaunch

* no-mistakes(document): Correct and consolidate per-mate runtime pin documentation

* fix: preserve legacy secondmate pin parsing without overrides

* fix(bin): keep legacy secondmate pin files opt-in

config/secondmate-harness is documented as "the first non-empty, non-comment
line is parsed". The per-mate override grammar made the whole file strict, so
a second default line or a fourth token started refusing every secondmate
spawn, relaunch, and restart - even in a home that never wrote a mate line.
That changed how an existing, already-valid file is read, so the feature was
not opt-in.

Scope the strict whole-file parse to files that declare at least one
"mate <secondmate-id>:" line. A file with no mate line parses exactly as
before: first non-empty, non-comment line, the rest ignored, a fourth token
ignored, nothing refused. A file that does declare a mate line keeps the
strict parsing, so a duplicate override, a malformed entry, or an extra token
still refuses loudly with its line number.

Coverage: a legacy file with a second default line and a fourth token now
spawns, relaunches, and restarts a mate onto its first line; a declaring file
that is malformed refuses each of those paths with the offending line; and an
explicit --harness/--model/--effort relaunch succeeds whatever the pin file
holds, because the config read stays behind the explicit-harness guard.

* no-mistakes(document): Document per-mate secondmate runtime pins

* no-mistakes(ci): Fixed `tests/fm-backend-herdr-presentation-e2e.test.sh` teardown to restore write permission on fixture directories before removal. This addresses the read-only git-hook cleanup errors in the failed Herdr check. The real-Herdr presentation E2E test passed locally (exit 0)

* feat(bin): add fm-capacity.sh to report open lanes and host headroom (#6973)

Adds bin/fm-capacity.sh, a read-only, network-free report of open ship/scout lanes against an optional config/lane-capacity target plus host load, memory and disk headroom. Without config/lane-capacity it reports counts only and gives no dispatch-hold advice. Docs, operational-home-layout skill entry, a gated AGENTS.md pointer, and tests/fm-capacity.test.sh.

* fix(bin): bound repeat stale alarms for unknown-but-alive progressing panes (#7437)

* fix: bound unknown-live watcher alarms

* no-mistakes(review): Gate unknown-alive stale bound on progress; fix arm CONFIG

* no-mistakes(review): Keep watch.env loading only in the watcher arm

* no-mistakes(review): Seed worktree progress before first unknown-alive alarm in test

* no-mistakes(document): List config/watch.env in operational home layout

* no-mistakes(review): Narrow watch.env docs to arm-launched watchers

---------

Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>

* fix(bin): honor explicit no-run verdict in crew-state (#5888)

* fix(bin): honour the no-run verdict from axi status in crew-state

* no-mistakes(review): Honor authoritative no-run verdict across fallbacks

* no-mistakes(lint): Quote no-run sentinel to satisfy ShellCheck

* no-mistakes(document): document authoritative no-run verdict in crew-state attribution

* fix(composer): recognize Grok approval-titled borders (#6132)

* fix(composer): accept Grok 1.0.44 approval-titled bottom border as empty composer

* no-mistakes(document): Document Grok’s aligned approval title

* no-mistakes(ci): Captain, removed the unused test variable that failed Lint 1. ShellCheck, the composer suite, and the remote provisioning test pass locally. Behavior portable serial 9 failed during fixture cloning in an unchanged test, before composer behavior was exercised; no further code change is warranted for that failure

* no-mistakes(review): drop dead approval guard, make Grok fixtures locale-independent widths

* fix(bin): stop shellcheck re-expanding fm-wake-lib in teardown

Lint 1 dies when ShellCheck expands bin/fm-wake-lib.sh twice from
bin/fm-teardown.sh. The top-level source already names that file. Point
the second directive at /dev/null and leave the runtime source unchanged.

* docs: record Grok 1.0.44's approval-titled composer border

The verification record scoped its titled-bottom-border note to the Grok
1.0.5 three-column overhang but never recorded the newer shape this branch
accepts, so a maintainer could not tell the two cases apart or know what a
Grok upgrade re-verifies.

Add a dated record of the 1.0.44 shape - the typed model/effort title plus
its ` · always-approve` suffix, drawn inside a rounded bottom border at the
aligned width - with the live verdicts that prove it, the portable test that
owns it, and the fail-safe verdict every neighbouring title keeps.

* no-mistakes(review): Narrow Grok composer coverage claims to verified matrix

* no-mistakes(document): Correct stale Grok verification notes

* docs: trigger CI re-run for flaky shard 4

Behavior portable serial 4 failed on the previous head with one assertion
only, `not ok - the NUL-bearing line was not captured`, in the unchanged
remote-reply and relay path; its fixture hardcodes /bin/sleep, direct NUL
ingestion passes, and the other 19 checks were green. GitHub refused a job
re-run for this fork PR, so this empty commit is the re-trigger. No content
change.

* no-mistakes(document): Clarify Grok live guard verification scope

* fix(composer): restrict Grok approval titles to rounded borders

Reject light, heavy, double, and ASCII approval-title boxes at the shared
classifier boundary. Only the rounded family has recorded live evidence,
and an empty verdict grants permission to type into the pane.

Cover denied families through tmux and cursorless backend profiles while
preserving rounded idle, draft, malformed-title, and legacy behavior.

* no-mistakes(document): Refresh Grok composer verification evidence

* no-mistakes(ci): Fixed the stale local link in `docs/verification/runtime-backends.md`; the section heading’s anchor had changed. `tests/fm-documentation-audiences.test.sh` passes

* fix(bin): point non-checkout omp homes at fm <project> relaunch (#7155)

* fix(omp): point non-checkout homes at fm <project> relaunch and name why the extension is not loaded

* no-mistakes(review): Remove unset-FM_HOME omp watch cause line

* feat(fm-watch): bound consecutive wedge escalations behind an opt-in cap (#7552)

* feat(fm-watch): bound consecutive wedge escalations per worker window

An unattended watcher escalation loop once burned ~359M tokens in a day: the
watcher keeps re-escalating a pane it believes is wedged, and nothing bounded
how many times it did that for one worker window.

Add an opt-in ceiling on consecutive wedge escalations for a single window.
At FM_WEDGE_MAX_ESCALATIONS the watcher publishes one terminal
PERMANENTLY-WEDGED wake and writes both cap markers, after which the wedge
path short-circuits for that window until FM_CAP_HORIZON_SECS elapses or an
o…
…nces project MCP servers (kunchenguid#7693)

* fix(bin): answer Kimi 2.3.0's folder prompt and refuse one that announces project MCP servers

Kimi Code CLI 2.3.0 reworded its folder prompt: the options now read
"Trust and continue" and "Exit", so the complete-dialog test in
bin/fm-spawn.sh never passed and every Kimi launch stopped at the prompt
with no key sent. The same release reads a root .mcp.json at the git
worktree root as a project MCP declaration (its documentation names only
.kimi-code/mcp.json) and announces declared servers on the prompt as
"Start N MCP server(s) automatically" over "Config: <file>"; pressing
Enter there starts those servers before any login.

Move the prompt predicates into bin/fm-kimi-trust-lib.sh, recognize both
recorded wordings, and refuse, before any key, a prompt that announces
project servers or that pages its disclosure (a short pane keeps the
complete dialog on screen and can hide the announcement on another page).
The launch fails naming the reason; a prompt with no announcement is
answered as before, and kimi -p is untouched.

Replay the prompts recorded from the real 2.3.0 CLI through the Kimi
suite's fake pane, one case per wording.

* test(bin): add a default-on live guard for Kimi's folder prompt

Launch the installed Kimi bare in a private tmux server with a disposable
home and its updater off, and check every recorded prompt wording against
the predicates bin/fm-spawn.sh answers with: the plain prompt is complete
and Enter clears it, each declaring directory is announced and never
answered with its command never run, and short panes collapse or page the
prompt. No prompt text is submitted, so it spends no tokens and needs no
login. Record the dated 2.3.0 and 2.3.1 result in the verification record.

* docs: record the Kimi 2.3.0 folder prompt and its refusals

Name both recorded option pairs, the project-server announcement, the paged
and collapsed renderings, and the root .mcp.json read in the Kimi adapter
reference, and point the configuration guide's harness restrictions at it.

* no-mistakes(review): map changed captures to their readers; drop unrecorded 2.1.1

* no-mistakes(document): name the capture-directory arm in the changed-file map
…int (kunchenguid#7703)

With config/rex-status-marks set to `on`, the captain sees from Rex itself
which worker needs them: bin/fm-rex-marks.sh mirrors each Rex task's latest
status into one Firstmate-owned OSC 7501 record (app=firstmate, id=fm) on the
worker's pane, titled with the task's tab label, plus one OSC 777 desktop
notification when a new attention state appears. Absent the file, nothing
changes: the watcher skips the sync and teardown runs nothing new.

- Status mapping: needs-decision or a captain hold -> blocked question,
  blocked -> blocked permission (auth when the note names a credential),
  failed -> error, done -> done (PR ready with a URL), else removed.
- Validation progress: while marks are on and a no-mistakes ship validates
  with no mark, a working id=fm/validate record shows the share of steps done
  and the active step (fm_nm_run_progress in bin/fm-nm-run-lib.sh).
- config/rex-tint opts in separately to an OSC 11 background tint on waiting
  and failed workers, reset with OSC 111.
- A `rex` wedge-alarm channel, used only when config/wedge-alarm names it,
  raises an id=fm-wedge record and notification on Firstmate's own pane and
  removes it after the next delivered digest; `auto` never adds it.
- Rex attributes a record written to a pane's terminal to the foreground
  process, so fm_backend_rex_trusted_record, the push stream consumer, and
  rex-eventwait.lua now ignore app=firstmate records: a mark can never read
  as the worker's busy state or blocked edge.
- Tests: fake-CLI cases for the sequences, read-back, trust exclusion,
  default-off, producer convergence, clear, and progress parsing; real-Rex
  cases in the event-wait smoke; daemon cases for the rex wedge channel.
…7518)

* feat(backends): add the T3 Code runtime backend

T3 Code owns the agent session while Treehouse keeps owning the task
worktree. The adapter drives the T3 server over its HTTP orchestration API
with a CLI-issued bearer and reads native thread changes over the WebSocket
shell stream; nothing is typed into a terminal.

A spawn leases a Treehouse slot durably, registers the project by real path,
creates the thread on the slot, and starts the launch turn with the encoded
brief. T3 sets environment per provider instance, never per thread, so the
facts a pane would export (GOTMPDIR, FM_TASK_ID, TRACEPARENT, a secondmate's
launch prefix) travel as per-directory harness config: an env block in
.claude/settings.local.json, or a [shell_environment_policy] table in
.codex/config.toml. A tracked Codex config is overlaid under skip-worktree
with a journal and restored byte for byte at teardown. Teardown stops and
archives the thread before the slot returns, because a live thread whose
worktree path disappears re-creates it on its next turn.

The backend is experimental, runs only the claude and codex harnesses, and
is selected explicitly or by a configuration-gated auto-detection rule: a
home whose T3 shell snapshot shows exactly one live worktree-less thread.

* feat(watch): supervise T3 Code tasks from the server's session status

The T3 server reports its own session status for claude and codex alike, and
no shell sits in front of the agent, so both its native busy and idle
verdicts are trusted ahead of harness records (source t3code-native). The
watcher subscribes to the shell stream for this home's worker threads,
normalizes pending approvals to blocked through the shared transition
policy, and keeps polling as the fallback. A thread's capture stays
byte-identical through a long tool call, so the wedge ladder gains one T3
consult that resets the idle timer only while the server still reports the
session running; stopped and failed sessions read dead and are reported once
by the shared dead-record probe.

* feat(control): native exit, relaunch refusal, and away-mode threads on T3 Code

A T3 thread has no composer, so exit is the server's own session stop,
proven by the same recovery-grade agent-state wait every other backend uses.
A thread is bound to the driver that first ran it and a turn on a stopped
thread continues the same agent, so relaunch is refused before anything is
stopped, by the control plane and by the launch owner. A T3 missing is the
server's own answer, so the absence proof re-reads the thread.

The away daemon can supervise a captain that runs inside a T3 thread: T3
puts nothing into the agent's environment, so after the explicit overrides
and the tmux and Herdr markers it asks the server for the one live
worktree-less thread on this home's project. start refuses because T3 hosts
no terminal to create; start-native remains the path.

* test(t3code): cover the adapter against a fake server and a real socket

A node HTTP fake answering from a per-case world covers the token and
version gates, project matching, the command payloads, the status table,
the stop-then-archive kill, worker and secondmate spawns, the per-directory
environment files, tracked Codex config preservation, teardown ordering, the
control plane's native exit and relaunch refusal, and the wedge consult. A
second suite frames real WebSocket messages for the event reader and the
watcher's fallback. A token-free live guard skips cleanly without T3.
Cases that parse TOML report themselves skipped without a Python 3.11+
interpreter instead of passing vacuously.

* docs: document the T3 Code backend and record its verification

The backend guide owns setup, token minting, task shape, lifecycle, restart
behavior, push events, away-mode support, and active limits. The runtime
backend verification record keeps the dated live evidence. The shared
configuration, architecture, control-plane, trace-context, and away-mode
owners gain one-line cross-references instead of restatements.

* no-mistakes(review): Harden t3code launch settings, abort lease, and secondmate bearer

* no-mistakes(document): Refresh T3 backend documentation

* fix(t3code): harden stable V1 thread lifecycle

* fix(t3code): require explicit backend selection

* docs(t3code): record stable source pin and trim shared churn

* fix(t3code): reject V2 teardown before local cleanup

* docs(t3code): align explicit selection guidance and tests

* no-mistakes(review): Unify T3 thread status, gate, and V2 recovery handling

* no-mistakes(review): Complete T3 V2 recovery steps and trim probe shell reads

* no-mistakes(review): Apply T3 background liveness to stopped and errored sessions

* no-mistakes(review): Classify T3 background liveness by T3's own session rules

* no-mistakes(document): Align T3 backend documentation with current behavior

* no-mistakes(ci): Fixed the T3 probe to preserve ready, idle, and interrupted detail verdicts when the shell request fails or times out. Added behavioral coverage that failed before the fix and now passes. The fake-server adapter suite, focused lint, and diff checks pass; the live Codex guard was disabled

* no-mistakes(ci): Fixed ci-5: shell-snapshot failures now preserve thread liveness with unknown busy state. T3 busy guards defer, and classifiers preserve uncertainty. Added behavioral regression coverage. T3 adapter, daemon, busy-state, and pending-reply suites, focused lint, and documentation checks pass

* no-mistakes(ci): Fixed unknown T3 verdicts clearing stale markers and errored-thread rechecks. Unknown still defers delivery. Both regressions failed before their fixes and now pass. All four focused suites, syntax checks, diff checks, and fast local lint pass. Full extended lint was stopped after nine minutes of heavy memory use

* fix(t3code): bound stale alerts and restore portable CI checks

* no-mistakes(review): Keep T3 stale markers when thread reads fail transiently

* no-mistakes(document): Correct T3 backend documentation and supervision guidance

* fix: preserve T3 integration changes during rebase

* no-mistakes(ci): Captain, fixed discarded T3 stale warnings to re-arm exactly once, preserving delivered-warning suppression and startup rollback. Regression failed before the fix and passes afterward. All 59 portable T3 tests, targeted lint, syntax checks, and diff checks passed

* no-mistakes(document): Clarify T3 warning lifecycle and account guidance

* no-mistakes(review): Set launch-sent flag before send to preserve Git hooks

* no-mistakes(document): Correct T3 backend documentation and ownership

* fix(t3code): bound native-uncertainty inbox deferral by the busy budget

Upstream's steering-inbox busy-deferral budget now also covers T3 Code native
uncertainty, so a doorbell held for an unreadable thread escalates as
stuck-busy instead of waiting forever. Document it and extend the probe test.

* no-mistakes(document): Correct T3 runtime documentation and owner references

* no-mistakes(document): Correct stale T3 backend documentation

* fix(t3code): bound the running-session wedge deferral by turn age

A T3 thread that stayed running reset the wedge timer on every consult, so a
hung turn past FM_BUSY_TURN_MAX_SECS never reached the possible-wedge alert.
Defer only while the latest turn boundary T3 records is younger than that
bound, and never defer on a missing turn timestamp.

* no-mistakes(document): Correct T3 backend documentation scope

* fix(watch): keep the task-record busy verdict for non-T3 inbox delivery

inbox_steer_check consulted fm_busy_is_busy with the window target for every
backend. Restore window_is_busy, which classifies through the recorded task,
for every backend except T3 Code, which alone also treats native uncertainty
as busy before ringing.

* no-mistakes(document): Correct T3 lifecycle and supervision documentation

* no-mistakes(document): Correct T3 cleanup and stall documentation

* fix(t3code): load the composer library for the shared submit dialog check

Upstream's submit dispatcher now prepares and reads the composer dialog
sink around every adapter, so a T3 Code submit failed with 'the dialog
check could not be recorded' because this adapter never loaded
bin/fm-composer-lib.sh.

* no-mistakes(document): Correct stale T3 backend documentation

* feat(t3code): move the backend onto T3 Orchestrator V2's /mcp transport

T3's Orchestrator V2 removed POST /api/orchestration/dispatch, and an OAuth
mcp-client session is accepted only on /mcp. Add bin/fm-t3-mcp.mjs, a
dependency-free MCP client with the captain-run PKCE sign-in, a tools/list
capability gate pinned to the signed-in environment id, and the thread verbs
the adapter needs, and port bin/backends/t3code.sh onto it: launch, send,
read, interrupt, archive with a proven close, and the away-mode thread lookup.

The transport forces three changes: fm-control exit refuses on t3code (V2 has
no session stop), the WebSocket push path is removed (an mcp-client is refused
on it, so T3 windows poll), and a launch whose reply is lost keeps its lease
instead of retrying (t3_thread_launch has no idempotency key).

Fixes kunchenguid#6904

* fix(t3code): verify the V2 wiring live on Linux and fix what it found

A live run of the /mcp backend against t3 0.0.46-nightly.20261010.2935 on
Linux found four defects the fake server could not:

- capture read the oldest activity items: t3_thread_read pages forward from
  afterPosition, so the helper now starts from the thread's visible item
  count and widens backwards when that undercounts.
- fm-control interrupt on t3code always reported cancel=unconfirmed because
  the key path discarded T3's own run-wait verdict; it now reports T3's
  confirmed, not-running, or unconfirmed.
- the telemetry probe never read "off" on Linux, where /proc/<pid>/environ
  is NUL-separated and the value match ran into the next variable.
- the credential-mode test ran BSD stat first, which GNU stat answers with
  filesystem output before failing.

The fake server now pages like T3, the capture and interrupt tests fail
without their fixes, and the runtime-backends record carries the live run.

* no-mistakes(review): Archive unproven T3 launches as uncertain; gate t3_thread_list

* no-mistakes(review): Restore identity-tool gate test coverage

* no-mistakes(document): Align T3 backend documentation with Orchestrator V2

* fix(t3code): address the Orchestrator V2 backend review

- Interrupt confirmation waits on exactly the run T3 interrupted (wait --run).
- A send reply lost after T3 committed it reads unconfirmed (exit 7 from the
  helper, verdict unconfirmed, fm-send exit 3), and one request id per logical
  delivery makes the resend idempotent.
- Secondmate recovery never replaces an endpoint whose close is unproved, and
  resumes a failed T3 run in its own thread instead of launching a second one.
- Secondmate retirement reaps provider processes T3 detaches after the archive
  before a pooled or standalone home is returned or removed.
- Pending runtime requests read blocked, escalate once per request set through
  the watcher's push splice, and are answered with bin/fm-t3-answer.sh;
  permission approvals are surfaced, never answered.
- Supervisor discovery reads every thread page and counts forks, not subagents.
- Model selection resolves against orchestrator_capabilities, keeps unrelated
  default options under an effort override, and launch reads back the full
  t3_thread_configuration; the stale driver-binding claim is corrected.
- The watcher's push splice waits on exact active runs through t3_thread_wait,
  bounded by the poll interval, with polling as the backstop.
- The Claude pull-request-tool clause applies only before the T3 build verified
  safe, with an opt-in live guard and a dated verification record.
- The fake server models paging, exact-run waits, asynchronous interrupt and
  archive, commit-then-disconnect sends, and pending requests; read limits cap
  at T3's 100.

* no-mistakes(review): Retain T3 send outcomes, freeze digests, keep Herdr push

* no-mistakes(review): Keep T3 request ids across outages and failed retries

* no-mistakes(document): Correct T3 retry, recovery, and cleanup documentation

* fix(t3code): limit the secondmate close refusal to T3 threads

Non-T3 secondmate recovery keeps its existing best-effort close, so homes
without backend=t3code run the same liveness code as main. A T3 secondmate
whose thread reads missing now re-proves the close through the idempotent
archive before a replacement thread launches, and an unproved close spawns
nothing.

* no-mistakes(review): Report lost T3 launch-brief replies as unconfirmed, keep task record

* no-mistakes(document): Correct T3 backend documentation and recovery guidance

* fix(t3code): drop the unused local that failed CI lint

ShellCheck SC2034 flagged the unused `between` local in the T3 secondmate
close-proof test, failing the Lint 1 job on the original pull request.

* fix(t3code): cover T3 0.1.0's full-access scopes in the sign-in pairing code

T3 0.1.0 grants a full-access mcp-client orchestration:read,
orchestration:operate, settings:write, and source-control:write, and its
OAuth decision refuses a pairing code that does not cover all four. The
sign-in minted its code with only the read and operate scopes the 0.0.46
nightlies required, so login failed on the stable release with
insufficient_scope. Request all four; the 0.0.46 nightly CLI accepts both
added scope names, and the issued credential is still the server's own
full-access scope set.

* no-mistakes(review): Document remote code-root update requirement for new inherited items

* no-mistakes(review): Route T3 secondmates to the re-read nudge, not restart

* no-mistakes(review): Tolerate older receivers' absent-item refusal; refuse T3 raw launch

* no-mistakes(review): Harden T3 abort, launch, watch paths; drop default-path forks

* no-mistakes(review): Fix T3 daemon restamp, project race, Git config, settings merge

* no-mistakes(review): Write only Firstmate's hook entry to T3 env files

* no-mistakes(review): Fix T3 symlink guard, cleanup leaks, blocked-supervisor digests

* no-mistakes(review): Scope T3 codex pre-check; tighten tests; correct T3 docs

* no-mistakes(review): Key T3 codex pre-check on tracked config; fix forge doc

* no-mistakes(review): Treat empty T3 replies and held local failures as unconfirmed

* no-mistakes(test): Keep pre-existing CLAUDE.local.md on refused t3code spawn

* no-mistakes(document): Correct T3 away-mode injection and stale-marker docs

* no-mistakes(ci): The failing check is the auto-relaunch leg of tests/fm-remote-secondmate-lifecycle-e2e.test.sh ("the watcher did not exit on its auto-relaunch wake within the bound"). The flake predates this branch, but the branch makes it more likely, so I fixed the test. The whole test file now passes locally. Does the branch touch the path? Partly. - For a herdr remote mate, the branch leaves the liveness probe, the relaunch, the watcher tick and fm-spawn.sh's remote-secondmate path unchanged. Every T3 branch there is gated on backend=t3code. - But the branch adds `t3code-instances` to FM_INHERITABLE_CONFIG, ahead of captain-shared.md. Every remote spawn, including the watcher's relaunch, now pushes one more remote `absent` record. - CI per-leg timings, branch vs two main runs: legs that push inheritance are about 5-12% slower (37.3 vs 35.5s, 54.3 vs 48.0-49.7s, 55.5 vs 49.9-52.1s, 30.6 vs 26.3-27.9s). Seeding-only legs are identical. Evidence the flake predates this PR: - On main this leg already takes 30.1-32.9s. - The test waits 1500 iterations of `sleep 0.02`, about 30-35s. - The watcher's own relaunch bound, FM_SECONDMATE_LIVENESS_TIMEOUT, defaults to 120s. - The identical failure appears in 7 other recent failed CI runs on unrelated branches (fm-upstream-six-local-fixes, fm-stooddown-worker-false-wedge-alarms, fm-resolve-quota-attention, fm-session-stall-2026-10-16, fm-7426-pr, fm-polytoken-worker-adapter-v2, fm-remote-convergence-upstream). None of them contain bin/backends/t3code.sh. Violated invariant: the test must never fail a relaunch the watcher still accepts inside its own relaunch bound. The fix is test-only. It is the uncommitted change to tests/fm-remote-secondmate-lifecycle-e2e.test.sh that the timed-out earlier agent left; I reviewed it and kept it. - The watcher leg pins FM_SECONDMATE_LIVENESS_TIMEOUT=120, the same value as the default. - The iteration-count loop becomes a wall-clock deadline: that bound plus 30s for startup and probe. - Either spawn outcome, success or timeout (124/137), still wakes and exits the watcher, so the ordinary path ends as soon as the relaunch completes. - The `t3code-instances` inheritance item is a feature this PR needs, so I left the product code unchanged. The file's other ~30s waits each wait for a point partway through a spawn, not for a product-owned bound. They are the spawn and the config push reaching a blocked inheritance write, and a respawn reaching a blocked launch. All three passed locally, and the first two also passed in this branch's CI run, so I left them alone. Verification: - `bash -n` and `shellcheck -x` pass. - I ran only this one test file through bin/fm-test-run.sh, as instructed. Result: exit=0, total=1 failed=0, duration 1246656ms. This Mac runs about 2.5× slower than CI. - "watch liveness: a dead remote secondmate is auto-relaunched on its own host with one wake" passed after 89s (02:42:43 → 02:44:12). The old ~30s wait would have failed it; the new deadline is 150s

* no-mistakes(review): Document t3code-instances absent-push cost for remote inheritance

* no-mistakes(ci): The failing check is a timing flake in tests/fm-watcher-lock.test.sh, not a defect in this branch's code. I fixed it with a test-only change. What failed: in "Behavior portable serial 7", test_lock_recovers_dead_nested_steal_chain failed with "not ok - dead link-lock owner did not publish its pid" (tests/fm-watcher-lock.test.sh:394). That message comes from the helper leave_dead_link_locks. The helper starts a bash child that sources bin/fm-wake-lib.sh and creates one or more link locks, then waits for the child to write its pid. The wait was 50 rounds of `sleep 0.02`, about 1s on Linux CI. The other child-startup waits in this file allow about 5s (lines 536, 635, 808). Locally the child publishes in about 60ms, so the 1s bound only fails when the runner stalls. Did the branch cause it? The branch does not touch the test, bin/fm-wake-lib.sh, bin/fm-path-lib.sh or tests/lib.sh. Its only change to bin/fm-test-run.sh puts the new T3 tests into test families, which can change which tests share a serial shard. I searched the failed CI logs of the last 60 runs on other branches and found no instance of this failure, so I can't show it predates the PR. Violated invariant: a wait the test owns must not fail a child that a loaded runner merely slows down. Sibling sites: the helper is the one shared place where all four of its callers wait (reclaims_dead_steal_owner, recovers_dead_nested_steal_chain, steal_reap_cannot_remove_successor, resumes_own_interrupted_steal_reap), so the one edit covers all of them. The other short wait in the file (line 132) reads output from a watcher that has already exited, not a child still starting up. Fix: one edit to the helper. The loop runs up to 250 rounds instead of 50, about 5s, the same as the file's other startup waits, with a two-line comment. It still returns as soon as the pid appears, so the normal path is unchanged. No product code changed. Verification: - `bash -n` and `shellcheck -x` pass. - I ran the four helper callers from a temporary copy of the file, with only the child's startup delayed by 10s. - Old helper: fails with the exact CI message "dead link-lock owner did not publish its pid" (rc=1). - New helper: all four pass (rc=0). - With no delay, all four pass in about 2s. - I could not run the full file locally. An unrelated earlier test, test_lock_stale_steal_single_winner_under_concurrency, hangs on this Mac's bash 3.2: the read from its FIFO fails with "Interrupted system call". That test passed in this CI run and is outside this fix, so I left it alone and stopped the run. - The temporary driver files were removed. The unselected ci-2 (Behavior portable serial 2, cancelled with no verdict) was not addressed

* no-mistakes(document): Fix T3 path inventory and thread wording

* no-mistakes(review): Fix T3 lease abort, approval identity, waits, and selection

* no-mistakes(review): Pin T3 approval identity to verified v0.1.0 waiting items

* no-mistakes(review): Remove stray Paseo fragment from fm-backend.sh header

* no-mistakes(document): Correct T3 lease, send-verdict, and teardown docs

* no-mistakes(review): Prove T3 launch archives, clean aborted homes, reap nested homes

* no-mistakes(review): Keep T3 slot lease only on dirty-slot refusal

* no-mistakes(review): Treat T3 orchestration_error as unconfirmed; fix backend docs

* no-mistakes(review): State unproven T3 outcome cause in operator text

* no-mistakes(review): Refuse T3 secondmate teardown without lsof; name env cleanup

* no-mistakes(review): Restore main's reassigned-slot test; add separate T3 overlay test

* no-mistakes(test): Document Codex trust prerequisite for T3 Codex env

* no-mistakes(document): Correct T3 uncertain-launch lease and coverage docs

* no-mistakes(review): Warn on unconfirmed T3 Codex trust; harden launch-archive proof and tests

* no-mistakes(document): List T3 Codex trust warning in coverage inventory

* no-mistakes(ci): The rebase onto 25bb43b completed cleanly. I also fixed a CI test-coverage failure that the combined tree caused, by adding a tenth portable serial CI shard. Every verification run passes. The shard fix is in the working tree and not committed. **Rebase:** all 82 commits are replayed with no merge commits, and the new head is f1bb58ae. Each commit keeps its original author, date and subject, including Bryce Eppler's. - One commit conflicted: fff8ce69, in tests/fm-remote-secondmate-lifecycle-e2e.test.sh. Main (ac8a767) raised a watcher wait loop from 1500 to 3000 iterations of `sleep 0.02`, about 60s. The branch replaces that loop with a 150s wall-clock deadline: the watcher's 120s relaunch bound plus 30s. I kept the branch side, which already gives the longer wait main wanted. - The branch's patch on the new base matches the original apart from line numbers. Main's patch also matches, except for that one hunk. - Main also edited fm-watch.sh, fm-pending-reply-lib.sh, fm-fleet-snapshot.sh, fm-test-run.sh and some docs. Its edits there sit in different hunks from the branch's. **Coverage-guard break:** each side passes alone, but together they do not. CI's "Test coverage guard" job runs `bin/fm-test-run.sh --check-coverage`, which failed with "largest portable serial shard packs 1200805ms above the 1200000ms target". | tree | serial lane total | largest shard | |---|---|---| | main | 10582151ms | 1192918ms (ok) | | branch before rebase | 10762151ms | 1195805ms (ok) | | rebased | 10807151ms | 1200805ms (over by 805) | - **Cause:** the five tests the branch adds have no timing hint, so each is packed at the 45000ms default. Main added one more unhinted test. Nine shards hold at most 10800000ms. - **Why hints alone don't fix it:** this PR's CI runs 39463576576, 39814995718 and 39883948163 measured the slowest successful samples: | test | slowest sample (ms) | |---|---| | fm-backend-t3code | 239245 | | fm-t3-mcp | 57613 | | fm-watch-inbox-meta | 283 | | fm-backend-t3code-live-e2e (live-guard skip) | 51 | | fm-backend-t3code-pr-tools-live-e2e (live-guard skip) | 52 | With these the lane totals 10879395ms. That is more than nine shards can hold, and docs/fm-test-portable-shards.md says to refresh hints or add shards rather than raise the job timeout. **Fix (test and CI files only, nothing a home runs):** - `bin/fm-test-run.sh`: `PORTABLE_SERIAL_SHARDS` goes from 9 to 10, and the five measured hints are inserted without reordering existing lines. - `.github/workflows/ci.yml`: the serial matrix gains shard 10. The timing aggregate already collects artifacts by glob, so it picks up the new shard. - `docs/fm-test-portable-shards.md`: records where the hints came from, and says fifteen long-lived jobs, ten of them serial. - With ten shards the largest is 1192918ms, the indivisible fm-supervision-host test, and the others land near 1076300ms. This adds one CI runner per run. It is the remedy the shard docs prescribe, but the maintainer may want a say since the PR now changes CI capacity. **Verification (all pass):** - tests/fm-test-run.test.sh, including the coverage-guard and packing-boundary cases. - tests/fm-ci-workflow.test.sh and tests/fm-lint-workflows.test.sh. - tests/fm-pending-reply.test.sh and tests/fm-fleet-snapshot-contribution-input.test.sh. - `bin/fm-lint.sh` on bin/fm-test-run.sh and on the files both sides touched. - `bash -n` on every script in bin, bin/backends and tests, and `node --check` on bin/fm-t3-mcp.mjs

* no-mistakes(review): Fix T3 review findings and revert tenth CI shard

* no-mistakes(review): Prove next-since arrival write; keep T3 backend suite serial

* test(t3code): run the T3 suites in the portable parallel lanes

The two T3 suites pushed the portable serial lane past the nine-shard
budget. Give every case id the backend suite spawns a per-run suffix so
its /tmp/fm-<id> directories cannot collide across concurrent runs, with
cleanup limited to the ids that run created, then move both suites into
the proven-isolated set with their CI-measured hints as parallel hints
and rebalance the two parallel lanes. Record the concurrent proof.

* fix(t3code): refuse a Codex approval mode T3 cannot honor

T3 starts every worker at its full-access runtime mode, so a t3code
codex spawn with config/codex-approval-mode=approve-for-me would launch
at full access while recording approval_mode=approve-for-me. Refuse it
before any mutation, as the Claude permission-mode refusal already does,
and cover the refusal and the bypass posture with fake-server tests.

* no-mistakes(review): Refuse managed approval failover for t3code tasks

* no-mistakes(document): List T3 failover refusal in approval coverage inventory

* fix(t3code): name the Codex restricted mode in the T3 refusal

config/codex-permission-mode=restricted sets the Codex approval posture
that a t3code spawn already refuses, but the refusal named
config/codex-approval-mode. Name the setting that produced the posture,
document the limit beside the restricted mode, and cover the refusal.

* no-mistakes(document): Name T3's Codex restricted refusal in fm-spawn header

---------

Co-authored-by: Bryce Eppler <eppler97@gmail.com>
…unchenguid#7705)

A Windows/Git Bash home records its session in state/.lock as a tagged
win:<pid>, and fm_session_pid_valid owns whether a lock value is a usable
identity. Several readers still decided that with a private numeric test,
so a correctly locked Windows home read as malformed:

- bin/fm-turnend-guard-cursor.sh (kunchenguid#4535): the owner check, the stale-owner
  reclaim fallback, and the owner read before parking. The Cursor park now
  recognizes its own tagged lock and reclaims a dead tagged holder's lock;
  liveness was already answered by fm_harness_pid_alive.
- fm_extension_pair_owns_supervision in bin/fm-wake-lib.sh (kunchenguid#4539): a live
  tagged session read as dead, which printed the supervision-off banner
  during a healthy Pi extension hand-off. A win:-shaped value now loads the
  session-lock library and is answered by fm_session_pid_valid and
  fm_harness_pid_alive; a POSIX value keeps the existing kill -0 test.
- The three .pi/extensions lock readers (kunchenguid#4539): on win32 only, a strict
  win:<digits> value is compared and probed by its digits, because native
  Node sees Windows pids directly. pid 1 stays rejected, and the branch
  extension keeps the tagged value whole for its lease holder.

Malformed tags, and any tag off Windows, are still rejected. Regressions
cover each reader with a faked Windows process table or platform, so they
run on every host.
…7489)

* Accept GitHub Enterprise pull request URLs

fm_pr_url_parse accepted a GitHub pull request URL only on github.com and
hard-set the recorded host, so a task PR on GitHub Enterprise (Cloud *.ghe.com
or Enterprise Server) could not be registered, watched for merge, merged, or
read back after a merge.

A GitHub URL now carries its host like the GitLab, Gerrit, and Forgejo
identities already do, with GitHub's owner and repository rules unchanged.
github.com needs no configuration and behaves exactly as before. Any other host
is accepted only when this home names it in config/github-hosts, because a URL
shape cannot tell a real GitHub host from a look-alike such as github.1485827954.workers.dev.evil;
only an exact line match authorizes, so comments and malformed lines allow
nothing.

The parsed host is then carried to every forge call on those paths as GH_HOST,
which gh and gh-axi both honor: registration, the static merge poll, the merge
command and its pre-merge reads, the merge-outcome read, the teardown read, and
the crew-state PR state read. github.com exports nothing and keeps its ambient
behavior.

Backlog PR links still need the companion tasks-axi change, because that
package validates the URL itself.

* no-mistakes(review): Fix default-home Enterprise host configuration lookup

* no-mistakes(document): Clarify GitHub Enterprise host configuration documentation

* no-mistakes(ci): Captain, fixed the CI lint failure with three scoped ShellCheck comment lines in tests/fm-pr-check-security.test.sh. Canonical lint, the complete behavioral suite, and git diff --check pass. Full CI partition rerun remains with the outer executor
…nsitive tests (kunchenguid#7632)

test_signal_catchup_without_running_watcher now starts each run's deadline
only after the launched watcher holds its singleton lock, through a bounded
wait_for_watcher_lock helper that still fails and stops a watcher that never
takes its lock. The remaining run (one poll cycle plus the fixed signal grace)
gets a finite bound sized from contention measurements; with heartbeat and
checks disabled, a watcher that misses the catch-up never exits, so it still
fails.

test_owner_mutex_contention_preserves_failure_episode_reset now ends its
reset-boundary wait on the arm handshake or the hook's own exit, failing at
once with the hook's status and output when it dies before the boundary, and
keeps a generous finite bound for a hook that stalls.

All behavioral assertions are unchanged; no production file changes.

Fixes kunchenguid#6678
…unchenguid#7167)

* feat(bin): add Cortex Code as a verified crewmate and scout harness

Adds the cortex adapter (Snowflake Cortex Code) for crewmate and scout work
alongside the existing verified adapters, on the tmux and herdr backends.
Herdr reads Cortex's titled composer lazily: it declares cortex=ask and the
shared classifier answers need-identity only for a titled rounded glyph box,
so panes that never show one make no extra agent get call.

* no-mistakes(document): List paseo in Cortex backend-refusal docs

* docs(cortex): list rex and t3code among refused backends
…chenguid#7731)

* fix(supervision): acknowledge opt-in host hand-backs

When the attended supervision host hands responsibility back to the main
conversation, at the park boundary or on a main-only pass-through, it left
no watcher that outlived a lost continuation, so a home could stay
unsupervised with no alarm.

With config/supervision-handoff-ack present, a Claude host hand-back now
queues a token-bound check and starts a verified, home-scoped successor
(bin/fm-supervision-handoff.sh). The successor keeps replacing closed
watcher cycles and raises the hand-back again until the main conversation
acknowledges it through the sequence-bound wake drain. Automatic retry
delivery needs a verified tmux pane; other terminals keep watching and wait
for a normal turn.

The behavior is off unless the flag exists, so the default hand-back paths
are unchanged.

* no-mistakes(test): log host rows before the acknowledged hand-back

* no-mistakes(document): document acknowledged hand-back flag, state files, retry knob

* no-mistakes(ci): Fixed the test race in tests/fm-supervision-host.test.sh (test_acknowledged_handoff_at_the_turn_keeps_the_pass_through_row), the only failure in "Behavior portable serial 1". Invariant: after an acknowledged hand-back at the turn, a live watcher must exist, but the owner replaces the stopped successor arm only within its one-second poll, so a one-shot watcher_live read at the hand-back instant can observe the gap. The sibling lost-continuation cases already wait for the owner's replacement, so this was the one remaining one-shot site on the hand-back path. Change, per the user's instruction: the assertion is now `wait_until 150 watcher_live "$home" || fail "ack turns-main-only: the hand-back left no watcher: $(cat "$home/state/.watch-cycle-exits.log")"`, and the timed-out agent's comment is cut to two lines saying the owner replaces the stopped arm within its poll, with no date. Nothing else changed (diff: 4 insertions, 2 deletions in that one file). Verification: ran the four hand-back tests (lost boundary, lost pass-through, acknowledged at the turn, retry respects receiving pane) via a temporary reduced copy three times, all passed with exit 0 each time; shellcheck -x on the test file passes. A full-file run and an 8-iteration reproduction loop with the original one-shot assertion were started but stopped before completing when the structured result was demanded; the three repro iterations that finished passed locally, so the race was not reproduced on this host (it depends on the owner poll timing CI hit). Temporary copies were removed; the worktree contains only the one modified test file, uncommitted
…guid#7738)

* feat(bin): pin a local omp secondmate to its own omp profile

Add the opt-in config/secondmate-accounts/<id>/omp-profile file in the
primary home. When present, that local secondmate's omp agent launches
with --profile <name> and its pre-launch catalog check reads the same
profile; the pin is recorded as omp_profile= in the task record and on
the spawned line. A malformed file refuses before any endpoint, local
copy, or record exists, and a relaunch checks it before stopping the
running agent. An absent file leaves every launch unchanged.

* no-mistakes(document): Document optional omp --profile flag in omp adapter reference

* no-mistakes(review): Reject Windows reserved device names in omp profile pins
…e host's grant (kunchenguid#7265)

* fix(wake): pin TZ in the process-table pid identity

fm_pid_identity's ps fallback (macOS, or any host without /proc) renders
lstart in local time. A supervision engine launched through a wrapper that
exports a different TZ than the host's hook environment read the host's
branch-grant owner identity as a different process, so its drain discarded
the grant as stale and refused. The engine reported but could never
acknowledge its granted rows, and the host handed nearly every wake to main.

Pin TZ=UTC0 alongside the existing LC_ALL and COLUMNS pins, and pin the same
zone in fm-extension.mjs's pidIdentity, which compares identities the bash
helper writes. Add a host regression test that runs the engine in another
time zone than the host on the process-table path.

* no-mistakes(review): Document TZ-pin identity upgrade-window residual

* no-mistakes(document): Note TZ pid-identity upgrade residual in turnend-guard doc
vincethe1 and others added 28 commits November 8, 2026 23:45
…henguid#8294)

* feat(skills): add lavish-url page capture and feedback routing

Add the /lavish-url skill and bin/fm-lavish-url.sh. `snapshot <url>
[--mobile]` renders a public or local page through chrome-devtools-axi,
rebuilds it through a hostile-input sanitizer (bin/fm-lavish-url.py),
injects the universal review layer with [Fix Layout], [Update Text], and
[Mobile Bug] prompt chips plus every matching enhancer (default, odoo,
teatop), proves the Lavish session is listed open, and arms it through
bin/fm-procevent-lavish.sh arm. `path`, `resolve`, and `owns` locate
snapshots and routes; `route <source-id> <sequence> [--file]` presents a
captured feedback wake through the adapter's read and files it once as a
queued item in the backlog of the registered project that owns the URL's
host, refusing inferred, ambiguous, and unrouted mappings.

Document config/lavish-url-domains, point Lavish wakes for snapshots at the
skill, and add tests/fm-lavish-url.test.sh with its serial duration hint and
changed-path selection.

* no-mistakes(review): Preserve CSS comparisons and remove unused matching interface

* no-mistakes(review): Preserve URL commas when parsing responsive image candidates

* no-mistakes(document): Clarify Lavish URL usage and documentation ownership

* no-mistakes(ci): Captain, fixed all four findings: isolated capture sessions with cleanup, atomic snapshot reservations, safe CSSOM preservation with inaccessible-sheet metadata, and collision-resistant review controls. All 8 behavioral tests, targeted fm-lint.sh, and git diff --check passed. No pipeline or publication actions performed

* no-mistakes(ci): Captain, fixed both findings: captured CSS retains stylesheet order, and snapshot reservation retries only on name collisions. Added behavioral regressions. All 9 focused tests, targeted fm-lint.sh, and git diff --check passed. No pipeline or publication actions performed

* no-mistakes(ci): Captain, replaced the permission-dependent regression with an ENOTDIR injection that exercises the production reservation error path regardless of privileges. It verifies prompt nonzero exit without capture or arming. All 9 focused tests, targeted fm-lint.sh, and git diff --check passed

* no-mistakes(ci): Captain, removed the TeaTop enhancer and references, replaced fixtures with example.test hosts, and retained host-matching coverage using a test-only enhancer. All 9 focused tests, targeted lint, documentation checks, and git diff --check passed. No pipeline or publication actions performed

* test(lavish-url): replace tea/teahouse test fixtures and host with generic portal fixtures

* no-mistakes(document): Clarify Lavish snapshot naming, styles, and metadata

* no-mistakes(ci): Captain, fixed ci-1: readable CSSOM replaces original inline style text in place, including empty copies; unreadable sheets retain original text. Sanitization remains intact. Regression failed before the fix; all 9 focused tests, script lint, and diff checks now pass. Rejected enhancer work remains untouched
…kunchenguid#7619)

* fix(pi): rearm the watcher independently of a held wake delivery

docs/watcher-continuity.md promises that each adapter starts the next
watcher arm before delivering the wake prompt. On a Pi primary with a
busy supervision branch that was not what happened: watcher closes
were handled one at a time behind a single 'restoring' flag, so a
freshly restarted watcher that closed again waited in pendingActionables
until the earlier branch delivery settled. For that whole time no
watcher was armed.

One day's arm ledger showed successor arms starting 297 to 1244
seconds after the previous arm closed, and the 'turn would end blind'
guard firing 26 times in that day with the last beat 43 to 1214
seconds old.

Arming and delivery are now separate concerns. Each close restores
continuity in a generation-owned pump that does not wait on the
serialized wake delivery, and the wake queue is still delivered one at
a time. A successor's failure during restoration keeps its bounded
retry once the continuity operation finishes, so a failure that lands
during a held delivery is still retried instead of being skipped.

The regression test holds a branch delivery open, closes the new
watcher, and asserts that the successor arm starts before the delivery
resolves.

* docs(watcher): record the Pi successor-start and delivery split

* fix(pi): confirm the handling handoff inside the continuity operation

* test(pi): make the repeated-close fixture generation-aware

* fix(pi): settle a deferred close with the operation that held the guard

* no-mistakes(document): docs(watcher): record Pi held-delivery restore and handoff coverage

* no-mistakes(document): docs(watcher): fix Pi deferred-retry wording
* fix(watch): surface overdue pauses as decisions

* no-mistakes(review): Classify overdue pauses as blocked stale decisions

* no-mistakes(review): Enforce strict pause ceilings; durable blocked decisions remain unresolved

* fix(watch): make overdue pauses actionable

* no-mistakes(document): Document overdue pause behavior and configuration

* no-mistakes(ci): Invariant: every overdue pause—dated or undated, including a worker classified as working—must open an actionable keyed decision, and leaving that pause must resolve it. The affected paths are the stale `paused` and `working` classifications, plus status transitions that resume or replace a pause. Added the overdue check to the working classification and attempted automatic resolution on resume, with undated coverage. Verification is incomplete: `bash tests/fm-watch-triage-pause.test.sh` fails because the resumed worker still leaves the decision open. This phase is not complete; the fix needs further work

* no-mistakes(ci): Updated the undated pause test to use portable `set_mtime`, refresh `.seen-until_status`, and allow the expected ordinary recheck exit while asserting no overdue decision opens before the ceiling. The focused test script timed out after 120 seconds, before reaching the changed test. The `working` route still reaches `wedge_timer_check` without the overdue check; that selected finding remains unresolved, so this CI phase is incomplete

* no-mistakes(ci): Updated the working-classification route to check both overdue ceilings before the wedge path, and added automatic resolution when a pause is replaced by a fresh, non-overdue pause. `bash -n` passed. Focused dated-resume and undated-overdue tests still fail (decision remains open / is not created); the full test script timed out before reaching them. This CI phase is incomplete

* fix: resolve overdue pause decisions on status changes

* fix: close overdue pauses only on resume

* no-mistakes(document): Document overdue pause behavior

* no-mistakes(ci): Fixed the overdue marker to bind its offset to the status file’s device/inode and clear on replacement or shrink. An open marker now suppresses the ordinary terminal-stale path despite pane changes. `bash -n` and `git diff --check` passed; the focused test script timed out after four of 31 cases, so the new behavior is not fully verified. Behavior tests for pane churn and task-ID reuse remain to be added

* fix(watch): preserve overdue pause markers

* no-mistakes(document): Document overdue pause behavior and configuration

* fix(watch): retire overdue markers on teardown

* no-mistakes(ci): Implemented a shared dated/undated overdue-pause predicate and routed both watcher and daemon pause rechecks through it. The daemon now appends the keyed blocked decision, records the status-file identity/offset marker, and queues one stale escalation. `bash -n` and `git diff --check` pass. The requested daemon behavior test was not added or run; this change is not fully verified

* no-mistakes(ci): Fixed the daemon overdue-pause append path to accept both successful return codes and persist the blocked line’s exact end offset before queuing the wake. `bash -n` and `git diff --check` pass. The focused pause suite timed out after five cases; the requested daemon-path behavior test was not added or run, so verification is incomplete

* fix(watch): test overdue pauses in away mode

* no-mistakes(review): Keep malformed dated pauses on bounded rechecks

* no-mistakes(review): Reconcile daemon overdue decisions on worker resume

* no-mistakes(document): Document overdue worker pause behavior

* no-mistakes(document): Document overdue pause decisions

* fix(supervision): dedupe overdue pause alerts

* no-mistakes(review): Gate overdue pause decisions on away posture

* no-mistakes(review): Preserve unread status events during overdue escalation

* no-mistakes(review): Use shared overdue predicate for watcher classification

* no-mistakes(ci): Fixed daemon-backed quiet mode to apply the overdue pause ceiling while keeping captain-held waits away-only. Added a quiet-mode regression test; the existing away-mode deduplication and unread-event regression passed. The real away-mode daemon lab passed, and `git diff --check` passed. The full daemon test script passed, including all three overdue-pause cases. Linux validation could not be run in this macOS worktree; per instruction, stopping without claiming both OS lanes passed. Final SHA: 79996166d5ce89be222935da046e1bbf2a1a2bf8

* no-mistakes(review): Resolve overdue decisions on any worker status event

* no-mistakes(review): Exercise overdue marker offsets through real status append

* no-mistakes(document): Document overdue pause handling

* no-mistakes(ci): Invariant: an overdue pause is reported only after its stale escalation is queued. The daemon’s overdue housekeeping is the sole affected path; the watcher does not own this daemon escalation. Moved the marker write after successful queueing. Added the requested retry regression, but `bash tests/fm-daemon.test.sh` fails because the test’s recovery attempt does not create the marker. macOS/Linux Lint and behavior lanes were not run; stopping without claiming validation. HEAD remains `2dd9718e2186de6e0292a593f3fcb84e96c5f201`; changes are uncommitted

* no-mistakes(ci): BLOCKED. The retry test now has a real newline and its saved-function rename matches Bash’s `declare -f` output, but `bash tests/fm-daemon.test.sh` still fails: the retry does not create `.paused-overdue-overdue-retry`. I did not proceed to other requested validation. This environment is macOS (`Darwin`); Linux validation cannot be run here, so I cannot satisfy the required two-OS validation. No commit or push was made. The daemon implementation already writes the overdue marker only after `escalate_add` succeeds; the test needs further diagnosis before this phase can pass

* no-mistakes(ci): Implemented retryable overdue alerts: failed enqueues retain pending state, housekeeping retries without duplicating the blocked decision, and reconciliation/teardown clean up pending state. `bash tests/fm-daemon.test.sh`, shell syntax checks, and `git diff --check` passed. The stated synchronized commit 49023a95 was not present in this worktree; these changes are uncommitted

* fix(daemon): keep pending overdue alerts out of the overdue-marker globs

The pending overdue alert record was named .paused-overdue-pending-<task>,
which the watcher's and daemon's .paused-overdue-* loops also matched. The
watcher read the task as pending-<task>, found no status file, and deleted
the record, so a failed alert was lost on the next watcher poll. Rename it
to .overdue-pending-<task> and cover a watcher poll between the failed
enqueue and the retry.

* no-mistakes(review): Discard resumed overdue alerts before retry

* fix(daemon): fold overdue alert retries into the overdue marker

Drop the separate pending record. The overdue marker's second line now holds
the daemon's delivery state, so keyed resolution, resume and retry all run
through one reconcile path. The marker is published atomically before the
blocker is appended, and only a daemon-owned marker hides the blocker from wake
classification, so a watcher-written marker keeps ordinary blocked escalation.

* fix(daemon): drop the overdue alert retry

A failed enqueue now leaves the overdue decision open and the next housekeeping
scan raises it, so the alert has no separate delivery path to race or lose. The
marker's second line only records a queued alert. The blocker is appended before
the marker, and an already-open decision is not opened again.

Measure the undated pause bound from the pause line's own [at=] stamp, falling
back to the file's age for unstamped lines.

* no-mistakes(review): Preserve overdue decisions across unrelated status events

* no-mistakes(review): Treat zero pause ceiling as invalid configuration

* no-mistakes(document): Document overdue pause behavior

* no-mistakes(lint): Fix ShellCheck subshell export warnings

* no-mistakes(lint): Fix ShellCheck subshell environment warnings

* no-mistakes(ci): Updated both overdue reconcilers to ignore unrecognized prose and honor FM_CLASSIFY_PAUSED_VERB; added prose/custom-verb regressions. Watcher tests and shell syntax checks passed. Daemon test suite still fails at the existing “failed queue lost the overdue marker” scenario before reaching the new regression

* no-mistakes(ci): Fixed both overdue reconcilers to use the shared status-event predicate, preserving prose as non-events while recognizing supported legacy completion lines. Added done:/merged coverage. Shell syntax and diff checks pass; watcher test passes. Daemon suite remains blocked by its known earlier failure, “failed queue lost the overdue marker,” before reaching the new regression

* feat(supervision): make the pause ceiling opt-in via config/pause-ceiling

Overdue pauses open a keyed decision only in a home with the config/pause-ceiling
presence flag; without it paused waits keep main's recheck behavior. The classifier,
watcher and away daemon each check the flag. Adds flag-absent and flag-present tests,
fixes a daemon test that never applied its fixture environment (which aborted the
rest of the file), and restores main's T3 discovery test.

* no-mistakes(ci): Fixed both overdue reconcilers to use the configured resolve verb when matching and writing resume resolutions. Added watcher and daemon regressions; focused tests and `bin/fm-lint.sh` pass
…id#8308)

* feat(bin): ask a Claude primary to /stow before compaction

Add an opt-in Stop hook that tells a primary session to run the existing /stow skill when context nears compaction or the last /stow is a day old.

* fix(bin): keep the stow ask off secondmate homes and unread clocks

A Stop block in a secondmate home left the parent recording idle, and a missing python3 still asked by age after a /stow it could not see.

* no-mistakes(review): Let continuation stops trigger stow-guard asks
…kunchenguid#8279)

The "successor never delivered its recovery wake and exited" flake came
from a sampling race in the test helper, not the watcher. SIGSTOP freezes
the old watcher's shell but not its already-forked children: when the stop
lands inside fm_lock_try_create after its ln -s child was forked, the
helper's glob of the linked *.lock names samples clean, then the child
publishes a lock recorded to a pid that can never release it. The
successor claims .watch.lock, then blocks the full startup bound in
fm_recovery_marker_reopen_announced on .wake-queue.lock, alive and
silent, until the 20s poll gives up.

fm_lock_try_create stages <lock>.owner.*/pid before the link exists, so
counting staged owner directories as held makes the stop verdict airtight:
any publication that can still land already has its pid on disk. The
watch lock's own owner dir is skipped along with the lock itself.

The failure message also gains the successor's pid, claim state, and the
recorded holder of each lock, since an empty new_out previously left the
diagnostic colon blank.

Reproduced 6/120 iterations under nproc/2 CPU load before the fix, each
failing run stalling ~55-73s at the 60s startup bound; 0/80 under the
same load after.
* fix(opencode): apply busy-state events in emission order

At every turn end OpenCode emits session.status busy then session.status
idle/session.idle ~1ms apart without awaiting the plugin hook. Each event
used to spawn its own fm-busy-event.sh apply, and the applies serialized
only on the record lock, so the earlier busy could win the last write and
leave an idle worker recorded busy until its next turn (5 of 13 turns in
the live finding; 4 of 4 in reproduction on opencode 1.18.32).

Both generated plugin variants now run every event's applies through one
promise queue, so emission order is apply order. The OpenCode 2 plugin's
server hook and setup() event.subscribe stream share that one queue and
one session latch per plugin instance instead of holding a handler each.

Regression tests fire a busy/idle pair through the real generated plugin
without awaiting, then run the real applies in reverse spawn order via an
execFile interposer, so the record ends busy deterministically whenever
serialization is lost. Verified live: on a persistent `opencode serve`
the patched plugin ends 5 of 5 real turns idle while the unpatched one
left the record busy.

* no-mistakes(document): Correct busy-state ordering contract comments
…nchenguid#8276)

* fix(remote): guard shared Herdr service ownership

* no-mistakes(review): Share Herdr identity and harden repair safety

* no-mistakes(review): Never repair a running Herdr server; serialize repairs

* no-mistakes(review): Split automatic and operator Herdr repairs

* no-mistakes(review): Document explicit operator repair's pane race risk

* no-mistakes(document): Clarify remote readiness repair documentation

* no-mistakes(document): Clarify remote Herdr session reservation

* no-mistakes(ci): Added the new identity regression’s measured duration hint, fixing coverage guard and parallel runner-test failures; documented timing provenance. Coverage guard, full runner regressions, identity regression, watcher-lock suite, and diff checks passed locally. Serial CI failure was an unrelated unchanged watcher timeout; Full suite was a downstream failure. Nothing pushed

* no-mistakes(ci): Fixed legacy guard-path decoding for apostrophes and bound takeover authorization to PID plus process-start identity, with cleanup on handled exits. Updated the pinned doctor digest. Both regressions fail before and pass after the fixes. Identity, guard, doctor, and entrypoint suites, targeted ShellCheck, and diff checks passed. Changes remain local; nothing pushed

* docs(remote): clarify Herdr root session ownership
* fix(bin): let relaunch use the recorded project's common-dir boundary

The relaunch isolation check compared the task copy's own --git-dir to
its own --git-common-dir, which are equal for every standalone clone, so
a worker launched into a clone could never be relaunched: fm-control
stopped the old agent first, then the launch owner refused it as a
"primary checkout" and left no replacement. Compare the copy's git dir
against the recorded project's common git dir instead - the same
boundary fresh spawn's spawn_worktree_isolated draws - while keeping the
home, code-root, and true primary-checkout refusals and the secondmate
exemption.

* no-mistakes(document): Clarify relaunch isolation documentation
* feat(pr-poll): wake on a ready PR/MR degrading after its ready report

A ready PR/MR watched only for its merge sat idle when it degraded after
the ready report: a GitLab merge train dropping the merge request (its
readable trace is the failed head pipeline) or GitHub checks turning red
fired no wake, so the worker and its supervisor waited until a human
noticed. The existing merge poll now also emits one degraded line for
that transition, naming the failed jobs with the forge's failure reasons
and the pipeline or check URL so the wake says which test broke without
a job-log dig.

- bin/fm-pr-poll.sh reads the GitHub rollup through gh's own --jq and the
  GitLab record through glab -F json, the same read the merge path makes,
  so both forges share the merged contract and gain the degraded line.
- The watcher dedupes one wake per head/pipeline identity through a
  validated per-task marker (bin/fm-pr-lib.sh); a repeat is silent and a
  changed identity wakes again. The merged wake is unchanged.
- GitLab arming requires jq like the Gerrit and Forgejo watches, because
  the rendered view carries no head pipeline state.
- Re-arming clears the marker; teardown removes it with the other
  per-task PR-poll artifacts.
- Regression tests cover both forge paths, the silent paths, and the
  once-per-transition dedupe at the watcher level.

* no-mistakes(review): Wake on GitLab merge-train drops; jq-less merged fallback

* no-mistakes(review): Match only HTTP 404 for merge-train drop detection

* no-mistakes(review): Name failed jobs on train drops; baseline degraded-at-ready

* no-mistakes(review): Re-read MR after train 404 before reporting a drop

* no-mistakes(document): Document degraded-after-ready merge poll wakes

* no-mistakes(ci): Lint 1 failed on shellcheck SC2034: the shape loop in test_github_degraded_poll (tests/fm-pr-check-security.test.sh) assigned `field` (and an intermediate `rest`) that were never used. The invariant is that every assigned variable in the test is used. That loop is the only site. The working tree already removes both assignments (shapes are now 'Type|VERDICT', with `verdict=${shape#*|}`). `shellcheck tests/fm-pr-check-security.test.sh` now reports nothing. I started the full test file, but it was stopped at its background time limit, so its pass/fail result is unconfirmed. The change only drops dead variables, so behavior is unchanged. I did not touch the Behavior portable checks (ci-1 to ci-3), per the task owner's ruling that they are unrelated flakes

* no-mistakes(ci): The ci-1..ci-4 fixes were already in the worktree, so I made no code edits. I did not commit or push: this phase must not push, and the outer executor owns that. The four targeted regression tests did not finish, so the fixes are not confirmed by a passing test run. - **Shellcheck:** `shellcheck -x -S warning` on bin/fm-watch.sh, bin/fm-pr-check.sh, bin/fm-pr-poll.sh and tests/fm-pr-check-security.test.sh is clean. Plain `shellcheck` reports only info-level SC1091 (sourced files not followed). - **Regression tests:** I ran the four targeted functions from a temporary runner: test_gitlab_merge_watch, test_arming_baselines_an_already_degraded_change, test_degraded_poll_wakes_once_per_transition and test_degraded_wake_survives_an_unsaved_marker. It printed no output and was stopped at its 10-minute background limit on this loaded host. Per your instruction I did not restart it or run the full test file. - **Cleanup:** I deleted the `tests/zz-*` scratch runners, including my own temporary one. `git status` now shows only the five intended modified files: the operational-home-layout skill, the three bin scripts and the security test

* no-mistakes(ci): ci-2 fixed in code, but the new test is unverified. In bin/fm-pr-check.sh the arming baseline read of fm-pr-poll.sh now runs through fm_run_timed (fm-timeout-lib.sh is now sourced) with the bound ${FM_CHECK_TIMEOUT:-30}. A timeout (status 124) or any other nonzero exit prints "error: baseline read of the PR poll timed out/failed" and exits 1. The EXIT cleanup releases the control lock, and nothing is published because the poll is published after the baseline. The success path is unchanged. Before this edit a failed baseline read was ignored and arming went on without a baseline, so any nonzero exit from the poll now fails registration. I extended test_arming_baselines_an_already_degraded_change with a stalled-read case: FM_CHECK_TIMEOUT=1 and FM_TEST_GLAB_SLEEP=3. It asserts arming exits non-zero, the error names the timed-out baseline read, .control-task-a.lock is gone and no task-a.check.sh exists. `shellcheck -x -S warning` on bin/fm-pr-check.sh and tests/fm-pr-check-security.test.sh is clean. I tried two temporary runners, one for the whole target function and one for just the new case plus a plain arming success. Both hit this loaded host's time limit with no output, so the new test has not been run. I stopped them and deleted the runner. I did not commit or push, because this phase must not push. Only bin/fm-pr-check.sh and tests/fm-pr-check-security.test.sh are modified

* no-mistakes(ci): ci-2 fixed in bin/fm-pr-check.sh. Invariant: a failed or timed-out re-arm must leave the task metadata and the previously published poll unchanged. The control-lock acquisition (still skipped when FM_PR_CHECK_MERGE=1) and the bounded baseline read (fm_run_timed ${FM_CHECK_TIMEOUT:-30}, exit 1 on timeout or failure) now run before the metadata rewrite under the meta lock. Lock order is control -> meta -> publish, and the ordering comment is updated. The marker write or removal stays just before poll publication, after the metadata rewrite, under the control lock. The control lock is released after publication as before. Regression test: test_arming_baselines_an_already_degraded_change in tests/fm-pr-check-security.test.sh now arms task-a on PR 1, then re-arms to PR 7 with FM_CHECK_TIMEOUT=1 and FM_TEST_GLAB_SLEEP=3. It asserts the re-arm exits non-zero, task-a.meta still holds the PR 1 url, fm_pr_poll_artifacts_valid passes for the PR 1 poll, and .control-task-a.lock is gone. Verification: `shellcheck -x -S warning` on both touched files is clean. The new test has not been run, because this loaded host hit its time limit on earlier runner attempts and the full test file was not to be run. I did not commit or push, because this phase must not push. No temporary runner is left, and only bin/fm-pr-check.sh and tests/fm-pr-check-security.test.sh are modified. bin/fm-pr-poll.sh is untouched

* no-mistakes(ci): Removed the tracked temporary runner tests/zz-run.sh with git rm. The deletion is staged but not committed or pushed, since this phase must not push. Invariant: no scratch runner ships in the tree. No other tests/zz-* files exist, and no other files changed. No tests or lint were run because the change only deletes an unused scratch file

* fix(pr-poll): hard per-read limit on GitLab failure-detail reads

Each GitLab failure-detail read (failed-pipeline and train-drop paths) now
runs under its own five-second limit, so a hung glab read is cut and the
known failure is still emitted with the detail read so far instead of the
poll being killed by the watcher's check timeout before it prints.

The static poll sources nothing, so it uses the same perl fork-and-kill
bound the watcher falls back to for its own checks; a bare alarm is not
enough because glab's Go runtime ignores SIGALRM. The regression test uses
a fake glab whose detail reads hang while ignoring SIGALRM.

* no-mistakes(test): Add FM_TEST_WATCH_BOUND override and robust wake-queue count

* no-mistakes(test): Separate glab stdout/stderr in train poll; harden watcher test

* no-mistakes(ci): Fixed ci-2 and ci-3; ci-1 stays declined. The new arming and cross-project checks now pass, and shellcheck -x -S warning is clean on bin/fm-pr-poll.sh, bin/fm-pr-check.sh and tests/fm-pr-check-security.test.sh. ci-2: bin/fm-pr-poll.sh takes a `--baseline` flag, passed only by bin/fm-pr-check.sh. With it, a failed or unreadable forge read exits 3 and prints nothing, across GitHub, GitLab (including the merge-train car read and the post-404 re-read), Gerrit and Forgejo. The watcher's `--validated` call still stays silent on every error. bin/fm-pr-check.sh turns status 3 into "baseline read of the PR poll could not read the forge" and exits 1 before the metadata rewrite and publish. The old metadata and published poll are untouched and the control lock is released. A clean, readable not-degraded record still arms with no baseline. ci-3: `gitlab_failure_detail` carries `downstream_pipeline.project_id` with each downstream pipeline id and reads its jobs and bridges through `projects/<project_id>/...`. It falls back to the MR's project when no project_id is present. The 4-pipeline, 10s, 5s-per-read and depth-below-3 limits are unchanged. Tests: I added a cross-project poll regression to `test_gitlab_merge_watch`, where the fake glab serves the child jobs only under that other project's path. I also added unreadable-forge arming cases to `test_arming_baselines_an_already_degraded_change`: glab and glab-API failures, a failed re-arm that keeps the old metadata and poll, and a GitHub failure. I ran these only through a temporary runner outside the repo; the cross-project case printed ok and the arming block ended with "ok - an unreadable baseline read fails arming and keeps the previous watch". I did not run the existing poll-stderr-check.sh script or any watcher-driven scenario. My first version of the baseline mode treated a successful car read with a non-car body as unknown, which broke ordinary arming. That is fixed: only an unparseable body is unknown. The temporary runner is deleted and the worktree holds only the three modified files

* fix(pr-poll): make no GitLab detail read without perl

The per-read limit on GitLab failure-detail reads is a perl fork-and-kill
bound. Without perl the reads fell back to a bare glab api call, so one
hung read could hold the poll until the watcher's check timeout killed it
before the known failure printed. Without perl the poll now makes no
detail read at all and emits the degraded line with no job names on both
the failed-pipeline and train-drop paths.

The regression hides perl from PATH, makes every detail read hang, and
asserts both paths still emit at once with no pipelines/ read.

* no-mistakes(ci): Fixed ci-1 in tests/fm-pr-check-security.test.sh only (nothing changed in bin/). Invariant: every GitHub arming or merge call must give the fake gh a jq, because arming now reads through `fm-pr-poll.sh --baseline` and fails when the read is unreadable. I added FM_TEST_JQ="$REAL_JQ" to run_check_entry and run_merge_entry. I also added it to the other direct healthy-GitHub registration calls: the rebind.sh heredoc (around line 3868), the replace-authority.sh heredoc, and the background re-arm (around line 4275). I left the GitLab and no-tool cases alone (the no-glab and no-jq runs at ~2921/2962, and the no-tool run at ~2245). Validation: `shellcheck -x -S warning` on the file is clean. A temporary runner outside the repo (since deleted) sourced the file's helpers and ran make_case, then run_check_entry on https://github.com/o/r/pull/1. It exited 0 with "armed: state/task-a.check.sh" and the published check.sh was present. run_merge_entry on the same case printed no "could not read the forge" error. No test function from tests/ and no watcher scenario was run. The tree has only the one modified file and no scratch files

* fix(pr-check): skip the degraded baseline read on the merge-time re-record

bin/fm-pr-merge.sh records through bin/fm-pr-check.sh before any merge forge
call. The strict arming baseline read ran there too, so an unreadable forge
stopped the merge with the arming error before its own refusals, and every
merge made one extra forge read. The merge-time re-record now neither reads
nor rewrites the baseline; the watch's marker is keyed to the PR identity and
stays as the watcher left it.

* no-mistakes(review): fix(pr-poll): lenient train car read, link-only train drop

* no-mistakes(document): Note train-drop poll names pipeline link only

* no-mistakes(ci): ci-1 (Greptile "Test hooks hang") is fixed. The only file changed is tests/fm-pr-check-security.test.sh; nothing under bin/ changed and production lock behavior is untouched. Invariant: a test hook that runs inside a process already holding STATE/.control-<id>.lock must not call the lock-taking arming path, because fm_lock_acquire_wait would then wait forever on its own parent. Only two hooks re-arm from inside a control-lock holder: rebind.sh in test_authority_persistence_refuses_rebound_metadata, which runs during `gh pr merge` while fm-pr-merge.sh holds the lock, and replace-authority.sh in test_authority_retirement_preserves_replacement, which runs inside the watcher's mv. The background replacement merge that replace-authority.sh starts already waits for the lock correctly and is unchanged. Fix: both hooks now call `FM_PR_CHECK_MERGE=1 "$PR_CHECK" task-a "$url_b"`. That is the arming path bin/fm-pr-check.sh provides for a caller that already holds the control lock. It still rewrites pr= in task metadata and republishes the poll, but skips taking the lock and the baseline read. That matches how these hooks behaved before this PR, when arming took no control lock. I didn't move the registration into the background or after the parent releases the lock (the user's examples). In the rebind test the metadata change has to land before the merge persists its authority. A deferred re-arm would let the merge persist authority for url_a, which defeats the test. The re-arm stays synchronous, so every existing assertion is kept: the rebind test still gets a non-zero merge exit, pr=$url_b in the metadata and no merge-authority file. The retirement test still keeps the replacement authority, arms url_b and lands the attended merge for url_b. Verification: each test was run alone with FM_TEST_WATCH_BOUND=600. Both exited 0 within seconds and printed their pass lines: "ok - accepted merge authority refuses rebound task metadata" and "ok - poll retirement preserves a replacement authority record". I used a temporary runner that sourced the test file's helpers and called the one test; it has been deleted. The hang was not re-run before the fix; the user had already reproduced it on f0a22753. `shellcheck -x -S warning tests/fm-pr-check-security.test.sh` is clean. The full suite was not run

* no-mistakes(test): Fixed enterprise-host diagnostic assertion; watcher validation still fails

* no-mistakes(ci): Fixed the expected-failure watcher call so errexit cannot abort the test before its result is checked. `bash -n` and `git diff --check` passed; the full security test script timed out after 120 seconds, before reaching this test

* no-mistakes(review): Suppressed ambiguous GitLab car-endpoint 404 train drops; focused test still fails because an existing detail-budget case expects a wake

* no-mistakes(review): Confirmed train-drop listing path added; focused suite still fails on unknown-baseline arming

* no-mistakes(review): Allow unknown baseline reads without blocking arming

* no-mistakes(review): Preserve dedupe markers until poll publication succeeds

* no-mistakes(review): Reuse parsed MR state when confirming train drops

* no-mistakes(document): Update PR degradation watch documentation

* fix(pr-poll): recheck merge state before train drop

* no-mistakes(review): Preserved train state separately; focused test failed

* no-mistakes(test): Train-drop regression still fails; baseline train marker preserved

* no-mistakes(test): Fix on-train baseline marker registration

* no-mistakes(test): Confirmed train drops despite unreadable state rechecks; recovery regression remains

* fix(watch): re-arm the merge-train drop wake on re-queue

A drop wake now clears the on-train record, and a drop wakes only when
the watcher saw the merge request back on its train since the last drop,
so a second drop after a re-queue wakes again instead of being absorbed
as a duplicate. A failed or closed MR re-read keeps the confirmed drop,
marked mr_state=unconfirmed when the state is unreadable.

Silent watcher steps in the security suite now stop one second after
their check pass completes instead of spending the full 60s bound.

* no-mistakes(document): Clarify GitLab degraded-watch documentation

* no-mistakes(review): Suppress train-drop wake for closed MR rechecks

* no-mistakes(document): Document GitLab train-drop recheck outcomes

* fix(pr-poll): stop a hung GitLab detail read when the poll is stopped

The bounded glab read runs in its own process group, which only its alarm
used to stop. A TERM, INT, or HUP that stops the poll mid-read, such as the
watcher's check timeout, killed the perl parent and left glab running.
Forward those signals to the read's group and reap it before exiting.

* no-mistakes(document): Correct GitLab merge-watch documentation

* no-mistakes(review): Fail registration when PR baselines cannot persist

* no-mistakes(review): Persist both GitLab degradation baselines

* no-mistakes(document): Clarify PR poll documentation

* no-mistakes(review): Preserve registration when baseline persistence fails

* no-mistakes(review): Validate degraded and train markers before teardown

* no-mistakes(review): Rollback failed PR baseline re-registration

* no-mistakes(review): Preserve prior watch through poll publication

* no-mistakes(review): Re-registration rollback remains unsafe

* no-mistakes(review): Re-registration rollback remains unresolved

* no-mistakes(review): Preserve registration baselines on rollback

* no-mistakes(review): Restore registration through safe temporary files

* no-mistakes(review): Preserve train baseline after inconclusive reads

* no-mistakes(review): Reject inconclusive merge-train baselines

* no-mistakes(test): GitLab baseline-order regression remains unresolved; focused test fails

* no-mistakes(document): Document PR degradation and GitLab merge-train watches

* no-mistakes(lint): Fix ShellCheck conditional warnings

* no-mistakes(ci): Fixed rollback restoration to preserve existing artifact inodes, keeping the prior watcher registration valid. GitLab failed-pipeline baselines now confirm missing train cars against the train list instead of always reporting unknown. Verified with bash -n and git diff --check; full behavioral tests were not run

* no-mistakes(ci): Updated rollback backups to hard links so restoring a replaced poll artifact preserves its inode. Verification exposed a regression: `bash tests/fm-pr-check-security.test.sh` fails at “re-arming a GitLab watch on a green change failed”; hard-linked backups conflict with the poll artifact link-count validation. The fix needs adjustment before this phase can pass

* no-mistakes(ci): Fixed the portable serial failures: re-arm backups use copies so poll publication’s single-link invariant holds; rollback restores in place to preserve the registered inode. `bash tests/fm-pr-check-security.test.sh` passed (all 69 cases); `bash -n bin/fm-pr-check.sh` and `git diff --check` passed. Full suite failure was downstream of failed lanes

* no-mistakes(review): Opt-in polling fix remains incomplete

* Make degraded PR watches opt-in

* no-mistakes(document): Clarify optional jq requirement for GitLab watches

* Restore PR registrations when rearming is interrupted

* Seed train state for interrupted registration test

* no-mistakes(ci): Fixed both rollback invariants in bin/fm-pr-check.sh: rollback state is cleared before obsolete-backup deletion, and a failed restore retains the backup directory and reports its path. Verified with bash -n and git diff --check. Behavioral tests requested by the driver were not added or run

* docs: document opt-in degraded PR wake

* no-mistakes(document): Clarify degraded PR watch opt-in

* no-mistakes(ci): Fixed `bin/fm-pr-poll.sh` to resolve its opt-in marker home using `FM_HOME`, then `FM_ROOT_OVERRIDE`, then the script root, matching registration. `bash -n` and `git diff --check` passed. `tests/fm-pr-check-security.test.sh` passed its printed cases but exceeded the 300-second limit before completing

* test: cover the degraded-watch flag in a home reached through FM_ROOT_OVERRIDE
…d#8317)

* feat(supervision): reach herdr panes in the acknowledged hand-back retry

The detached retry could only deliver a queued wake to a Claude primary
behind tmux, because it only knew the inherited TMUX_PANE. A primary
running in herdr - including a remote home whose scripts inherit the
fm-remote session's pane identity - kept its watcher and queued check
but needed another turn or a human message to resume main.

Resolve the delivery transport from the identity the pane runtime
itself injected, mirroring fm-supervisor-target-lib.sh's discovery
order: TMUX_PANE, else HERDR_ENV + HERDR_SESSION + HERDR_PANE_ID. An
explicit target variable is never honored. On herdr the pane's own
process-info must prove the pinned session owner is its foreground
occupant (ancestor-or-self to the pane shell plus matching process
group), the registered agent identity must be claude including its
session binding, and idle must hold in both the native agent state and
the rendered footer, because a live Claude turn can leave the native
status reading idle. The tmux ancestor/tpgid proof is unchanged, and
deferred retries still never touch the queued check.

Portable coverage pins the new path alongside the tmux sibling, a
unit contract covers fm_backend_herdr_pane_owns_session, and an opt-in
live e2e proves a real Claude primary in an isolated fm-lab session:
its hand-back continuation is lost, the detached retry submits the
doorbell to the inherited pane, the primary drains and acknowledges,
and the pending check clears only after that acknowledgement.

* no-mistakes(document): Clarify herdr retry documentation ownership

* no-mistakes(ci): Added independent foreign-session-binding and native-idle/rendered-busy deferral tests; both pass and fail when their respective guards are removed. Strengthened live takeover assertions to capture watcher identity, verify retirement/replacement, and match the recorded retry arm’s take-over row. Focused behavior tests, syntax checks, warning-level ShellCheck, and diff checks pass. Credentialed live E2E was not rerun because it modifies external Herdr state outside the workspace boundary
…unchenguid#8318)

* fix: clear per-task away-session markers at return and fresh entry

The five .subsuper per-task families (stale, reported-stale, dialog,
paused, pause-until-due) were episode state with no session scope: a
first-seen-idle clock left behind when a session ended inside the 240s
recheck window was read by the next away session's first housekeeping
pass as its own, reporting a "stale persisted Ns (possible wedge)"
whose duration never happened.

fm_afk_clear_stale_artifacts now drops all five families with the
delivery artifacts on a fresh entry, and fm_afk_launch_stop drops them
at the return. The launch backup/rollback lists cover the same set so a
failed entry still restores prior state. Accepted cost, recorded on the
cleanup's header: a declared wait spanning two away sessions restarts
its recheck window at re-entry.

* no-mistakes(document): Correct away-session lifecycle documentation

* no-mistakes(ci): Initialized pendingBashComponents in the shared Pi test host, fixing the CI renderer crash. Full suite failure was downstream of that lane. Focused behavioral checks, shell syntax, and diff checks pass locally; the newer CI Pi version was not available locally
kunchenguid#8322)

* fix: surface herdr lab server failures and refuse over-long socket paths

The lab helper discarded the herdr server's output and waited the full timeout even after the server exited, so a startup failure such as a socket path over the sun_path limit looked like a plain timeout.

Provision now keeps the server output in a log in the helper state directory, stops waiting as soon as the server process exits, and prints the log tail in the failure message.
Name and prepare now refuse a session whose client socket path would exceed the 103-byte sun_path limit, naming the limit.

* fix: count socket path bytes, check it in provision, and use the documented config default

The sun_path limit is a byte limit, so the length is now counted under the C locale.
Provision runs the check up front so the reuse path is covered.
The config root default is the documented ~/.config/herdr, and an early server exit rechecks status once before failing.

* no-mistakes(review): Cap server log at 64 KiB; drop config-dir override

* no-mistakes(ci): I fixed both Greptile findings in `bin/fm-herdr-lab.sh`. I ran `tests/fm-herdr-lab.test.sh` and every test passed, including the new ones. I did not check that the new pipe-capture test fails against the old collector. **ci-1 (captured provision can hang).** - Invariant: the log collector must never hold the caller's stdout or stderr open. - The collector now runs as `{ head -c "$cap" > "$server_log"; cat; } >/dev/null 2>&1`. The server pid stays in `$!`. - The log cap is 4096 bytes. One shared value, `fm_herdr_lab_server_log_cap`, now sets both the stored log size and the tail shown in the failure message. - I added `test_captured_provision_returns_promptly`, which captures provision's output through a command-substitution pipe and checks it returns promptly. - I updated the cap test to 4096 bytes and the header comment to match. **ci-2 (XDG_CONFIG_HOME ignored).** - Invariant: the socket-length check must use the same config root herdr resolves. - `fm_herdr_lab_config_dir` now returns `$XDG_CONFIG_HOME/herdr` when `XDG_CONFIG_HOME` is set, and `$HOME/.config/herdr` otherwise. `name`, `prepare` and `provision` all go through `fm_herdr_lab_check_socket_path`, so one change covers all three. - I added tests for a long `HOME` with a short `XDG_CONFIG_HOME` (accepted) and a short `HOME` with a long `XDG_CONFIG_HOME` (refused). - The test file now unsets `XDG_CONFIG_HOME` at the top so the other tests don't depend on the CI environment. - I updated the header comment to match

* test: keep the fake server alive so the captured-output test proves the fix

The fake server exited right after reporting running, so the captured-output test passed without the fix.
It now stays alive and is cleaned up afterwards, and the test fails on the old redirection.
The collector now redirects with exec in a subshell, because a group redirect leaves saved copies of the caller's pipe open.
…claim (kunchenguid#8334)

Claude Code delivers an asyncRewake hook's exit-2 rewake to the session
that launched the hook. When Claude continues a conversation under a new
session id - a backgrounded session resumes with --fork-session under the
same lock-holding front end - the Stop auto-arm firing claimed before the
fork stays alive, descended from the session-lock pid, and open, so every
Stop of the continued session deferred to it, and its eventual rewake was
queued into the abandoned session while the live one stayed idle.

Record the Stop payload's session_id in the generation claim and treat an
arming claim recorded under another session as not open for that firing.
The continued session's next Stop takes the next generation and translates
its own close, and the earlier firing goes silent as any superseded owner
does. A firing from the claim's own session still defers, and claims,
payloads, and guard checks without a session id keep the previous behavior.
…guid#8223)

* feat: let Claude workers hide tools listed in config/crew-exclude-tools

A Claude ship or scout launch now honors a non-empty exclusion list by
passing --disallowedTools, which drops each tool's schema from every model
request. The list still refuses on runtimes that cannot hide tools, and a
token-free live guard checks the installed Claude Code removes the schema.

* no-mistakes(review): skip live Claude guard when no request captured

* no-mistakes(document): Fixed one stale measurement claim in docs/verification/runtime-backends.md: the repeat-consistency sentence contradicted the table's two differing request-byte rows. Reworded it to match. Other exclusion docs (configuration.md runtime table, fm-spawn.sh and fm-exclude-tools-lib.sh comments and refusal text) already reflect Claude support. bin/fm-doc-audience-check.sh passes (141 surfaces, 1193 local links).

* fix: isolate the Claude exclusion live guard from real providers

Run the guard's claude launches in a clean environment with a private
config directory and a synthetic API key so they can only reach the local
capture server, map the capture fixture to the guard for --changed
selection, and run fm_test_cleanup from the guard's EXIT trap.

* no-mistakes(document): Point Claude exclusion trimming note to Validation owner

* no-mistakes(document): Align Claude exclusion docs with validation behavior
…ons (kunchenguid#8236)

* feat(watch): add opt-in silent recheck for unchanged paused declarations

Refs kunchenguid#6932

* no-mistakes(review): Require live agent for silent paused recheck

* no-mistakes(review): Test silent paused recheck for live ship agent

* no-mistakes(document): Document silent paused recheck flag

* no-mistakes(ci): Silence ticking-pane paused rechecks; reorder cheap checks
…he done gate (kunchenguid#8339)

* fix(bin): ignore the no-mistakes gate mirror in the done: reachability check

fm_dod_named_head_reachable_outside_worktree accepted a named head found on
any remote-tracking ref, including refs/remotes/no-mistakes/*, the local
no-mistakes gate mirror. A head that only reached that mirror never left the
machine, so leave the mirror's refs out of the check, as teardown already
does with --exclude='no-mistakes/*'.

* no-mistakes(review): Document gate-mirror exclusion refusing unfetched origin heads

* fix(bin): refresh remote refs before refusing a done claim at PR registration

A no-mistakes pipeline pushes from its own gate clone, so with the gate
mirror excluded a GitLab or Forgejo CI-ready done was refused until someone
fetched by hand. fm-pr-check.sh now opts into one bounded, no-prune refresh
of the non-gate remotes in the worker copy, and in the project clone when it
differs, then checks again. The refresh is teardown's, moved into
fm-dod-lib.sh and shared. A refusal after a failed refresh says the verdict
used the last-known refs. crew-state, inactive-reconcile and review-check
note why they read the refs without refreshing.

* docs(bin): say the watcher registers PRs only when config/pr-register-scan is on

* no-mistakes(review): Bound scan refresh by budget; skip refresh on merge

* no-mistakes(review): Refresh remote refs on merge-time re-record too

* no-mistakes(review): Stop scan after refresh deadline; label skipped refreshes

* no-mistakes(document): Clarify ship-landing guidance for unfetched no-mistakes heads

* no-mistakes(ci): Fixed Greptile P1 r4529290256 in `fm_dod_refresh_remote_refs` (bin/fm-dod-lib.sh). The fix only touches that function. **Invariant:** one remote that hangs must not use up the refresh time of the remotes after it. In particular, origin, which normally holds the named head, must still be fetched within the scan deadline. The refresh is shared by the done-gate (scan, plain pr-check and merge-time re-record) and by teardown, so the fix is in that one shared function. **Change:** - **Origin first:** the function now builds the remote list with origin at the front when it exists, followed by the other non-gate remotes. `no-mistakes` is still skipped. - **Split budget:** when a deadline is given, each fetch gets an even share (rounded up) of the time still left, divided among the remotes not yet fetched. Unused time carries over to later remotes. - **Kept as before:** the 30 second per-remote cap, `--no-prune`, skipping remotes once the deadline has passed, and appending each unfetched remote to `FM_DOD_REFRESH_FAILED` for the last-known-refs message. - **Teardown:** it passes no deadline, so its only change is the fetch order. - **Comment:** updated to describe the new order and the split. The other comments that describe the refresh were checked and are still accurate. **Regression test:** `test_remote_hanging_before_origin_leaves_origin_its_refresh` in tests/fm-dod-lib.test.sh. - **Setup:** a `backup` remote whose helper hangs and that sorts before origin in `git remote`, a 4-second refresh deadline, and origin holding the named head. - **Asserts:** the done claim is accepted, origin's tracking ref is fetched to the head, `FM_DOD_REFRESH_FAILED` is `backup`, and the call ends within the deadline. - **Before the fix:** it failed with "kept origin's head from being accepted". **Verification:** - **Test suites:** tests/fm-dod-lib.test.sh, tests/fm-pr-check-security.test.sh and tests/fm-teardown.test.sh all pass, including the existing scan hanging-remote and budget tests. - **Lint:** `bin/fm-lint.sh` (pinned ShellCheck 0.11.0) passes on both changed files. **Not changed:** in the uncommon case where the worker copy is a separate clone, the project clone's refresh still runs after the copy's own refresh, against the same deadline. Per the instruction to change nothing else, I left that as it is

* test(gotmp): provide fm-dod-lib and its sourced libraries in the teardown fake roots

Teardown now sources bin/fm-dod-lib.sh for the shared bounded remote-ref
refresh, and that library sources fm-brief-heading-lib.sh and
fm-external-review-lib.sh from its own directory. Both fake roots in
tests/fm-gotmp.test.sh symlinked only the siblings teardown needed before,
so the real teardown refused at startup there.

* no-mistakes(review): Split refresh deadline across copy and project clone remotes
…#8310)

* fix(bin): keep a branch wake grant when the branch cannot inspect its host pid

* no-mistakes(document): Document branch drains skipping stale-grant reclaim
…kunchenguid#8014)

* fix watcher pause state supersession

* no-mistakes(ci): Fixed the busy path to check paused-run supersession before the busy-turn age gate, and reused captured crew state for gate classification. Added real busy-pane coverage for recent and old turns. Shell syntax, the targeted test, and `git diff --check` pass

* Preserve pause throttle on busy gate repeats

* Make superseded declared-wait wake opt-in

Gate paused_wait_superseded behind the home-local config/paused-wait-supersession
presence flag and move its crew-state read inside the gate, so a home without
the flag keeps main's declared-wait cadence, wording, and crew-state reads.

* no-mistakes(document): Document opt-in paused-wait supersession

* no-mistakes(ci): Fixed terminal run parsing to stop at the run component, preserving distinct throttles when PR suffixes follow; added coverage for two terminal PR-bearing runs. Documented foreground-only scope and unchanged away-mode cadence in both requested locations. `FM_LIVE=0 bash tests/fm-watch-triage-pause.test.sh` passed the new and opt-in cases, then timed out after 8/31 tests (300s)

* no-mistakes(document): Document superseded declared-wait opt-in

* fix(watch): skip the superseded-wait check in away mode

paused_wait_superseded returned only on the absent opt-in flag, so its
busy-path and secondmate callers still read crew state and could queue a
superseded wake while the away-mode flag existed, contrary to the documented
foreground-only scope. Return before any read while afk_present.
* fix(pr-check): report timed-out scans, take over replaced PRs, read only ready lines

The watcher's PR registration scan had three remaining gaps.
A registration cut at the scan's bound was silent, so a task that always
timed out never produced a notice; it now reports once per task and PR that
the merge watch could not be armed, and runs under the grace-bounded runner so
its cleanup trap finishes.
A recorded pr= was never replaced, so a lane that closed a PR and opened
another kept watching the closed one; a newer ready line now takes over a pr=
its status log named, and a pr= the log never named stays the supervisor's.
Any done line naming a PR registered it; only the newest crew-declared line in
an exact ready shape now counts.

* no-mistakes(review): Treat later crew notes as status updates

* no-mistakes(review): Match recorded PRs as exact URL tokens

* no-mistakes(ci): Updated `pr_for_task` to extract canonical ready-note URLs through the shared parser, while retaining legacy `/pull/<number>` URLs on unconfigured hosts. Added a GitLab merge-request replacement report case. `bash -n` and `git diff --check` pass. `bash tests/fm-inactive-reconcile.test.sh` fails earlier at “ledger fallback did not prefer the terminal ready line PR,” before reaching the new test

* no-mistakes(ci): Fixed the quoted Bash regex in `bin/fm-inactive-reconcile.sh`; the unconfigured-host `/pull/<number>` fallback now matches as intended. Verified with `FM_LIVE=0 bash tests/fm-inactive-reconcile.test.sh` (passed)

* no-mistakes(document): Clarify PR scan documentation

* no-mistakes(lint): Quote done status literal to satisfy ShellCheck

* fix(pr-check): queue a scan notice before marking it sent

The scan wrote its once-only marker before the watcher queued the notice, so a
watcher that stopped or failed to append in that window lost the notice, and
the marker kept later sweeps silent. The scan now queues the wake itself, then
writes the marker, then prints, so a stop between them repeats a notice rather
than losing it. Both the timeout and the refusal paths share this order.

* no-mistakes(ci): Made the outer check timeout durably enqueue its PR-registration scan-cut reason, so an interrupted candidate scan is not only printed. Verified `bash -n bin/fm-watch.sh` and `git diff --check`

* no-mistakes(ci): Fixed duplicate PR-registration timeout wakes by distinguishing the watcher’s outer check cut from scan-generated notices; outer-cut wake append failures now fail the watcher. Added a watcher regression test. `bash -n` and `git diff --check` passed; the security suite passed 43 tests before the 300-second timeout, prior to reaching the new test

* no-mistakes(ci): The requested fix is already present in HEAD: the test captures `real_sed` before invoking the watcher and embeds that path in the fake. `bash -n` and `git diff --check` passed. The full security test script timed out after 60 seconds, before reaching this regression test

* fix(bin): gate the ledger PR replacement behind config/pr-register-scan

Without the opt-in, pr_for_task keeps main's behavior: a recorded pr= always
stands and only a GitHub-shaped ready line fills in a missing one. With
config/pr-register-scan present, a newer ready line can replace a recorded
PR the status log named and any recognized forge URL is accepted.

* no-mistakes(test): Enable PR-provenance test scan opt-in; later bounded-scan test remains flaky

* no-mistakes(test): Restore flag-absent PR provenance coverage

* no-mistakes(ci): Added a retirement/merge-notice recheck under the task metadata lock immediately before replacement, plus a regression test for a merge notice arriving during candidate registration. Targeted security suite timed out after 300 seconds before reaching that test

* fix(pr-check): hold the merge-notification lock across a scan replacement

The scan's recheck of a recorded PR's merge record and its replacement pr=
write now run under the task's existing merge-notification lock, the lock
fm_merge_outcome_report holds while it records a merge, so a replacement can
never interleave with recording the merge of the PR it replaces. The merge
path itself is unchanged: taking the task meta lock there instead would
deadlock a re-arm made during the notice write.

* no-mistakes(document): Document opt-in PR registration scan behavior

* no-mistakes(ci): Exported `STATE` in the merge-race test subprocess so ShellCheck recognizes the state path consumed by sourced helpers. `shellcheck -x tests/fm-pr-check-security.test.sh` and `git diff --check` pass. Full suite is downstream of the failed lint lane; targeted security suite timed out after 300s, after 27 tests passed

* no-mistakes(ci): Fixed scan replacement commit-time eligibility: under the existing metadata and merge-notification locks, the newest status must still report the captured URL as ready. Added a deterministic regression test that waits for the slow pull/8 forge read, withdraws readiness, then checks pull/7 metadata and poll remain unchanged. ShellCheck, bash syntax checks, and git diff check pass. The targeted security suite passed 27 tests but exceeded the 300-second limit before reaching this regression test

* no-mistakes(ci): Fixed the backup invariant: before rewriting metadata, scan replacements now use the existing baseline backup/restore path even when degraded watching is disabled. Added a public scan-interface regression test asserting PR A and its poll survive a failed publication. Shell syntax checks passed; `FM_LIVE=0 bash tests/fm-pr-check-security.test.sh` exceeded 300 seconds before reaching the new test

* no-mistakes(ci): Applied the baseline initialization fix and repaired the failed-replacement regression test. `git diff --check` passed. Security suite timed out after 900s; inactive-reconcile suite failed at the bounded-scan resume assertion, outside the changed code

* no-mistakes(document): Document PR registration scan behavior
* feat(pr-merge): opt-in squash commit text from the PR summary

With the config/pr-squash-summary presence flag, a GitHub squash merge
whose caller passed no subject or body uses the PR title plus (#N) as
the subject and the PR body's ## What Changed section as the body, so
the commit on the base branch describes the change instead of listing
every branch commit. A missing or empty section, an unreadable PR, a
merge or rebase method, caller-supplied commit text (including -t, -b,
and -F after --), and GitLab and Forgejo merges keep the repository's
own squash text.

Opt-in: the behaviour is off by default. Without the flag the merge
reads no PR text and sends exactly today's command; with it, the PR's
summary overrides the repository's squash commit message setting. The
head-match, attestation, and waiver guards are unchanged.

* fix(pr-merge): ignore headings inside fenced code in the squash summary

what_changed_section now tracks fenced code blocks (``` and ~~~,
closed only by a run of the same character at least as long), so a
"## " line inside a fence neither ends the What Changed section nor is
selected as a fenced "## What Changed". Regression tests cover both.

* fix(pr-merge): treat a backtick run holding a backtick as inline code

A backtick-opened fence is valid only when its info string contains no
backtick (CommonMark), so a line such as three backticks, text, three
backticks is inline code. fence_run no longer opens a fence on it, so it
neither swallows later headings and the appendix inside What Changed nor
hides the real section before it. Tilde fences keep no such restriction.
Capture the real explicit-close focus synchronously in Part C so the defective-release assertion does not depend on background sampling. Preserve final exact-focus and focus-preserving-release assertions.

Fixes kunchenguid#8004
* feat(bin): report and archive orphan task records

* no-mistakes(test): Dropped unsupported backlog list field; focused bootstrap test timed out

* no-mistakes(document): Document session-start record hygiene

* no-mistakes(review): Skip symlinked metadata during hygiene scans

* no-mistakes(review): Skip symlinked metadata and report missing endpoints

* no-mistakes(document): Document record hygiene reporting and archival

* no-mistakes(ci): Not complete: applied the platform-aware mtime and duplicate-PR separator fixes, and switched endpoint classification to `fm_backend_target_exists` so failed probes are not treated as confirmed absence. The approved backlog/endpoint read timeouts and behavioral regressions are still missing; verification was not run. Invariant: only confirmed old orphan logs are archived, and duplicate PRs remain detectable across intervening records. The same invariant applies across every status-log and metadata record in the report; endpoint reporting must distinguish missing from unreadable for every supported backend

* fix: bound record hygiene reads

* no-mistakes(ci): Updated record-hygiene endpoint reads to use the shared metadata readers and added behavioral coverage for implicit-tmux and Orca terminal targets. The hygiene tests passed; the full bootstrap test script timed out after other tests continued passing. `git diff --check` passed

* no-mistakes(test): Shared record hygiene reporting with deduplicated heartbeat alerts

* no-mistakes(test): Initialize watcher data path for heartbeat hygiene reporting

* no-mistakes(document): Document heartbeat hygiene reporting and archive behavior

* no-mistakes(lint): Fix ShellCheck directive in hygiene library

* no-mistakes(ci): Fixed the Orca fake’s argument checks and asserted that a healthy Orca endpoint produces no warning. Heartbeat hygiene scans now run in a bounded background child; completed reports are queued as `check:` wakes before the deduplication marker is saved, preserving retry on delivery failure. `bash -n` and `git diff --check` passed; the first four hygiene tests passed. The full bootstrap test run exceeded its time limit, so the heartbeat delivery path remains unverified locally

* no-mistakes(ci): Fixed stale-marker recovery in `bin/fm-watch.sh`: the marker now records the worker PID and process start time, and is reclaimed if the worker is gone, its start time changed, or the marker exceeds 3× the report timeout. Added a watcher behavioral test for a stale marker. `bash -n` and `git diff --check` passed; the bootstrap test suite passed the hygiene tests, then exceeded its 120-second limit later in the suite. The review-thread reply and resolution are outside this CI phase

* no-mistakes(test): Bounded stale-marker test passes; 20-run validation timed out

* fix(watcher): reset hygiene suppression after clean scan

* no-mistakes(document): Document record hygiene reporting and archival

* no-mistakes(ci): Invariant: the remote secondmate parent-reply channel must be excluded from both stale-orphan reporting and archival. The shared status-file loop now skips the path returned by status_scan_parent_channel_exclude; other status paths are unchanged. Added a behavioral regression with an old channel file in a remote-secondmate-style home. Verified with tests/fm-parent-channel-scan-exclusion.test.sh and git diff --check

* test: exercise record hygiene report directly

* no-mistakes(review): Report missing tabs and preserve complete backlog IDs

* no-mistakes(review): Fix worker identity and top-level backlog record matching

* no-mistakes(review): Fix shell continuation in hygiene regression

* no-mistakes(review): Remove out-of-scope endpoint probing

* no-mistakes(review): Align architecture docs with hygiene report scope

* test: cover record hygiene archival of the parent channel

Keep the report-only run and add a mutating run that archives a genuine
orphan status log while asserting the remote parent-replies channel stays
in place. Source the backlog transition library the report uses, and give
the stale-marker watcher test a 30s cap so heavy host load cannot expire
it before the first heartbeat.

* fix(bin): add shellcheck source directives for record hygiene lib

* docs(skills): add record hygiene response to bootstrap diagnostics

* no-mistakes(test): Advance hygiene marker only after wake succeeds

* no-mistakes(test): Restore heartbeat report suppression marker before wake; heartbeat lab unverified

* feat(bin): make record hygiene report opt-in via config/record-hygiene

The session-start record-hygiene report, its orphan status-log archiving,
and the watcher heartbeat scan now run only when the home-local
config/record-hygiene presence flag exists. Without it, session start and
the heartbeat behave as before the feature: no report, no file moves, and
no record reads for it.

* no-mistakes(document): Clarify opt-in hygiene documentation

* fix(bin): start archive retention when record hygiene archives an orphan

The record-hygiene archive moved an orphan status log with mv, which keeps
its old modification time. With config/status-archive also enabled, the
next teardown's 30-day prune deleted an already-old orphan right after it
was archived. Touch the archived file so retention counts from archive
time, and cover the combined case with a teardown test.

* no-mistakes(review): Report archived-log timestamp refresh failures

* no-mistakes(ci): Fixed orphan archival to take the per-task metadata lock non-blockingly, recheck metadata/file/mtime under lock, and release the lock on all archive paths. Added coverage for held-lock skipping and lock cleanup. `tests/fm-bootstrap.test.sh` passed the hygiene cases but emitted a stray `\: command not found` from the newly added continuation (corrected); the full script later timed out at 120s, so rerun verification

* fix: lint the wake-lib source and tighten record-hygiene lock tests

Point ShellCheck at bin/fm-wake-lib.sh for the archive path's lazy source, run the held-lock test with record hygiene enabled and assert the scan still reports the orphan, check the real fm_meta_lock_path cleanup path, and cover a spawn publishing metadata between the absence check and the move.

* no-mistakes(ci): Fixed the previously accepted archive-retention invariant: if refreshing an orphan log’s archive mtime fails, the code attempts to restore it to live state and reports the failure. `tests/fm-bootstrap.test.sh` and `tests/fm-parent-channel-scan-exclusion.test.sh` pass; `git diff --check` passes. The provided CI excerpt omits the actual failed test’s diagnostic, so it does not establish that this change caused the shard failure; the Full suite failure shown is downstream of a failed lane

* Revert "no-mistakes(ci): restore orphan log when archive touch fails" and fix SC2153

Revert 89f9229, an unrequested CI auto-repair that changed archive behavior without a regression test.

Mark DATA as set by the sourcing script on its first use in the archive path: following bin/fm-wake-lib.sh through the source directive made ShellCheck raise SC2153 there.
)

* fix: give suspended extension deadlines one bounded grace

* no-mistakes(document): Clarify timeout evidence identity
…d#8350)

* fix: recognize the bun-installed omp as a harness process

The bun global package runs omp as `bun <path>/omp`, so ps reports the
process name `bun` and the lock ancestry walk and primary detection, which
matched only the exact name `omp`, refused the session lock and printed
unknown.

bin/fm-omp-process-lib.sh now owns omp identity: the exact name `omp`, or
bun whose first non-option argument is a script named `omp` or the
package's dist/cli.js. Both call sites use it. Regressions drive real
processes through fm-harness.sh and fm-lock.sh, and the omp live guard gains
a token-free installed-omp identity probe.

* fix: match bun-run omp scripts whose install path contains spaces

The ps args fallback split the script path on whitespace, so a path like /opt/Agent Tools/bin/omp was judged as /opt/Agent. Rebuild the first non-option word until it names an existing file. The token-free live guard now also asserts the saved session lock names the omp process.

* fix: narrow bun omp matcher to the verified launch shape

Match only comm omp, or bun whose argv0 is bun and whose next argument
is a script named exactly omp. Drop the dist/cli.js path, the bun option
skip with its eval/print exclusion, and the argv0-omp-under-bun branch,
with their tests and doc mentions. Spaced install paths still resolve.

* no-mistakes(document): Clarify omp lock identity versus tmux liveness wording

* test: copy fm-omp-process-lib.sh into fixtures that source the session lock library

* no-mistakes(document): Note omp live guard checks lock owner pid
* fix(spawn): keep a recorded PR the task record's tail across relaunch

A control-plane relaunch republished the record with control_relaunch_tx=
after the preserved pr= lines, and the trace-context and Polytoken session
rewrites appended after them too. fm_pr_metadata_identity_parse refuses any
other line after pr=, so the watcher stopped running that lane's merge poll
("rejected unauthenticated state checks") and its merge went unseen. Every
spawn-side rewrite now writes the PR trailer last.

Refs kunchenguid#7938

* feat: park ship lanes on review and clean them up on merge

Add bin/fm-park.sh: a clean-state gate (GitHub and GitLab) that parks a lane
only when CI is green on the current head, review bots have posted on it or a
quiet window passed, no thread is unresolved, nothing conflicts, and the PR is
not a draft; a park that re-reads the forge bound to the recorded head before
stopping the agent through fm-control, durably leases the Treehouse slot (a
re-park reuses the lane's own lease), and records the lane; a watcher tick that
relaunches a fresh worker on review activity and reports closed PRs once; and
merge-time cleanup through fm-teardown from the watcher's merged path. The
watcher starts fm-park only when a lane is parked or parking is configured.

Teach teardown's landed proof to read GitLab merge requests and fetch
refs/merge-requests/<n>/head, so squash and merge-train merges are recognized
from the MR head.

Local proof:
- tests/fm-park.test.sh (13 tests) covers each unclean gate condition, a head
  change after the verdict, park preflight refusals, the lease, every relaunch
  trigger, closed reporting, the opt-ins and merge cleanup.
- An isolated lab home (Herdr lab session, faked forge, real Treehouse pool)
  ran a full cycle through the real fm-pr-check, fm-park, fm-watch and
  fm-teardown: park with the slot leased (a concurrent get received another
  slot), a review comment relaunched a fresh worker in the same copy, re-park,
  and on merge the watcher tore the lane down and returned the copy.
- A read-only gate run against live lanes in other homes refused lanes with
  pending CI, unresolved threads or uncomputed mergeability, passed clean ones,
  and read a merge-train squash-merged GitLab MR (main got a commit other than
  the MR head) as merged.

Refs kunchenguid#7938

* no-mistakes(review): Harden park gate, bound tick, default merge cleanup

* no-mistakes(document): Inventory park-on-review config flags and state records

* no-mistakes(ci): I made fixes for all six Greptile findings (ci-1 to ci-6). One existing watcher test now fails because of the ci-1 change and needs your decision. Fixes: - **ci-1, merge cleanup skipped** (bin/fm-watch.sh): the merge poll now runs `fm-park.sh land` even when bin/fm-pr-merge.sh recorded the merge first. The cleanup outcome wakes the captain under the queue key `land-<id>`. New test `test_self_merged_lane_is_still_cleaned_up_by_the_poll` in tests/fm-pr-check-security.test.sh. - **ci-2, old CI approves parking** (GitLab gate): `head_pipeline` counts only when its sha equals the MR's current sha. - **ci-3, bot progress permits parking**: a reviewer bot counts as settled only when it has submitted a review bound to the current head; otherwise the quiet window decides. GitLab bot notes carry no such signal, so GitLab lanes now always wait for the quiet window (default 15 minutes after CI finishes). - **ci-4, edited feedback unanswered**: the relaunch trigger uses the later of a comment's creation and edit time. - **ci-5, later lanes starved**: a new `visit_lanes` helper starts each tick at the lane the previous tick did not reach (state/.review-park-tick-next and state/.review-park-tick-next-unparked) and wraps around. - **ci-6, unfinished park looks complete**: `cmd_park` writes state/<id>.review-park only after `fm-control.sh exit` confirms the stop. I updated the header docs in bin/fm-park.sh, docs/configuration.md and the operational-home-layout skill to match. Verification: - tests/fm-park.test.sh: all 18 cases pass, including the new regression cases for ci-2 to ci-6. - shellcheck is clean on all changed scripts and tests. - I did not run the new tests against the old code to see them fail first. Open problem: `test_merged_poll_reregistration_after_notification_is_absorbed` now fails. It re-arms a merge poll for a merge that was already reported, and in that test teardown refuses (the task has no project identity). The second watcher cycle now retries cleanup and wakes the captain with the same refusal again. I did not change this. The choice is: - keep repeating the refusal, which is arguably right because the lane still needs a decision, and update that test; or - wake only when cleanup succeeded in the already-recorded case, which would hide a refusal after a merge done through fm-pr-merge.sh and partly undo ci-1. The watcher subset stopped at that failure, so three tests never ran: the new ci-1 test, `test_self_merge_and_poll_publish_one_outcome`, and `test_merged_poll_row_names_no_authority_when_no_record_grants_one`. `test_merged_poll_retires_once` passed. I deleted the temporary subset file tests/.subset-sec.test.sh

* fix(park): write the park record pending before the stop and settle it on tick

cmd_park now writes state/<id>.review-park with pending=1 before
fm-control.sh exit and drops the flag once the stop is confirmed. A park
that dies after the stop, or whose final write fails, still leaves the
lane watched and resumable; crew state and list read it as parking. Each
tick promotes a pending record to parked once its agent is confirmed dead
and drops it while the agent is still alive. A record that cannot be
written refuses the park before the agent is stopped.

The re-armed merged-poll test now expects the repeated teardown-refusal
wake while the merge notice itself is not repeated.

* fix(park): bound the pending-park agent check by the tick budget

settle_pending asked the backend whether a pending lane's agent is alive
with no timeout, before the lane loop that honours the tick deadline, so
a hung backend (for example an unanswering tmux server) held the whole
tick and the watcher with it. The check now runs under fm_run_timed cut
to what the tick has left, and settling happens inside watch_parked, so
a tick that runs out of time saves the next lane in the existing cursor
and the next tick resumes there. An unanswered check leaves the record
pending.

* fix(park): require every required check reported, relaunch on inline replies

The GitHub park gate now refuses while a check the base branch requires has
not reported on the head (or the requirement cannot be read), using the
required-check reading bin/fm-pr-merge.sh does, moved into bin/fm-pr-lib.sh
so both share it. Review-thread comments join the activity list, so an
inline reply in an existing thread relaunches a parked worker.

* fix(park): run lane actions detached so no budget cuts them short

Park, relaunch, and merge-time cleanup now run as detached single-flight
actions under the lane lock instead of inside the tick or the watcher's
merged-poll iteration. The tick holds only forge reads and action starts,
so its budget can no longer kill a slow but successful relaunch, and the
merged-poll path only starts the teardown. Each action publishes its
outcome for the next tick to report, and a merge-time cleanup waits for an
action already under way on the lane.

The ship-landing skill now names the watcher as the one owner of a merged
lane's teardown, including merges made through fm-pr-merge.sh, so
firstmate no longer tears such a lane down a second time.

* no-mistakes(document): Document review parking and merge cleanup

* no-mistakes(ci): Fixed tick-bounded idle checks, reserved half the tick for unparked lanes, and persisted merge-cleanup requests before retiring the merge poll; pending requests retry on later ticks. Updated the park-on-review documentation and state-file list. `tests/fm-park.test.sh`, shell syntax checks, and `git diff --check` pass. The requested new regression tests for the three findings were not added, so those specific scenarios are not yet verified

* no-mistakes(ci): Fixed the requested behavior: unparked merge cleanup now requires config/auto-land; pending cleanup is recorded before poll retirement and dispatched after releasing the control lock; temporary lifecycle-lock refusals preserve the request for retry. Updated docs and behavioral tests. Full suite’s failure was only its maintainer-label gate; ci.yml was left unchanged. tests/fm-park.test.sh and git diff --check pass. ShellCheck reported existing source-following/unused-variable diagnostics; the lint partition and combined shellcheck command timed out, and the merge-poll tests were not completed

* no-mistakes(ci): Added behavioral regression tests for pending-cleanup recovery after watcher restart and retry after a temporary lifecycle-lock refusal. `FM_LIVE=0 bash tests/fm-park.test.sh`, `shellcheck tests/fm-park.test.sh`, and `git diff --check` pass

* test(park): wait for the pending cleanup request to clear before asserting

A detached land publishes its report before it removes the pending
request, so waiting only for the report let the cleanup tests assert
request removal too early. wait_land_settled waits for the request to
clear, which implies the report exists. The control-lock retry test now
ticks until the retry runs instead of sleeping, failing if any tick
reports the refusal as an outcome.

* fix(park): bind cleanup requests to their PR and record wakes before removing reports

A merge-time cleanup request now records the merged PR, and land drops a
request whose PR is no longer the lane's under the lane lock, so a stale
request cannot tear down a lane that moved on to another PR. Teardown also
removes a lane's cleanup request.

The tick now records its outcome and close lines as one wake before it
removes the reports behind them or marks a close as reported; when the wake
cannot be recorded it removes and prints nothing, so the next tick retries.
The watcher only rings.

The two tick-budget tests run under a 6s tick with 8s slow stubs: under a
2s tick the parked-lane budget was one whole second, so the first forge read
was skipped whenever setup crossed a second boundary.

* no-mistakes(document): Document park-on-review safety behavior

* fix(park): keep the cleanup request until its outcome is saved

Teardown no longer deletes a lane's merge cleanup request. Only the
detached cleanup removes it, after its outcome report is saved, so a
cleanup killed partway through its teardown is retried by the next tick
instead of being lost. A request left behind by a manual teardown is still
dropped by the tick once the task record is gone, or by land when the lane
now records a different PR.

* fix(bin): keep the PR merge watch working when a worker with a PR is relaunched (kunchenguid#7996)

* Preserve PR poll authentication on relaunch

* no-mistakes(review): Keep trace and polytoken meta ahead of PR lines

* fix(spawn): keep a recorded PR the task record's tail across relaunch

A control-plane relaunch republished the record with control_relaunch_tx=
after the preserved pr= lines, and the trace-context and Polytoken session
rewrites appended after them too. fm_pr_metadata_identity_parse refuses any
other line after pr=, so the watcher stopped running that lane's merge poll
("rejected unauthenticated state checks") and its merge went unseen. Every
spawn-side rewrite now writes the PR trailer last.

Refs kunchenguid#7938

* fix(spawn): reuse main PR metadata rewrite helper

* no-mistakes(review): Count unresolved GitLab notes individually

* no-mistakes(review): Relaunch parked lanes on incomplete GitHub threads

* no-mistakes(document): Document park-on-review behavior

* fix(park): paginate GitHub comments and fix Linux mode test

* no-mistakes(review): Set private permissions on cleanup requests

* no-mistakes(document): Correct park-on-review cleanup documentation

* fix(park): serialize inbox delivery with review parking

* no-mistakes(ci): Fixed `Lint 1`: removed the unused local variables in `tests/fm-park.test.sh` and exported `FM_HOME`, which the sourced inbox library reads. `bin/fm-lint.sh tests/fm-park.test.sh` passed. The Full suite failure was an aggregate of failed lanes; its log reports `FM_CI_LANES_FAILED=true`, not the underlying lane failure, so I can’t confirm this lint fix resolves it. The park test started passing scenarios but exceeded the 120-second timeout before completing

* fix(spawn): keep a recorded PR the task record's tail across relaunch

A control-plane relaunch republished the record with control_relaunch_tx=
after the preserved pr= lines, and the trace-context and Polytoken session
rewrites appended after them too. fm_pr_metadata_identity_parse refuses any
other line after pr=, so the watcher stopped running that lane's merge poll
("rejected unauthenticated state checks") and its merge went unseen. Every
spawn-side rewrite now writes the PR trailer last.

Refs kunchenguid#7938

* feat: park ship lanes on review and clean them up on merge

Add bin/fm-park.sh: a clean-state gate (GitHub and GitLab) that parks a lane
only when CI is green on the current head, review bots have posted on it or a
quiet window passed, no thread is unresolved, nothing conflicts, and the PR is
not a draft; a park that re-reads the forge bound to the recorded head before
stopping the agent through fm-control, durably leases the Treehouse slot (a
re-park reuses the lane's own lease), and records the lane; a watcher tick that
relaunches a fresh worker on review activity and reports closed PRs once; and
merge-time cleanup through fm-teardown from the watcher's merged path. The
watcher starts fm-park only when a lane is parked or parking is configured.

Teach teardown's landed proof to read GitLab merge requests and fetch
refs/merge-requests/<n>/head, so squash and merge-train merges are recognized
from the MR head.

Local proof:
- tests/fm-park.test.sh (13 tests) covers each unclean gate condition, a head
  change after the verdict, park preflight refusals, the lease, every relaunch
  trigger, closed reporting, the opt-ins and merge cleanup.
- An isolated lab home (Herdr lab session, faked forge, real Treehouse pool)
  ran a full cycle through the real fm-pr-check, fm-park, fm-watch and
  fm-teardown: park with the slot leased (a concurrent get received another
  slot), a review comment relaunched a fresh worker in the same copy, re-park,
  and on merge the watcher tore the lane down and returned the copy.
- A read-only gate run against live lanes in other homes refused lanes with
  pending CI, unresolved threads or uncomputed mergeability, passed clean ones,
  and read a merge-train squash-merged GitLab MR (main got a commit other than
  the MR head) as merged.

Refs kunchenguid#7938

* no-mistakes(review): Harden park gate, bound tick, default merge cleanup

* no-mistakes(document): Inventory park-on-review config flags and state records

* no-mistakes(ci): I made fixes for all six Greptile findings (ci-1 to ci-6). One existing watcher test now fails because of the ci-1 change and needs your decision. Fixes: - **ci-1, merge cleanup skipped** (bin/fm-watch.sh): the merge poll now runs `fm-park.sh land` even when bin/fm-pr-merge.sh recorded the merge first. The cleanup outcome wakes the captain under the queue key `land-<id>`. New test `test_self_merged_lane_is_still_cleaned_up_by_the_poll` in tests/fm-pr-check-security.test.sh. - **ci-2, old CI approves parking** (GitLab gate): `head_pipeline` counts only when its sha equals the MR's current sha. - **ci-3, bot progress permits parking**: a reviewer bot counts as settled only when it has submitted a review bound to the current head; otherwise the quiet window decides. GitLab bot notes carry no such signal, so GitLab lanes now always wait for the quiet window (default 15 minutes after CI finishes). - **ci-4, edited feedback unanswered**: the relaunch trigger uses the later of a comment's creation and edit time. - **ci-5, later lanes starved**: a new `visit_lanes` helper starts each tick at the lane the previous tick did not reach (state/.review-park-tick-next and state/.review-park-tick-next-unparked) and wraps around. - **ci-6, unfinished park looks complete**: `cmd_park` writes state/<id>.review-park only after `fm-control.sh exit` confirms the stop. I updated the header docs in bin/fm-park.sh, docs/configuration.md and the operational-home-layout skill to match. Verification: - tests/fm-park.test.sh: all 18 cases pass, including the new regression cases for ci-2 to ci-6. - shellcheck is clean on all changed scripts and tests. - I did not run the new tests against the old code to see them fail first. Open problem: `test_merged_poll_reregistration_after_notification_is_absorbed` now fails. It re-arms a merge poll for a merge that was already reported, and in that test teardown refuses (the task has no project identity). The second watcher cycle now retries cleanup and wakes the captain with the same refusal again. I did not change this. The choice is: - keep repeating the refusal, which is arguably right because the lane still needs a decision, and update that test; or - wake only when cleanup succeeded in the already-recorded case, which would hide a refusal after a merge done through fm-pr-merge.sh and partly undo ci-1. The watcher subset stopped at that failure, so three tests never ran: the new ci-1 test, `test_self_merge_and_poll_publish_one_outcome`, and `test_merged_poll_row_names_no_authority_when_no_record_grants_one`. `test_merged_poll_retires_once` passed. I deleted the temporary subset file tests/.subset-sec.test.sh

* fix(park): write the park record pending before the stop and settle it on tick

cmd_park now writes state/<id>.review-park with pending=1 before
fm-control.sh exit and drops the flag once the stop is confirmed. A park
that dies after the stop, or whose final write fails, still leaves the
lane watched and resumable; crew state and list read it as parking. Each
tick promotes a pending record to parked once its agent is confirmed dead
and drops it while the agent is still alive. A record that cannot be
written refuses the park before the agent is stopped.

The re-armed merged-poll test now expects the repeated teardown-refusal
wake while the merge notice itself is not repeated.

* fix(park): bound the pending-park agent check by the tick budget

settle_pending asked the backend whether a pending lane's agent is alive
with no timeout, before the lane loop that honours the tick deadline, so
a hung backend (for example an unanswering tmux server) held the whole
tick and the watcher with it. The check now runs under fm_run_timed cut
to what the tick has left, and settling happens inside watch_parked, so
a tick that runs out of time saves the next lane in the existing cursor
and the next tick resumes there. An unanswered check leaves the record
pending.

* fix(park): require every required check reported, relaunch on inline replies

The GitHub park gate now refuses while a check the base branch requires has
not reported on the head (or the requirement cannot be read), using the
required-check reading bin/fm-pr-merge.sh does, moved into bin/fm-pr-lib.sh
so both share it. Review-thread comments join the activity list, so an
inline reply in an existing thread relaunches a parked worker.

* fix(park): run lane actions detached so no budget cuts them short

Park, relaunch, and merge-time cleanup now run as detached single-flight
actions under the lane lock instead of inside the tick or the watcher's
merged-poll iteration. The tick holds only forge reads and action starts,
so its budget can no longer kill a slow but successful relaunch, and the
merged-poll path only starts the teardown. Each action publishes its
outcome for the next tick to report, and a merge-time cleanup waits for an
action already under way on the lane.

The ship-landing skill now names the watcher as the one owner of a merged
lane's teardown, including merges made through fm-pr-merge.sh, so
firstmate no longer tears such a lane down a second time.

* no-mistakes(document): Document review parking and merge cleanup

* no-mistakes(ci): Fixed tick-bounded idle checks, reserved half the tick for unparked lanes, and persisted merge-cleanup requests before retiring the merge poll; pending requests retry on later ticks. Updated the park-on-review documentation and state-file list. `tests/fm-park.test.sh`, shell syntax checks, and `git diff --check` pass. The requested new regression tests for the three findings were not added, so those specific scenarios are not yet verified

* no-mistakes(ci): Fixed the requested behavior: unparked merge cleanup now requires config/auto-land; pending cleanup is recorded before poll retirement and dispatched after releasing the control lock; temporary lifecycle-lock refusals preserve the request for retry. Updated docs and behavioral tests. Full suite’s failure was only its maintainer-label gate; ci.yml was left unchanged. tests/fm-park.test.sh and git diff --check pass. ShellCheck reported existing source-following/unused-variable diagnostics; the lint partition and combined shellcheck command timed out, and the merge-poll tests were not completed

* no-mistakes(ci): Added behavioral regression tests for pending-cleanup recovery after watcher restart and retry after a temporary lifecycle-lock refusal. `FM_LIVE=0 bash tests/fm-park.test.sh`, `shellcheck tests/fm-park.test.sh`, and `git diff --check` pass

* test(park): wait for the pending cleanup request to clear before asserting

A detached land publishes its report before it removes the pending
request, so waiting only for the report let the cleanup tests assert
request removal too early. wait_land_settled waits for the request to
clear, which implies the report exists. The control-lock retry test now
ticks until the retry runs instead of sleeping, failing if any tick
reports the refusal as an outcome.

* fix(park): bind cleanup requests to their PR and record wakes before removing reports

A merge-time cleanup request now records the merged PR, and land drops a
request whose PR is no longer the lane's under the lane lock, so a stale
request cannot tear down a lane that moved on to another PR. Teardown also
removes a lane's cleanup request.

The tick now records its outcome and close lines as one wake before it
removes the reports behind them or marks a close as reported; when the wake
cannot be recorded it removes and prints nothing, so the next tick retries.
The watcher only rings.

The two tick-budget tests run under a 6s tick with 8s slow stubs: under a
2s tick the parked-lane budget was one whole second, so the first forge read
was skipped whenever setup crossed a second boundary.

* no-mistakes(document): Document park-on-review safety behavior

* fix(park): keep the cleanup request until its outcome is saved

Teardown no longer deletes a lane's merge cleanup request. Only the
detached cleanup removes it, after its outcome report is saved, so a
cleanup killed partway through its teardown is retried by the next tick
instead of being lost. A request left behind by a manual teardown is still
dropped by the tick once the task record is gone, or by land when the lane
now records a different PR.

* fix(bin): keep the PR merge watch working when a worker with a PR is relaunched (kunchenguid#7996)

* Preserve PR poll authentication on relaunch

* no-mistakes(review): Keep trace and polytoken meta ahead of PR lines

* fix(spawn): keep a recorded PR the task record's tail across relaunch

A control-plane relaunch republished the record with control_relaunch_tx=
after the preserved pr= lines, and the trace-context and Polytoken session
rewrites appended after them too. fm_pr_metadata_identity_parse refuses any
other line after pr=, so the watcher stopped running that lane's merge poll
("rejected unauthenticated state checks") and its merge went unseen. Every
spawn-side rewrite now writes the PR trailer last.

Refs kunchenguid#7938

* fix(spawn): reuse main PR metadata rewrite helper

* no-mistakes(review): Count unresolved GitLab notes individually

* no-mistakes(review): Relaunch parked lanes on incomplete GitHub threads

* no-mistakes(document): Document park-on-review behavior

* fix(park): paginate GitHub comments and fix Linux mode test

* no-mistakes(review): Set private permissions on cleanup requests

* no-mistakes(document): Correct park-on-review cleanup documentation

* fix(park): serialize inbox delivery with review parking

* no-mistakes(ci): Fixed `Lint 1`: removed the unused local variables in `tests/fm-park.test.sh` and exported `FM_HOME`, which the sourced inbox library reads. `bin/fm-lint.sh tests/fm-park.test.sh` passed. The Full suite failure was an aggregate of failed lanes; its log reports `FM_CI_LANES_FAILED=true`, not the underlying lane failure, so I can’t confirm this lint fix resolves it. The park test started passing scenarios but exceeded the 120-second timeout before completing

* no-mistakes(review): Document GitLab pagination completeness invariant

* no-mistakes(review): Remove duplicate temporary park test suite

* no-mistakes(review): Strengthen relaunch and inbox lock regressions

* no-mistakes(review): Keep merge poll armed when cleanup queueing fails

* no-mistakes(review): Preserve pending parks and merge cleanup retries

* no-mistakes(review): Test merged-poll cleanup queue retries

* no-mistakes(review): Retain cleanup request when outcome reporting fails

* no-mistakes(document): Fix park-on-review documentation links

* fix(park): relaunch a pending park only once its stop is confirmed

A pending record now stays pending while its agent reads alive, so feedback could relaunch over a worker whose park never finished. Hold every trigger until the stop is confirmed, for a live agent and an unreadable one alike.

Update the preflight test to expect the record to stay pending and expire at the stop bound, fix gh_fixture's review count for extra_reviews, and make the interrupted-alive and interrupted-unreadable cases wait out the detached relaunch they rule out.

* no-mistakes(review): Fix same-second relaunches and synchronize detached tests

* no-mistakes(document): Clarify park-on-review documentation ownership

* no-mistakes(ci): Applied the GitLab incomplete-discussions handling and outage distinction in `bin/fm-park.sh`, with corresponding test updates. Verification failed: `FM_LIVE=0 bash tests/fm-park.test.sh` reported 3/32 failures; specifically, the failed-page parked-lane relaunch was not observed within the test timeout. Fix/test remains incomplete

* test(park): write real newlines in the GitLab relaunch fixtures

The fixtures used a doubled backslash, so the record held one line, parked_at could not be read, and the tick skipped the lane. The relaunch assertion could not pass, and the outage assertion passed without reaching the forge read.

* no-mistakes(review): Synchronize detached teardown timing test

* no-mistakes(ci): Added the measured `fm-park.test.sh` serial hint and provenance; moved closed-PR reporting ahead of the idle-worker check and added a busy-worker regression. Coverage guard passed (43/290 unhinted), and `FM_LIVE=0 bash tests/fm-park.test.sh` passed. `tests/fm-test-run.test.sh` reached the shard-coverage cases but timed out during a later case; `git diff --check` passed

* fix(teardown): gate GitLab merged-MR landed-work proof on park-on-review opt-in

Teardown accepts a merged GitLab merge request (squash or merge train) as
landed work only when config/park-on-review or config/auto-land exists.
Without either flag a GitLab MR goes through the same read as on main.

* no-mistakes(ci): Fixed park preflight to reject backends lacking verified stop and replacement-agent support before lease or record creation. Added a Zellij regression test; `bash tests/fm-park.test.sh` and `git diff --check` pass

* no-mistakes(ci): Fixed CI coverage by moving fm-park into the proven portable parallel set and rebalancing its lanes; retained teardown status-4 slot/path details in saved land reports with a regression test. Updated scheduling evidence docs. Verified coverage guard (27 parallel; max 850004 ms), fm-park tests, and doc audience check. fm-test-run tests passed scheduling/coverage checks but timed out at 600s before the suite completed

---------

Co-authored-by: Ian Brown <742554+zestysoft@users.noreply.github.com>
@ywplee

ywplee commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Workflow check for this PR: 0 workflow runs exist for head 7fa70b0694fa6c228b76691030e98fc66a357a08 a few minutes after it was opened, and the PR is mergeable with no conflicts. Opening it did not start CI or the compliance workflow, which matches the behavior described under "Why pull-request workflows are not starting".

@ywplee
ywplee merged commit b032e05 into main Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.