Skip to content

feat: sync weekly refit with upstream firstmate (2026-11-14) - #117

Merged
DereKk8 merged 26 commits into
mainfrom
fm/fm-refit-sync-20261114
Nov 15, 2026
Merged

DereKk8 merged 26 commits into
mainfrom
fm/fm-refit-sync-20261114

Conversation

@DereKk8

@DereKk8 DereKk8 commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Merge 23 canonical upstream commits into this fork while preserving its existing behavior and reconciling task-artifact archiving with automatic cleanup.

Validation outcome

  • Opus independently reviewed and tested the integration. Its two text-only fixes require archiving before watcher-owned cleanup and refreshing that archive after later artifact changes.
  • All 23 PR checks now pass on 0f2766e21dcc536498403305effd9b6fdf2b2be8. The first CI attempt exposed an upstream-native away-record clock race and a Lint 2 job timeout. One authorized same-head rerun per affected job produced passing results without code, test, threshold, or timeout changes.
  • The local Test step has an explicitly accepted exception: the unchanged upstream review-parking timing case fails on this host and also on untouched upstream 427056c4. Its CI lane passes. Other host-only findings concern the tasks-axi mise shim, the installed Herdr binary escaping a missing-tool fixture, and the systemd subreaper. These findings remain owned by upstream or host setup, not patched in this refit.
  • The away-record race is also reproduced on unchanged upstream and this PR under a controlled scheduling delay. Two separate clock reads can disagree by one second. The proposed upstream fix is a single epoch read with the ISO timestamp derived from it. The sanitized issue draft remains private; no upstream issue was published.

Intent

"Run the weekly refit using the following division of responsibilities: Codex worker: Perform the overall merge reconciliation, resolving integration inconsistencies and conflicts. Opus worker: Independently validate the reconciled result, checking correctness, compatibility, and regressions. Preserve existing working behavior and avoid unnecessary changes. Report the reconciliation outcome, validation findings, and any unresolved blockers." - the go for the refit full sync, given 2026-11-14, with validation on Opus approved.

Context: weekly refit full sync of this fork (DereKk8/firstmate, remote origin, base main at a2647e8 = PR #116) with canonical upstream (kunchenguid/firstmate, remote upstream, head 427056c). The currency check found real incoming content: 23 upstream commits since merge-base 913bb7a, 105 files, +8457/-775 (captain holds settled from forge PR events, parked ship lanes while awaiting review, stale worker record archiving, opt-in PR squash summaries, opt-in silent recheck of paused waits, config/crew-exclude-tools on Claude workers, stale directory lock recovery at session start, Stop auto-arm takeover by a continued Claude session, and other fixes). A merge simulation reports 1 conflicted path: .agents/skills/ship-landing/SKILL.md.

What Changed

  • This PR merges 23 upstream kunchenguid/firstmate commits (through 427056c4) into the fork. The new features are: captain holds settled from forge PR events (bin/fm-captain-hold.sh), ship lanes that park while they wait for review (new bin/fm-park.sh, config/park-on-review), stale worker record reporting and archiving (new bin/fm-record-hygiene-lib.sh), opt-in PR squash commit summaries (bin/fm-pr-merge.sh), opt-in silent recheck of unchanged paused waits (bin/fm-watch.sh), config/crew-exclude-tools on Claude workers, and an opt-in Treehouse pool report in bootstrap.
  • The merge also brings upstream fixes. These fixes cover stale directory lock recovery at session start, Stop auto-arm takeover by a continued Claude session, gaps in the PR registration scan, false extension timeouts after a system suspend (new bin/fm-extension-deadline.mjs), detection of the bun-installed omp harness (new bin/fm-omp-process-lib.sh), Grok 1.0.77 Fast composer reading, the home-summary refresh deadline, login identity in remote jobs, and bash 3.2 empty args in hermes. Matching docs, skills, and tests come with the fixes.
  • This PR resolves the one merge conflict, in .agents/skills/ship-landing/SKILL.md. The resolution keeps the fork's named-head gate guidance and adds upstream's park-on-review and watcher-owned teardown rules. It also says that firstmate runs bin/fm-archive-task.sh before watcher-owned merge cleanup, and runs it again with --force when the lane changes its artifacts before the merge.

Risk Assessment

✅ Low: The merge is a real two-parent union of fork main a2647e8 and upstream 427056c. Every file that only one side changed matches that side exactly. The one conflicted seam in ship-landing keeps the fork's autopilot, archive and fleet-sync lines together with upstream's park/auto-land teardown rule. The two fix-round lines are text only and use the archiver's real --force syntax (bin/fm-archive-task.sh:20-24,69-71).

Testing

I drove three live scenarios against disposable lab homes and the real Claude CLI, and all three passed. (1) The fork's bin/fm-archive-task.sh flow from the merged ship-landing text: first archive, refusal of a plain rerun, --force refresh after a simulated resume, and survival after watcher teardown removes the worktree. (2) The merged bin/fm-bootstrap.sh: silent by default, and it reports RECORD_HYGIENE only when config/record-hygiene is set. (3) The live Claude Stop auto-arm end-to-end test with real Claude 2.1.325, a file both sides changed. I ran 14 targeted behavior scripts for the files both sides changed and for the main upstream features. Nine passed, including fm-teardown, fm-archive-task, fm-dod-lib, fm-claude-stop-autoarm, fm-watcher-lock, fm-watch-triage-pause, fm-contributions and fm-inactive-reconcile. I compared each of the 5 failures against upstream 427056c and fork base a2647e8, and none is a merge regression. Three come from the host's tasks-axi mise shim, which breaks when a test sets HOME. fm-spawn-dispatch-profile passed 111/0 and fm-pr-merge passed 150/0 after I put the real binary on PATH. fm-captain-hold-lifecycle hits the same shim, but I did not rerun it with the real binary. Two more depend on the host: herdr is installed in /usr/bin, and orphans go to a systemd subreaper instead of pid 1. The last is the upstream fm-park pending-hang timing case, which also fails on unmodified upstream. This is not a UI change, so there are no screenshots. The evidence is the CLI transcripts and logs.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Conflict-resolved ship-landing flow: firstmate archives a lane, a plain rerun refuses, --force refreshes after the lane changes its artifacts, and the archive survives worktree removal ✅ pass live archive-force-refresh.txt: the first archive gives v1. The plain rerun REFUSED with a --force hint. The --force rerun gives 'v2 notes after review'. After the worktree is removed, the script reports '…
Merged bin/fm-bootstrap.sh (changed on both sides) runs clean in a fresh lab home and reports RECORD_HYGIENE only when that opt-in flag is set ✅ pass live bootstrap-lab.txt: no output and exit 0 with default settings. With config/record-hygiene and a stale record, it prints 'RECORD_HYGIENE: metadata has no tab: ghost' and exits 0.
Real Claude session: Stop auto-arm (changed on both sides) reclaims a stale lock at session start, completes two tokenless rewake cycles, and records the Stop payload's own session id ✅ pass live claude-stop-autoarm-live-e2e.log: 'ok - Claude 2.1.325 ... live E2E ...' exit=0
Merged scripts changed on both sides (pr-merge, spawn, dod-lib, claude-stop-autoarm) and the main new upstream features (park, teardown, watcher lock, paused-wait recheck, contributions, inactive reco… ✅ pass live targeted-tests.log/json: dod-lib, claude-stop-autoarm, teardown, archive-task, watcher-lock, watch-triage-pause, contributions and inactive-reconcile exit 0. After rerunning with the real tasks-axi bi…
Adversarial check: every failing test was re-run on upstream 427056c and fork base a2647e8 to rule out a merge regression ✅ pass live failure-triage.txt. pr-merge and spawn-dispatch-profile fail on all three trees for the same reasons. fm-park pending-hang fails on the unmodified upstream copy, and bin/fm-park.sh is byte-identical t…
Evidence: Archive refresh flow transcript (lab home)

Source: Archive refresh flow transcript (lab home)

## 1. first archive while worktree exists
$ bin/fm-archive-task.sh t1
archived task t1 from $LAB/wt-t1/.agent/tasks/t1 into $LAB/projects/demo/.agent/archive/t1
[exit=0]
$ cat $LAB/projects/demo/.agent/archive/t1/notes.md
v1 notes
[exit=0]
## 2. lane changes artifacts after resume
## 3. plain rerun refuses
$ bin/fm-archive-task.sh t1
REFUSED: archive destination already exists: $LAB/projects/demo/.agent/archive/t1 (rerun with --force to overwrite)
[exit=1]
## 4. --force refresh (ship-landing instruction)
$ bin/fm-archive-task.sh t1 --force
archived task t1 from $LAB/wt-t1/.agent/tasks/t1 into $LAB/projects/demo/.agent/archive/t1
[exit=0]
$ cat $LAB/projects/demo/.agent/archive/t1/notes.md
v2 notes after review
[exit=0]
## 5. worktree removed by watcher teardown; archive survives
$ bin/fm-archive-task.sh t1
archived task t1 already present at $LAB/projects/demo/.agent/archive/t1; recorded worktree is gone
[exit=0]
$ cat $LAB/projects/demo/.agent/archive/t1/notes.md
v2 notes after review
[exit=0]
Evidence: Merged bootstrap in lab home

Source: Merged bootstrap in lab home

## bootstrap in fresh lab home (defaults)
[exit=0]
## bootstrap with config/record-hygiene and a stale ghost record
RECORD_HYGIENE: metadata has no tab: ghost
[exit=0]
Evidence: Live Claude Stop auto-arm E2E log

Source: Live Claude Stop auto-arm E2E log

ok - Claude 2.1.325 (Claude Code) live E2E reclaimed a stale session lock through session start, completed two tokenless Stop-owned rewake cycles, and preserved the competing-live-owner boundary exit=0

Note: switching to '0f2766e21dcc536498403305effd9b6fdf2b2be8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

ok - Claude 2.1.325 (Claude Code) live E2E reclaimed a stale session lock through session start, completed two tokenless Stop-owned rewake cycles, and preserved the competing-live-owner boundary
exit=0
Evidence: Failure triage across HEAD, upstream and fork base

Source: Failure triage across HEAD, upstream and fork base

Failure triage for the weekly refit merge (HEAD 0f2766e2) - test phase, 2026-11-14

Targeted run (bin/fm-test-run.sh, 14 scripts, targeted-tests.log/json): 9 scripts passed; 5 failed.
Each failure was compared against the unmerged upstream head 427056c4 and the fork base a2647e82.

1. fm-pr-merge "updated-draft-pending", fm-captain-hold-lifecycle "could not create the user-config origin",
   fm-spawn-dispatch-profile (a different case fails on each tree)
   Cause: host tasks-axi is a mise shim (~/.local/bin/tasks-axi -> mise shims). These tests set HOME to a throwaway dir,
   so mise loses its trust record and the shim exits 1 ("Config files in ~/.config/mise/config.toml are not trusted").
   Same failure on 427056c4 and a2647e82.
   Proof: rerun with PATH=<real node bin>:$PATH -> fm-spawn-dispatch-profile 111 ok / 0 fail; fm-pr-merge 150 ok / 0 fail
   (rerun-real-tasks-axi.*.log).
2. fm-bootstrap "backend=herdr must fail closed on its own missing session CLI"
   Cause: herdr is installed in /usr/bin, which is in the test's BASE_PATH, so the test cannot hide herdr. Host-specific.
3. fm-session-lock-ancestry "the pty-host was not reparented to init"
   Cause: orphans on this host are adopted by the user systemd subreaper (pid 1180), not pid 1. Host-specific.
4. fm-park "pending-hang: the tick did not save the lane it never reached"
   bin/fm-park.sh and tests/fm-park.test.sh are byte-identical to upstream 427056c4; the case fails there too.
   Instrumented: cursor=[lane] took=1s. FM_PARK_TICK_SECS=2 gives parked lanes a (2+1)/2 = 1 s integer-second budget,
   which tick setup uses up before the first lane is visited, so the cursor names lane, not lane2.
   Upstream-owned timing issue, not a merge regression.
Evidence: Targeted test run log

Source: Targeted test run log

FM_TEST_BEGIN 2026-11-14T21:51:55Z tests/fm-captain-hold-lifecycle.test.sh family=pure-contract-unit expected_gate_skip=none
FM_TEST_BEGIN 2026-11-14T21:51:55Z tests/fm-park.test.sh family=pr-forge expected_gate_skip=none
FM_TEST_BEGIN 2026-11-14T21:51:55Z tests/fm-pr-merge.test.sh family=pr-forge expected_gate_skip=none
not ok - updated-draft-pending: missing the actual refusal reason
FM_TEST_END 2026-11-14T21:51:56Z tests/fm-pr-merge.test.sh exit=1 duration_ms=917 gate_skip=false
1..34
ok - github gate: clean PR parks, and draft, closed, conflict, behind, unknown mergeability, CI pending/failing/absent, changes requested, unresolved and unread threads each refuse
ok - github gate refuses while a required check of the base branch has not reported on the head, or the requirement cannot be read
ok - github gate waits for every reviewer bot to submit a review of the current head, or the quiet window since it was pushed
ok - gitlab gate: clean MR parks, and draft, conflict, rebase, CI running/failed/absent, changes requested, other merge blockers, unresolved threads, a pipeline on an older commit, and a review bot that has not finished each refuse, across every page of discussions; a failed page is unreadable for gate and tick
ok - park evaluates the gate twice, leases the slot, writes a private record, stops the agent once, and declares the wait
ok - park refuses an unsupported backend before leasing, recording, or stopping
ok - a head change between the verdict and the stop refuses the park and leaves the agent running
ok - an instruction or a new turn arriving after the preflight refuses the park before the agent is stopped
ok - park holds the inbox delivery lock across its final check and stop, refusing a newly delivered instruction without stopping the agent
ok - park leaves the task metadata lock available to fm-control exit
ok - a pending park stays watched during stop, promotes a later stop, and expires only after the stop bound
not ok - pending-hang: the tick did not save the lane it never reached
FM_TEST_END 2026-11-14T21:52:14Z tests/fm-park.test.sh exit=1 duration_ms=18928 gate_skip=false
ok - marked hold reasons round-trip through public reads, fleet, startup, and return without changing other fields
ok - new, active, and released holds publish origins after backend success with and without deferral
Terminated                 PATH="$home/fakebin:$PATH" REAL_TASKS_AXI="$TASKS_AXI_BIN" FM_HOME="$home" FM_STATE_OVERRIDE="$home/state" FM_DATA_OVERRIDE="$home/data" FM_CONFIG_OVERRIDE="$home/config" bash -c 'printf "%s\n" "$$" > "$FM_HOME/hold-pid"; exec "$@"' _ "$ROOT/bin/fm-captain-hold.sh" hold "$id" --reason "Choose for B" --origin origin-b > "$home/hold.out" 2> "$home/hold.err"
Terminated                 PATH="$home/fakebin:$PATH" REAL_TASKS_AXI="$TASKS_AXI_BIN" FM_HOME="$home" FM_STATE_OVERRIDE="$home/state" FM_DATA_OVERRIDE="$home/data" FM_CONFIG_OVERRIDE="$home/config" bash -c 'printf "%s\n" "$$" > "$FM_HOME/hold-pid"; exec "$@"' _ "$ROOT/bin/fm-captain-hold.sh" hold "$id" --reason "Choose for B" --origin origin-b > "$home/hold.out" 2> "$home/hold.err"
Terminated                 PATH="$home/fakebin:$PATH" REAL_TASKS_AXI="$TASKS_AXI_BIN" FM_HOME="$home" FM_STATE_OVERRIDE="$home/state" FM_DATA_OVERRIDE="$home/data" FM_CONFIG_OVERRIDE="$home/config" bash -c 'printf "%s\n" "$$" > "$FM_HOME/hold-pid"; exec "$@"' _ "$ROOT/bin/fm-captain-hold.sh" hold "$id" --reason "Choose for B" --origin origin-b > "$home/hold.out" 2> "$home/hold.err"
Terminated                 PATH="$home/fakebin:$PATH" REAL_TASKS_AXI="$TASKS_AXI_BIN" FM_HOME="$home" FM_STATE_OVERRIDE="$home/state" FM_DATA_OVERRIDE="$home/data" FM_CONFIG_OVERRIDE="$home/config" bash -c 'printf "%s\n" "$$" > "$FM_HOME/hold-pid"; exec "$@"' _ "$ROOT/bin/fm-captain-hold.sh" hold "$id" --reason "Choose for B" --origin origin-b > "$home/hold.out" 2> "$home/hold.err"
ok - failed and interrupted origin moves cannot inherit active, expired, replayed, or completed calls
ok - historical self-inventories name a workable repair that preserves sibling entries
ok - completion and verification compare backend identities for entries and current or stored origins
ok - complete refuses the origin as its own captain-call inventory
ok - complete refuses an entry held for another origin and flags one with none recorded
ok - report-only unresolved captain call is reproduced and completion refuses before loss
ok - both body-decoding paths work without the allow_nonref default
ok - cleanup preserves every byte of a retained body's non-ASCII characters
ok - the completion gate attests captain-held inventory and transfers open status decisions
ok - answer records the captain's words, closes idempotently, and releases routed work
ok - release frees held work with the captain's words recorded and the body preserved
ok - a captain hold is released only in an attended session: away refuses, quiet and no record release
ok - a release waiting on the task lock rechecks the away posture under the lock
ok - captain holds become visible only after their hold-set timestamp is durable
ok - an interrupted answer preserves its hold age until close retry
ok - a deferred captain call leaves the live Captain's Call until its date and stays answerable
ok - an out-of-band close is recordable with the captain's word and nothing else
ok - ended visual review follows the same captain-hold completion owner
ok - resolved findings and decision-like prose do not create captain-held tasks
ok - completion keeps an armed PR identity last in the task record
ok - completion replaces a completion pair recorded after pr= by the previous writer
ok - terminal single-owner stale status decisions do not block empty inventory
ok - main-home and secondmate-home captain calls remain correctly routed
ok - a secondmate home publishes each hold occurrence and its answer on the parent channel
ok - secondmate resolutions publish before retiring durable retry triggers
ok - a bound channel's captured answers close their captain-held tasks at answer time
ok - only a bound captured source creates reconcile requests
ok - normal answers and their replays retire reconcile requests
ok - reconcile closes a moot call with evidence and keeps an active one open with a note
ok - reconcile outcomes apply durable mutations once across partial failures
ok - a channel source with no decision binding closes nothing
ok - legacy identities, metadata, bindings, and the shim keep working
ok - a board answer reaches the keyed-answer intake and wakes firstmate
ok - the chat channel feeds the same keyed-answer intake a captured review does
ok - completion and verification validate origins before constructing paths
ok - a status resolution over a still-open captain-held task is signalled, not closed
ok - a captain call with no routed work, a verified transfer, an open decision, and an answered call all stay silent
ok - cleanup leaves a captain-held work item open with its deliverable, and only an answer closes it
ok - release and scout report retention distinguish deliveries from rejected merge answers
ok - an interrupted cleanup keeps the captain call recoverable and session start retains it
ok - an answer before cleanup replay preserves the retained report
ok - an answer before cleanup replay notes the retained Gerrit change
ok - an unusable pending-close record names its reason instead of a bare refusal
ok - an unsupported relocated report does not wedge the captain's answer
ok - cleanup retains captain calls in the configured backlog
ok - cleanup keeps a captain-held Gerrit task open and records its change URL
ok - merge approval releases before zero-retention cleanup records completion
ok - the PR merge entrypoint refuses a captain-held task before merging
ok - the local merge entrypoint refuses a captain-held task before merging
ok - the PR merge entrypoint separates an unreadable authority record from an absent one
ok - the local merge entrypoint separates an unreadable authority record from an absent one
ok - merge entrypoints reject unsafe identities and absent state before locking
ok - merge entrypoints refuse a replacement incarnation after waiting for cleanup
ok

... [72056 bytes truncated] ...

ed PR of a task without a captain hold raises no event
ok - a hold linked after the closure gets its own closed event once
ok - retained delivery keeps its PR policy and interrupted settlement replays once
ok - errored evidence, a different PR, and a changed question cannot settle a hold
ok - forge events settle only declared questions and preserve unfinished work
ok - disabled, unmatched, and superseded policies cannot settle a hold
ok - only required-captain contributions are rows; other actors are counted
ok - replaced-head verdict is stale and cannot create a captain requirement
ok - unchecked ownership is disclosed and cannot prove silence
ok - newest check with no verdict is distinct from passing and pending
ok - new maintainer comment wakes once and stays pending until acknowledged
ok - new maintainer review wakes once and stays pending until acknowledged
ok - new maintainer inline wakes once and stays pending until acknowledged
ok - a listed collaborator bot and its re-raise remain review-bot fleet signals
ok - review-bot watching is off until a home lists a bot
ok - the armed allowlist is stable across working directories and policy toggles
ok - ready-for-pr on a filed issue becomes a planning wake
ok - a fresh open issue remains measured maintainer triage
ok - an absent check lane remains missing across repeated observations
ok - mixed freshness retains measured captain work and discloses the gap
ok - malformed durable evidence cannot prove silence
ok - a transient ready-for-pr label wakes and its exact acknowledgement survives replay
ok - recorded judgment keeps its exact head and is stale immediately on a published replacement
ok - verdict help and refusal name exactly the actors the command accepts
ok - a current forge observation refreshes a verdict after a replacement
ok - an unavailable current head leaves verdict freshness unknown
ok - away yolo delivery is fleet work without granting merge authority
actionable: PR https://github.com/o/r/pull/8 is registered but its ready line did not reach the parent channel (rc=3)
ok - cross-home away yolo delivery is fleet work
ok - retired ownership persists and unsupported forge remains visibly unmeasured
ok - unsupported forge coverage is disclosed without inventing fleet work
ok - held unsupported forge coverage remains unmeasured
ok - unsupported ownership stays silent and unmeasured; legacy errors clear without fabricated evidence
ok - legacy cleanup preserves unsupported ownership and supported missing-evidence failure in the same file
ok - shared contribution signal wakes once while retaining both acknowledgements
ok - watcher keeps observer diagnostics separate from contribution wakes
ok - expired child unsupported-forge coverage remains unmeasured
ok - watcher surfaces one newly durable contribution signal without re-ringing it
ok - parent consumes measured child coverage and refuses expired child silence
ok - unreadable pending signals refuse an empty-inbox claim
ok - record task identity is the directory dirname/basename named
ok - snapshot and pending create nothing in a home without state
ok - budget exhausted mid-observation (exhaust) keeps the prior record and stays silent
ok - budget exhausted mid-observation (hang) keeps the prior record and stays silent
ok - a genuine forge failure inside the budget still records the error, its cause and wakes
ok - one HTTP 500 is retried once and a successful retry stays healthy
ok - two transient failures wake once and name the failed read in the record
ok - an HTTP 404 is reported without retrying
ok - real gh error shapes drive the intended retry decision and keep their error
ok - a URL never inherits the previous URL read diagnostic
jq: error (at ~/.cache/tmp/fm-contributions.d7nopf/after.json:1): null (null) cannot be matched, as it is not a string
ok - a URL owned by two tasks is observed once and every owner receives the result
ok - a merged or closed contribution settles once, is not re-read, and never wakes again
ok - a late owner inherits a terminal observation without a forge read or wake
ok - a retry converges every owner whose saved row is not terminal, keeping its own acknowledgement state
ok - an open PR linked from a done task keeps being observed
ok - a home with many settled records still observes its open PR within the check bound
ok - a home with many settled records and a malformed one still observes its open PR within the check bound
ok - a record without a trailing newline stays readable beside its neighbours
ok - records beyond one read batch are all read
ok - a later URL waits when fewer than fifteen seconds remain for its observation
ok - eight 3-second PR reads complete fresh within one 20-second poll cycle
ok - a read killed at the five-second bound is budget refusal and stays silent
ok - rotation preserves timed-out records and refreshes every slow PR on successive cycles
ok - the effective budget is cut down to the watcher per-check bound with margin
ok - generated checks enforce configured and inherited budgets at runtime
ok - a genuinely unavailable forge records an error and wakes once per failure episode
ok - a late owner does not restart a shared forge failure episode
ok - retire stops the unavailable check, leaves rotation and restores complete coverage
ok - a late owner settled beside a retired final record stays unretired and known
ok - retire is idempotent and refuses non-captain, unknown, malformed and signal-bearing pairs
ok - an acknowledged unanswered thread under a hold is raised again after a day, daily, until the author replies
ok - a resolved thread with no reply counts as answered
ok - only inline threads and reviews requesting changes with text, no author reply, resolution or later verdict are tracked as unanswered
ok - the reply age is a validated seconds setting
ok - a closed pull request stops raising its threads
ok - the unanswered re-raise and the review-thread read stay off unless a reply age is configured
ok - arm copies a configured reply age into the generated check
ok - a many-review PR stores only classified review fields and stays readable
FM_TEST_END 2026-11-14T22:19:53Z tests/fm-contributions.test.sh exit=0 duration_ms=219895 gate_skip=false
FM_TEST_SUMMARY total=14 failed=6 skipped_gate=0 duration_ms=1678354
FM_TEST_SUMMARY_FAMILY family=backend-dispatch count=1 duration_ms=36279 failed=1
FM_TEST_SUMMARY_FAMILY family=pr-forge count=3 duration_ms=308650 failed=2
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=2 duration_ms=539878 failed=1
FM_TEST_SUMMARY_FAMILY family=session-bootstrap count=1 duration_ms=65328 failed=1
FM_TEST_SUMMARY_FAMILY family=snapshot-bearings count=1 duration_ms=219895 failed=0
FM_TEST_SUMMARY_FAMILY family=standalone count=1 duration_ms=67310 failed=0
FM_TEST_SUMMARY_FAMILY family=unclassified count=1 duration_ms=404 failed=0
FM_TEST_SUMMARY_FAMILY family=watcher-wake-lock count=4 duration_ms=700315 failed=1
FM_TEST_SLOWEST rank=1 script=tests/fm-captain-hold-lifecycle.test.sh duration_ms=530076
FM_TEST_SLOWEST rank=2 script=tests/fm-watch-triage-pause.test.sh duration_ms=459970
FM_TEST_SLOWEST rank=3 script=tests/fm-teardown.test.sh duration_ms=288805
FM_TEST_SLOWEST rank=4 script=tests/fm-contributions.test.sh duration_ms=219895
FM_TEST_SLOWEST rank=5 script=tests/fm-watcher-lock.test.sh duration_ms=113098
FM_TEST_SLOWEST rank=6 script=tests/fm-session-lock-ancestry.test.sh duration_ms=84319
FM_TEST_SLOWEST rank=7 script=tests/fm-claude-stop-autoarm.test.sh duration_ms=67310
FM_TEST_SLOWEST rank=8 script=tests/fm-bootstrap.test.sh duration_ms=65328
FM_TEST_SLOWEST rank=9 script=tests/fm-inactive-reconcile.test.sh duration_ms=42928
FM_TEST_SLOWEST rank=10 script=tests/fm-spawn-dispatch-profile.test.sh duration_ms=36279
FM_TEST_SLOWEST rank=11 script=tests/fm-park.test.sh duration_ms=18928
FM_TEST_SLOWEST rank=12 script=tests/fm-dod-lib.test.sh duration_ms=9802
FM_TEST_SLOWEST rank=13 script=tests/fm-pr-merge.test.sh duration_ms=917
FM_TEST_SLOWEST rank=14 script=tests/fm-archive-task.test.sh duration_ms=404
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M7DZX4NWQD0NWBF1Y31WVJ0V/targeted-tests.json
Evidence: Targeted test timing JSON

Source: Targeted test timing JSON

{
  "families": [
    {
      "count": 1,
      "duration_ms": 36279,
      "failed": 1,
      "name": "backend-dispatch"
    },
    {
      "count": 3,
      "duration_ms": 308650,
      "failed": 2,
      "name": "pr-forge"
    },
    {
      "count": 2,
      "duration_ms": 539878,
      "failed": 1,
      "name": "pure-contract-unit"
    },
    {
      "count": 1,
      "duration_ms": 65328,
      "failed": 1,
      "name": "session-bootstrap"
    },
    {
      "count": 1,
      "duration_ms": 219895,
      "failed": 0,
      "name": "snapshot-bearings"
    },
    {
      "count": 1,
      "duration_ms": 67310,
      "failed": 0,
      "name": "standalone"
    },
    {
      "count": 1,
      "duration_ms": 404,
      "failed": 0,
      "name": "unclassified"
    },
    {
      "count": 4,
      "duration_ms": 700315,
      "failed": 1,
      "name": "watcher-wake-lock"
    }
  ],
  "finished_at": "2026-11-14T22:19:53Z",
  "run_id": "fm-test-run-1794693115013-2434524",
  "scripts": [
    {
      "duration_ms": 917,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-pr-merge.test.sh"
    },
    {
      "duration_ms": 18928,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-park.test.sh"
    },
    {
      "duration_ms": 530076,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-captain-hold-lifecycle.test.sh"
    },
    {
      "duration_ms": 42928,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "watcher-wake-lock",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-inactive-reconcile.test.sh"
    },
    {
      "duration_ms": 84319,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "watcher-wake-lock",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-session-lock-ancestry.test.sh"
    },
    {
      "duration_ms": 113098,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "watcher-wake-lock",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-watcher-lock.test.sh"
    },
    {
      "duration_ms": 459970,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "watcher-wake-lock",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-watch-triage-pause.test.sh"
    },
    {
      "duration_ms": 9802,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-dod-lib.test.sh"
    },
    {
      "duration_ms": 288805,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-teardown.test.sh"
    },
    {
      "duration_ms": 65328,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "session-bootstrap",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-bootstrap.test.sh"
    },
    {
      "duration_ms": 67310,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "standalone",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-claude-stop-autoarm.test.sh"
    },
    {
      "duration_ms": 36279,
      "exit": 1,
      "expected_gate_skip": "none",
      "family": "backend-dispatch",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-spawn-dispatch-profile.test.sh"
    },
    {
      "duration_ms": 404,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "unclassified",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-archive-task.test.sh"
    },
    {
      "duration_ms": 219895,
      "exit": 0,
      "expected_gate_skip": "optional-binary",
      "family": "snapshot-bearings",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-contributions.test.sh"
    }
  ],
  "selection": "scripts;jobs=4",
  "started_at": "2026-11-14T21:51:55Z",
  "summary": {
    "duration_ms": 1678354,
    "failed": 6,
    "skipped_gate": 0,
    "total": 14
  }
}
Evidence: fm-park rerun (upstream pending-hang timing failure)

Source: fm-park rerun (upstream pending-hang timing failure)

1..34
ok - github gate: clean PR parks, and draft, closed, conflict, behind, unknown mergeability, CI pending/failing/absent, changes requested, unresolved and unread threads each refuse
ok - github gate refuses while a required check of the base branch has not reported on the head, or the requirement cannot be read
ok - github gate waits for every reviewer bot to submit a review of the current head, or the quiet window since it was pushed
ok - gitlab gate: clean MR parks, and draft, conflict, rebase, CI running/failed/absent, changes requested, other merge blockers, unresolved threads, a pipeline on an older commit, and a review bot that has not finished each refuse, across every page of discussions; a failed page is unreadable for gate and tick
ok - park evaluates the gate twice, leases the slot, writes a private record, stops the agent once, and declares the wait
ok - park refuses an unsupported backend before leasing, recording, or stopping
ok - a head change between the verdict and the stop refuses the park and leaves the agent running
ok - an instruction or a new turn arriving after the preflight refuses the park before the agent is stopped
ok - park holds the inbox delivery lock across its final check and stop, refusing a newly delivered instruction without stopping the agent
ok - park leaves the task metadata lock available to fm-control exit
ok - a pending park stays watched during stop, promotes a later stop, and expires only after the stop bound
not ok - pending-hang: the tick did not save the lane it never reached
  • Outcome: ⚠️ 3 issues (1 warning, 2 infos) across 1 run (46m11s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed (2) ✅
  • ⚠️ .agents/skills/ship-landing/SKILL.md:27 - The conflict resolution keeps the fork's line "Before ordering cleanup for a task whose artifacts matter, firstmate runs bin/fm-archive-task.sh while the local copy still exists" next to upstream's new rule that the watcher owns teardown of a merged, poll-armed lane when that lane is parked (config/park-on-review) or the home has config/auto-land (lines 28-29). Failing sequence: (1) a home sets config/park-on-review. (2) A ship lane that has artifacts worth keeping is parked. (3) Its PR merges. (4) bin/fm-park.sh tick (bin/fm-park.sh:179, which runs the watcher sweep) calls bin/fm-teardown.sh &lt;id&gt;. (5) That call removes the worktree. Firstmate never orders that cleanup, so the archive step has no point to run, and the artifacts are lost. bin/fm-teardown.sh exports only records (fm-record-export.sh archive-task, line 532), not the worktree artifacts that bin/fm-archive-task.sh copies. Without either opt-in flag the merged text is correct. Possible fixes: (a) tell firstmate to archive before it parks a lane, or before it creates config/auto-land, (b) have the watcher-owned teardown path call the archive step, or (c) accept the gap. Option (b) adds behavior to the watcher beyond the refit, so that remedy needs the captain's authorization. The defect itself is a merge-integration gap, not a text conflict.

🔧 Fix applied.
2 warnings still open:

  • ⚠️ .agents/skills/ship-landing/SKILL.md:27 - The conflict resolution keeps the fork's line "Before ordering cleanup for a task whose artifacts matter, firstmate runs bin/fm-archive-task.sh while the local copy still exists" next to upstream's new rule that the watcher owns teardown of a merged, poll-armed lane when that lane is parked (config/park-on-review) or the home has config/auto-land (lines 28-29). Failing sequence: (1) a home sets config/park-on-review. (2) A ship lane that has artifacts worth keeping is parked. (3) Its PR merges. (4) bin/fm-park.sh tick (bin/fm-park.sh:179, which runs the watcher sweep) calls bin/fm-teardown.sh &lt;id&gt;. (5) That call removes the worktree. Firstmate never orders that cleanup, so the archive step has no point to run, and the artifacts are lost. bin/fm-teardown.sh exports only records (fm-record-export.sh archive-task, line 532), not the worktree artifacts that bin/fm-archive-task.sh copies. Without either opt-in flag the merged text is correct. Possible fixes: (a) tell firstmate to archive before it parks a lane, or before it creates config/auto-land, (b) have the watcher-owned teardown path call the archive step, or (c) accept the gap. Option (b) adds behavior to the watcher beyond the refit, so that remedy needs the captain's authorization. The defect itself is a merge-integration gap, not a text conflict.
  • ⚠️ .agents/skills/ship-landing/SKILL.md:28 - The round-1 fix line (added by the pipeline fixer in 7d7751a) has firstmate archive once, before the lane parks or before its PR can merge under config/auto-land. The lane can still change its .agent/tasks/&lt;id&gt; artifacts after that archive. Sequence A: (1) config/park-on-review is set. (2) Firstmate archives. (3) The lane parks. (4) Review activity makes bin/fm-park.sh resume a fresh worker, which updates the artifacts. (5) The lane re-parks and merges. (6) The watcher calls bin/fm-teardown.sh and removes the worktree. Sequence B: with config/auto-land set, the worker stays live after the archive and keeps working on review feedback until a human merges. In both sequences the archive holds the old snapshot and the newer artifacts are lost. A second plain bin/fm-archive-task.sh &lt;id&gt; run refuses because the destination already exists (bin/fm-archive-task.sh:69-71). The new line does not say to rerun with --force. Smallest fix, text only and inside the same seam: tell firstmate to rerun bin/fm-archive-task.sh &lt;id&gt; --force whenever the lane changes its artifacts again before the merge (for example after a resume from a park). This home sets neither flag today, so the gap is latent.

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

⚠️ **Test** - 3 issues (1 warning, 2 infos)
  • ℹ️ Host setup, not a merge issue. On this host ~/.local/bin/tasks-axi is a mise shim. Tests that set HOME to a throwaway dir make mise reject its config as untrusted, so the shim exits 1. fm-pr-merge, fm-captain-hold-lifecycle and fm-spawn-dispatch-profile fail locally for this reason, and the same failures happen on both parents. With the real binary on PATH, spawn-dispatch-profile and pr-merge pass fully. fm-captain-hold-lifecycle was not rerun that way, so its pass is not confirmed. Remote CI is not affected.
  • ℹ️ Host setup, not a merge issue. fm-bootstrap's herdr missing-CLI case cannot hide /usr/bin/herdr, because the test's BASE_PATH includes /usr/bin. fm-session-lock-ancestry expects orphans to reparent to pid 1, but the user systemd subreaper (pid 1180) adopts them on this host.
  • ⚠️ tests/fm-park.test.sh:577 - Upstream-owned failure that the merge brought in unchanged. bin/fm-park.sh and the test are byte-identical to upstream 427056c, and the case also fails there. With FM_PARK_TICK_SECS=2, parked lanes get a (2+1)/2 = 1 second budget, counted in whole seconds. On this host, tick setup uses up that budget before the first lane is visited, so the saved cursor is 'lane' and the test expects 'lane2'. Your rules say to report Firstmate failures to upstream instead of patching them in the fork. Decision needed: report this to kunchenguid/firstmate, or accept it as a local-only flake. Remote CI will show whether it fails there too.
  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Conflict-resolved ship-landing flow: firstmate archives a lane, a plain rerun refuses, --force refreshes after the lane changes its artifacts, and the archive survives worktree removal ✅ pass live archive-force-refresh.txt: the first archive gives v1. The plain rerun REFUSED with a --force hint. The --force rerun gives 'v2 notes after review'. After the worktree is removed, the script reports '…
Merged bin/fm-bootstrap.sh (changed on both sides) runs clean in a fresh lab home and reports RECORD_HYGIENE only when that opt-in flag is set ✅ pass live bootstrap-lab.txt: no output and exit 0 with default settings. With config/record-hygiene and a stale record, it prints 'RECORD_HYGIENE: metadata has no tab: ghost' and exits 0.
Real Claude session: Stop auto-arm (changed on both sides) reclaims a stale lock at session start, completes two tokenless rewake cycles, and records the Stop payload's own session id ✅ pass live claude-stop-autoarm-live-e2e.log: 'ok - Claude 2.1.325 ... live E2E ...' exit=0
Merged scripts changed on both sides (pr-merge, spawn, dod-lib, claude-stop-autoarm) and the main new upstream features (park, teardown, watcher lock, paused-wait recheck, contributions, inactive reco… ✅ pass live targeted-tests.log/json: dod-lib, claude-stop-autoarm, teardown, archive-task, watcher-lock, watch-triage-pause, contributions and inactive-reconcile exit 0. After rerunning with the real tasks-axi bi…
Adversarial check: every failing test was re-run on upstream 427056c and fork base a2647e8 to rule out a merge regression ✅ pass live failure-triage.txt. pr-merge and spawn-dispatch-profile fail on all three trees for the same reasons. fm-park pending-hang fails on the unmodified upstream copy, and bin/fm-park.sh is byte-identical t…
  • FM_HOME=$LAB bin/fm-archive-task.sh t1 then a plain rerun, then --force after an artifact change, then after git worktree remove (lab home from bin/fm-lab-home.sh create)
  • FM_HOME=$LAB bin/fm-bootstrap.sh in a fresh lab home, with and without config/record-hygiene plus a stale record
  • FM_CLAUDE_LIVE_E2E=1 bash tests/fm-claude-stop-autoarm-live-e2e.test.sh (real Claude 2.1.325)
  • bin/fm-test-run.sh --json targeted-tests.json tests/fm-pr-merge.test.sh tests/fm-bootstrap.test.sh tests/fm-claude-stop-autoarm.test.sh tests/fm-dod-lib.test.sh tests/fm-spawn-dispatch-profile.test.sh tests/fm-archive-task.test.sh tests/fm-park.test.sh tests/fm-teardown.test.sh tests/fm-captain-hold-lifecycle.test.sh tests/fm-watch-triage-pause.test.sh tests/fm-watcher-lock.test.sh tests/fm-contributions.test.sh tests/fm-inactive-reconcile.test.sh tests/fm-session-lock-ancestry.test.sh
  • tests/fm-pr-merge.test.sh and tests/fm-spawn-dispatch-profile.test.sh on HEAD, upstream 427056c4, and fork base a2647e82 (git archive copies)
  • PATH=&lt;mise node bin&gt;:$PATH bash tests/fm-spawn-dispatch-profile.test.sh / tests/fm-pr-merge.test.sh / tests/fm-park.test.sh on HEAD
  • tests/fm-park.test.sh on the upstream 427056c4 copy, plus an instrumented single-case run of test_hung_pending_check_ends_within_the_tick
  • HOME=$(mktemp -d) tasks-axi --version (mise trust failure) and an orphan-reparent probe (adopted by user systemd pid 1180)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

kunchenguid and others added 26 commits November 10, 2026 17:08
…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>
* feat(bootstrap): report orphan treehouse pools

* no-mistakes(review): Use Treehouse lease start for stale-slot age

* no-mistakes(review): Fix stale lease ages and duplicate-pool detection

* no-mistakes(ci): Fixed the report to inspect later slots, report duplicate pools once, and use slot-path modification time when lease timestamps are absent. Added a before/after file snapshot to the read-only behavior test; its pool root was already isolated under the test temp directory. `bash tests/fm-bootstrap.test.sh` passed (with noisy expected Git errors from non-repository fixture paths)

* no-mistakes(ci): Updated `bin/fm-bootstrap.sh` to use `treehouse-state.json` `created_at` for stale-slot age, skip missing or nonnumeric parsed epochs, and remove the filesystem-stat fallback. Added old- and missing-`created_at` fixtures in `tests/fm-bootstrap.test.sh`. The pool-report test passed; the full script exceeded the 120-second timeout later in the suite. Expected fixture Git errors were printed

* fix(bootstrap): parse offset pool timestamps

* no-mistakes(review): Preserve treehouse report field boundaries

* fix(bootstrap): recognize durable pool leases

* no-mistakes(review): Recognize durable lease IDs and holders as owned slots

* no-mistakes(review): Recognize durable leases and normalize duplicate pool identity

* no-mistakes(review): Skip empty pool records during orphan reporting

* no-mistakes(review): Skip empty worktrees and pathless slot records

* no-mistakes(test): Fixed pool-report test assertion; focused pool fixture passes

* perf(bootstrap): avoid repeated pool index parsing

* no-mistakes(document): Document read-only Treehouse pool report

* Declare pool report clock local

* no-mistakes(review): Remove Treehouse CLI prerequisite from pool report

* no-mistakes(document): Correct pool report prerequisites

* Identify duplicate Treehouse pools by origin

* no-mistakes(document): Document Treehouse pool reporting and age threshold

* no-mistakes(ci): Fixed the duplicate-pool report to print the local checkout path instead of the origin URL. Added a behavioral test with credentialed HTTPS origins; it passed. The bootstrap test suite timed out after 180 seconds during later tests; pool-report assertions passed

* test: remove unused bootstrap pool local

* no-mistakes(document): Clarify Treehouse pool report behavior

* feat(bin): make the Treehouse pool report opt-in via config/treehouse-pool-report
…d#8381)

* fix: recover stale real-directory lock records

* no-mistakes(review): Fix watch-lock identity checks across path aliases

* no-mistakes(document): Document lock recovery and refusal behavior

* no-mistakes(ci): Fixed the shared reaper to name stable inaccessible lock directories while keeping replacements retriable. Non-root permission, both session paths, recovery/race regressions, and pinned lint pass. Scratch files cleaned
…unchenguid#7376)

* fix(bin): keep home-summary collection inside its refresh deadline

A home of twelve scouts with long status histories repeatedly hit the
60-second home-summary refresh deadline while fm-fleet-snapshot.sh was
still collecting. After the bounded concurrent reads, every task row was
composed one task at a time, and each row re-folded that task's whole
append-only status history through status_open_decisions, which forked
four to five subshells per decision transition. Collection cost grew
with task count times history and had no concurrency of its own, so a
busy host pushed it past the whole-operation bound before validation or
publication.

Fold each task's status history inside its own observation worker while
its bounded current-state read is outstanding, and compose its row in
that same worker, so FM_SNAPSHOT_LOCAL_READ_CONCURRENCY now bounds the
whole per-task cost. Give the whole-file fold's per-line helpers the
optional out-variable form status_line_verb already uses, so the fold no
longer forks per line; every printed form is unchanged for other
callers.

The refresh deadline, per-child current-state bound, validation, atomic
last-good publication, and refresh lock are unchanged.

* no-mistakes(review): Describe batched snapshot workers and remaining history-growth cost

* no-mistakes(review): Rename per-task row temp file to avoid dotted-id collisions
…id#8304)

The runner-up floor check already treats a probability of 0.3 as
clearing a declared floor of 0.3. jq 1.6 prints the JSON literal 0.30
as 0.3, while jq 1.7 and 1.8 keep the trailing zero, so the assertion
failed only on that spelling. The canned probability is now 0.3, which
jq 1.6, 1.7, and 1.8 all print the same way.
…8383)

* fix(remote-job): pass USER and LOGNAME to the remote job child

* no-mistakes(document): Spresniť dokumentáciu prostredia pracovníka

* test(remote-job): run the identity-unset fixture in its own process for clean lint

* no-mistakes(document): Spresniť odkazy na kontrakt prostredia
Grok 1.0.77 titles the grok-4.7-build-fast composer
'Grok 4.7 Fast (medium) · always-approve'. The two-word model name
failed the typed-title check, so the idle composer read unknown and
fm-control exit and relaunch refused to type /exit.

Accept the single ' Fast' model word on the always-approve title only.
Pin the real styled Rex captures as fixtures.

Closes kunchenguid#8388
…nguid#8422)

* Settle declared captain holds from terminal PR evidence

Keep forge settlement opt-in and preserve unfinished work through an explicit release policy. Record merge or closure evidence without claiming a captain answer, and report unmerged closures through contribution notifications.

Fixes kunchenguid#8368

* no-mistakes(review): Defer away releases and scope closed PR reports

* no-mistakes(review): Ignore every structured link in PR hold fingerprint

* no-mistakes(review): Hold away-record lock across forge hold release

* no-mistakes(review): Defer forge release promptly on a busy away lock

* no-mistakes(document): List hold-pr-settle in layout and scripts docs

* no-mistakes(ci): Both selected Greptile findings are fixed in the worktree; nothing is committed. Invariants and sites: - ci-2: the contribution poll must never wait on a lock longer than the watcher's 30-second check bound. `settle-pr` takes two locks. The away-record lock was already bounded to 1 second. The task control lock was the only unbounded site, so `command_settle_pr` in bin/fm-captain-hold.sh now takes it with `fm_lock_acquire_wait_bounded ... 1` and returns 0 silently when busy. The policy file stays, so a later poll retries. The other callers of `acquire_task_control_lock` are captain or firstmate commands, not the poll, and are unchanged. - ci-3: a `closed` event and wake go only to a task that is an open captain hold at the moment the event is raised. `terminal_hold_event` in bin/fm-contributions.sh is the single place that raises it (the settled, final and live paths all call it). It now runs `fm-captain-hold.sh open <task>` after the cheap snapshot filter and before `write_record`, so only rows about to raise an event pay for the process. Tests added to tests/fm-contributions.test.sh: - `test_forge_settlement_defers_while_the_task_is_busy`: a held control lock makes the poll and a direct `settle-pr` return 0 with no output inside the bound, keep the policy and the hold, then settle once the lock is free. - `test_settled_task_gets_no_closed_event_for_its_other_pr`: one task with two closed PRs, the first settles the hold, the second raises no poll line, wake or `closed` event. I confirmed it fails without the bin/fm-contributions.sh fix (`not ok - the second closed PR woke a task settled in the same poll`) and passes with it. - The lock-holder fixture of the existing away-record-lock test became a shared `hold_lock` helper. docs/captain-hold-lifecycle.md gained one sentence on the busy-task deferral and an updated test list. Verification: `nice -n 10 bash bin/fm-test-run.sh tests/fm-contributions.test.sh` exited 0 (`FM_TEST_SUMMARY total=1 failed=0`, about 335 seconds). No other suite was run, as instructed. ci-1 (Full suite) remains a recorded CI override: it is only the full-ci label gate, no code or workflow was changed for it, and the hosted full suite did not pass. Not checked and risks: - The busy-lock test was not run against the old code, because the old unbounded wait would hang the test instead of failing it. - When a busy control lock defers settlement of a closed PR, the policy file remains, so that poll still raises the `closed` event and wake for the still-held task. That matches the existing away-deferral behaviour and was left unchanged. - Shellcheck was not run
@DereKk8
DereKk8 merged commit c79f2af into main Nov 15, 2026
63 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.