Skip to content

feat(bin): notify owned PR conflicts and failing required checks behind an opt-in flag - #7634

Merged
kunchenguid merged 8 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-7588-pr-health
Oct 22, 2026
Merged

kunchenguid merged 8 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-7588-pr-health

Conversation

@tiago-peixoto

@tiago-peixoto tiago-peixoto commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7588.

Notifications apply only when config/pr-health-monitor is set.

Live verification of the no-required-checks fallback

The fallback is restored to satisfy issue #7588 and match bin/fm-pr-state.sh.
When no reported check is required, reported failures count.
When a required check has reported, optional failures remain excluded.
All other review fixes and the contribution-observer arming call remain unchanged.

This read-only run used #7208 at latest commit 0648e4a371156b819b2c40e9b078c6cc6535e5f7.
GitHub returned 19 reported checks, zero required checks, a genuine FAILURE for PR must be raised via no-mistakes, and a CANCELLED serial test.
The same latest commit and check conditions were observed before and after the fix.
The test enrolled the public PR only in an isolated local home and ran the real monitor against GitHub.
No PR, check, branch, comment, or review was changed on GitHub.
A forwarding gh shim recorded the actual read requests and responses without replacing any forge result.

Before the fix, at 2026-10-22T13:53:11Z:

$ fm-pr-state.sh https://github.com/kunchenguid/firstmate/pull/7208
CHECKS: no required check has reported; readiness unconfirmed
REPORTED CHECK: Behavior portable serial 2 (CANCELLED)
REPORTED CHECK: PR must be raised via no-mistakes (FAILURE)

$ fm-pr-health.sh poll
Output bytes: 0

After restoring the fallback, at 2026-10-22T13:56:37Z:

$ fm-pr-health.sh poll
pr-health: https://github.com/kunchenguid/firstmate/pull/7208 has failing checks at latest commit 0648e4a: Behavior portable serial 2, PR must be raised via no-mistakes (task live-fallback)

$ fm-pr-health.sh poll
Output bytes: 0

The first poll now notifies about the reported failures, while an unchanged second poll stays silent.
The deterministic regressions also verify that a later failing required check at the same commit still notifies once.

Intent

Address #7588: owned pull requests raise no notification when required checks fail or a definite merge conflict appears after the ready report.
Firstmate should notify once per condition per latest commit when an owned PR has a failing required check or a definite conflict, treat unknown mergeability as neither clean nor conflicting, and only notify, never rebase or fix on its own.
The notification is opt-in: it stays off unless a home enables it, and the default behaviour is unchanged.
When the base branch requires no checks, a failing reported check still counts, as bin/fm-pr-state.sh already does for stacked pull requests.

What Changed

  • Add bin/fm-pr-health.sh (poll and arm), gated by the new local config/pr-health-monitor presence flag: it enrolls the PRs this home owns (recorded pr= values, durable contribution records, and the open PR on a live task copy's current branch), reads each open PR's REST mergeability and GraphQL check rollup, and prints one wake line per new condition - a definite conflict once per latest commit, and a failing required check once per latest commit and check name, where any failing reported check counts when no check is marked required and null mergeability is treated as neither clean nor conflicting. Fingerprints live in state/pr-health.json; bin/fm-bootstrap.sh arms the check at session start only when the flag is present, and the monitor never comments on or changes a PR.
  • Extend bin/fm-contributions.sh with read-only owned (JSON array of owned PR URLs with tasks and final state) and enroll (records a task's PR URL as an unobserved record, no-op when already recorded, refused when retired), and move the branch-to-PR lookup from bin/fm-teardown.sh into bin/fm-pr-lib.sh as fm_pr_number_from_branch so teardown and the health monitor share it.
  • Add tests/fm-pr-health.test.sh (registered in the pr-forge family in bin/fm-test-run.sh), extend tests/fm-bootstrap.test.sh for the flag-gated arming, and document the flag and script in docs/configuration.md, docs/scripts.md, docs/fm-test-isolation-proof.md, and the operational-home-layout skill.

Risk Assessment

✅ Low: The feature is opt-in and notify-only, the round-4 delta is a ten-line restoration of the fallback the intent requires with semantics identical to fm-pr-state.sh, every prior recorded fix (status-line exclusion, per-name dedupe, final-cache refresh, retirement refusal, unreadable-record pause) is still present and covered by behavior tests through the registered check, and the only open point is a human confirmation that the intent supersedes the round-3 removal decision.

Testing

Ran the focused monitor, PR-state and bootstrap test files (all passing), then drove the real monitor, the pre-fix script and the real watcher from disposable lab homes against real GitHub pull requests with a logging forwarding gh shim: the opt-in default, the no-required-checks fallback on PR 7208, once-per-commit dedupe, a definite conflict on PR 7612, one durable wake, and read-only forge access all behaved as intended, with transcripts, extracted GitHub observations and the fingerprint file saved as evidence. Bootstrap arming, required-check gating, UNKNOWN mergeability, retirement and unreadable-record behavior were not validated live and are reported as untested: they were exercised only through the existing fake-forge and bootstrap test suites because the repository has no required checks on main and GitHub's unknown mergeability cannot be held on demand.

  • Live validation: ✅ go - 7 of 11 scenarios driven live against the product
Scenario Result Live Evidence
With config/pr-health-monitor absent, poll prints nothing and reads nothing, and arm refuses, leaving state and data untouched ✅ pass live live/transcript.txt (flag absent section: poll exit 0 with no output, arm exit 1 with refusal message, 'gh calls so far: 0', 'state and data unchanged')
An owned PR whose base requires no checks and has failing reported checks raises one notification naming the failing checks at the latest commit ✅ pass live live/transcript.txt poll-1 line for PR 7208 at 0648e4a; live/observations.json shows all 19 contexts isRequired=false with two failing (FAILURE and CANCELLED)
The same failing checks at the same latest commit do not notify again on the next poll ✅ pass live live/transcript.txt poll-2 and poll-4 print nothing; before-after/transcript.txt third poll silent
The pre-fix monitor printed nothing for the same PR; the target commit prints the fallback line once (regression reproduced live) ✅ pass live before-after/transcript.txt
An owned PR with a definite merge conflict (REST mergeable=false) raises one conflict notification per latest commit and no repeat ✅ pass live live/transcript.txt poll-3 conflict line for PR 7612 at 4c60946, poll-4 silent; live/observations.json rest_mergeable=false
The watcher turns a new condition into exactly one durable wake and a second sweep raises none ✅ pass live watcher/transcript.txt: one pr-health row in state/.wake-queue, second run 'no actionable wake' exit 124
The monitor only reads the forge: every GitHub call is a REST GET of one PR or a GraphQL query, never a mutation, comment, or branch change ✅ pass live live/observations.json call_kinds and live/gh-calls.log (12 calls); live/responses/*.cmd
Bootstrap arms state/pr-health.check.sh only when config/pr-health-monitor exists ⏸️ untested no The prior run did not drive the real bootstrap against a live home with and without config/pr-health-monitor; it only ran tests/fm-bootstrap.test.sh (bootstrap-tests.log), which is a unit test and doe…
Once a required check has reported, an optional failure does not notify, while a required failure at an already reported commit still wakes once ⏸️ untested no Not driven live. kunchenguid/firstmate has no required status checks on main (the rules endpoint returns none and every live context reports isRequired=false), so no real PR with a required check exis…
Unknown mergeability (REST mergeable=null) is neither clean nor conflicting and never clears a reported conflict ⏸️ untested no Not driven live. GitHub returns null mergeability only transiently while it recomputes, which cannot be held on demand without pushing to a real PR; the live PR 7612 reached the monitor already comput…
A retired contribution is not re-owned by cached or fresh branch discovery, and an unreadable contribution record pauses the monitor once without dropping fingerprints ⏸️ untested no Not driven live. Branch discovery needs a live task copy whose branch has an open PR in this account's repository, which the prior run did not set up. Only the fake-forge cases in tests/fm-pr-health.t…
Evidence: Evidence index

Source: Evidence index

# Test-step evidence for fm/upstream-7588-pr-health (target a986889b)

All live runs used a disposable lab home made by bin/fm-lab-home.sh under /tmp and removed afterwards.
GitHub was only read: every forwarded gh call was a REST GET of one pull request or a GraphQL query (live/observations.json, live/responses/*.cmd).
No PR, branch, check, review or comment was changed.

- live/transcript.txt: flag absent (poll silent, arm refuses, zero gh calls, state untouched); flag on + enroll PR 7208 (19 reported contexts, none required, two failing) -> one "has failing checks" line, second poll silent; enroll conflicting PR 7612 -> one conflict line, PR 7208 silent, next poll silent.
- live/observations.json: latest commit, isRequired values, failing contexts and mergeable per PR, extracted from the logged real GitHub responses.
- live/pr-health-after-7612.json: the fingerprint file after the runs.
- before-after/transcript.txt: the pre-fix script (3bc134e6) polling PR 7208 prints nothing; the target script in the same home then prints the fallback line once.
- watcher/transcript.txt: the real watcher (fm-watch-checkpoint.sh) turns the conflict on PR 7612 into one wake-queue row; a second run finds no new wake.
- focused-tests.log: bin/fm-test-run.sh tests/fm-pr-health.test.sh tests/fm-pr-state.test.sh (fake forge, all 23 monitor cases).
- bootstrap-tests.log: bin/fm-test-run.sh tests/fm-bootstrap.test.sh (bootstrap arms the monitor only with the flag).
Evidence: Live monitor transcript (flag off, fallback on PR 7208, conflict on PR 7612)

Source: Live monitor transcript (flag off, fallback on PR 7208, conflict on PR 7612)

$ bash state/pr-health.check.sh pr-health: #7208 has failing checks at latest commit 0648e4a: Behavior portable serial 2, PR must be raised via no-mistakes (task ship1) [exit 0] $ bash state/pr-health.check.sh [exit 0] $ fm-contributions.sh enroll conflict1 #7612 bash state/pr-health.check.sh pr-health: #7612 conflicts with its base at latest commit 4c60946 (task conflict1) [exit 0] $ bash state/pr-health.check.sh [exit 0]

started 2026-10-22T15:21:45Z
== Scenario: flag absent (default off) ==

$ ~/.no-mistakes/worktrees/5284051b2355/01M5J2MS3JJ7PRQ8D02NK7JSS2/bin/fm-pr-health.sh poll
[exit 0]

$ ~/.no-mistakes/worktrees/5284051b2355/01M5J2MS3JJ7PRQ8D02NK7JSS2/bin/fm-pr-health.sh arm
stderr: fm-pr-health: config/pr-health-monitor is absent; the PR health monitor stays off
[exit 1]
gh calls so far: 0
state and data unchanged
== Scenario: opt in, enroll PR with failing reported checks and no required contexts ==

$ touch /tmp/fm-lab.wf712R/config/pr-health-monitor
[exit 0]

$ ~/.no-mistakes/worktrees/5284051b2355/01M5J2MS3JJ7PRQ8D02NK7JSS2/bin/fm-contributions.sh enroll ship1 https://github.com/kunchenguid/firstmate/pull/7208
[exit 0]

$ ~/.no-mistakes/worktrees/5284051b2355/01M5J2MS3JJ7PRQ8D02NK7JSS2/bin/fm-pr-health.sh arm
registered: state/pr-health.check.sh
[exit 0]
contributions.check-trust
contributions.check.sh
pr-health.check-trust
pr-health.check.sh

$ bash /tmp/fm-lab.wf712R/state/pr-health.check.sh
pr-health: https://github.com/kunchenguid/firstmate/pull/7208 has failing checks at latest commit 0648e4a: Behavior portable serial 2, PR must be raised via no-mistakes (task ship1)
[exit 0]

$ bash /tmp/fm-lab.wf712R/state/pr-health.check.sh
[exit 0]
== Scenario: enroll a PR with a definite conflict ==

$ ~/.no-mistakes/worktrees/5284051b2355/01M5J2MS3JJ7PRQ8D02NK7JSS2/bin/fm-contributions.sh enroll conflict1 https://github.com/kunchenguid/firstmate/pull/7612
[exit 0]

$ bash /tmp/fm-lab.wf712R/state/pr-health.check.sh
pr-health: https://github.com/kunchenguid/firstmate/pull/7612 conflicts with its base at latest commit 4c60946 (task conflict1)
[exit 0]

$ bash /tmp/fm-lab.wf712R/state/pr-health.check.sh
[exit 0]
finished 2026-10-22T15:21:52Z
== gh calls ==
api repos/kunchenguid/firstmate/pulls/7208 api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F numb

api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F number=7208 -f query=query($owner:String!,$repo

api repos/kunchenguid/firstmate/pulls/7208 
api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F number=7208 -f query=query($owner:String!,$repo
api repos/kunchenguid/firstmate/pulls/7612 
api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F number=7612 -f query=query($owner:String!,$repo
api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F number=7208 -f query=query($owner:String!,$repo

api repos/kunchenguid/firstmate/pulls/7612 
api graphql --paginate --slurp -F owner=kunchenguid -F repo=firstmate -F number=7612 -f query=query($owner:String!,$repo
== tmux calls (expect none) ==
Evidence: Real GitHub observations extracted from logged responses

Source: Real GitHub observations extracted from logged responses

pr7208: head 0648e4a371156b819b2c40e9b078c6cc6535e5f7, 19 contexts, isRequired values [False], failing: PR must be raised via no-mistakes (FAILURE), Behavior portable serial 2 (CANCELLED), mergeable true pr7612: head 4c60946a388715d1cfb0a65865f4c2193b0ca0c1, mergeable false, 21 contexts, none required, none failing call kinds: GraphQL query, REST GET single PR (12 calls, no mutations)

{
 "calls": [
  {
   "kind": "GraphQL query",
   "pr": "7208"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7208"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7208"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7612"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7208"
  },
  {
   "kind": "GraphQL query",
   "pr": "7208"
  },
  {
   "kind": "GraphQL query",
   "pr": "7208"
  },
  {
   "kind": "GraphQL query",
   "pr": "7208"
  },
  {
   "kind": "GraphQL query",
   "pr": "7612"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7208"
  },
  {
   "kind": "GraphQL query",
   "pr": "7612"
  },
  {
   "kind": "REST GET single PR",
   "pr": "7612"
  }
 ],
 "pr7208": {
  "gql_head": "0648e4a371156b819b2c40e9b078c6cc6535e5f7",
  "contexts": 19,
  "isRequired_values": [
   "False"
  ],
  "failing": [
   {
    "name": "PR must be raised via no-mistakes",
    "conclusion": "FAILURE",
    "startedAt": "2026-10-22T02:22:08Z"
   },
   {
    "name": "Behavior portable serial 2",
    "conclusion": "CANCELLED",
    "startedAt": "2026-10-22T03:06:13Z"
   }
  ],
  "rest_state": "open",
  "rest_merged_at": null,
  "rest_mergeable": true,
  "rest_head": "0648e4a371156b819b2c40e9b078c6cc6535e5f7"
 },
 "pr7612": {
  "rest_state": "open",
  "rest_merged_at": null,
  "rest_mergeable": false,
  "rest_head": "4c60946a388715d1cfb0a65865f4c2193b0ca0c1",
  "gql_head": "4c60946a388715d1cfb0a65865f4c2193b0ca0c1",
  "contexts": 21,
  "isRequired_values": [
   "False"
  ],
  "failing": []
 },
 "call_kinds": [
  "GraphQL query",
  "REST GET single PR"
 ]
}
Evidence: Live before/after: pre-fix script silent, target script notifies once

Source: Live before/after: pre-fix script silent, target script notifies once

$ [pre-fix 3bc134e6] fm-pr-health.sh poll [exit 0] $ [target a986889b] bin/fm-pr-health.sh poll pr-health: #7208 has failing checks at latest commit 0648e4a: Behavior portable serial 2, PR must be raised via no-mistakes (task ship1) [exit 0] $ [target a986889b] bin/fm-pr-health.sh poll (again, expect silence) [exit 0]

pre-fix script: 3bc134e6 no-mistakes(review): refuse retired re-enrollment, require marked checks, verify owned records
<       | ([$ctx[] | select(.required and .failing) | .name] | unique) as $failing
>       | any($ctx[]; .required) as $has_required
>       | ([$ctx[] | select(.failing and (.required or ($has_required | not))) | .name] | unique) as $failing
<             | "pr-health: \($url) has failing required checks \($where): \($new_failing[:3] | join(", "))\(if ($new_failing | length) > 3 then " and \(($new_failing | length) - 3) more" else "" end) (task \($owners))")])}
>             | "pr-health: \($url) has failing \(if $has_required then "required " else "" end)checks \($where): \($new_failing[:3] | join(", "))\(if ($new_failing | length) > 3 then " and \(($new_failing | length) - 3) more" else "" end) (task \($owners))")])}

$ [pre-fix 3bc134e6] fm-pr-health.sh poll  (same lab home, PR 7208 enrolled, flag on)
[exit 0]
state/pr-health.json after pre-fix poll:
{
  "schema": "fm-pr-health.v1",
  "prs": {
    "https://github.com/kunchenguid/firstmate/pull/7208": {
      "conflicts": [],
      "checks": []
    }
  },
  "branches": {},
  "ownership_error": false
}

$ [target a986889b] bin/fm-pr-health.sh poll  (same home, same fingerprint file)
pr-health: https://github.com/kunchenguid/firstmate/pull/7208 has failing checks at latest commit 0648e4a: Behavior portable serial 2, PR must be raised via no-mistakes (task ship1)
[exit 0]
$ [target a986889b] bin/fm-pr-health.sh poll  (again, expect silence)
[exit 0]
captured 2026-10-22T15:22:58Z
Evidence: Real watcher turns the live conflict into one wake-queue row

Source: Real watcher turns the live conflict into one wake-queue row

started 2026-10-22T15:23:14Z
$ fm-contributions.sh enroll conflict1 https://github.com/kunchenguid/firstmate/pull/7612
[exit 0]
$ fm-pr-health.sh arm
registered: state/pr-health.check.sh
[exit 0]
$ FM_POLL=1 FM_SIGNAL_GRACE=0 FM_CHECK_INTERVAL=0 FM_HEARTBEAT=999999 fm-watch-checkpoint.sh --seconds 20
check: /tmp/fm-lab.H49vqo/state/pr-health.check.sh: pr-health: https://github.com/kunchenguid/firstmate/pull/7612 conflicts with its base at latest commit 4c60946 (task conflict1)
[exit 0]
state/.wake-queue rows:
1792682598	1	check	contribution-8099a3da003185826467257c0ae2fd4ccd5a2b1054989bb4d971fc078da371d7	check: contributions conflict1 8099a3da003185826467257c0ae2fd4ccd5a2b1054989bb4d971fc078da371d7
1792682598	2	check	contribution-ab0447e4990618966c9eb8d9b00be22f3d776493a9fc692f002b3b89e1e713ad	check: contributions conflict1 ab0447e4990618966c9eb8d9b00be22f3d776493a9fc692f002b3b89e1e713ad
1792682599	3	check	/tmp/fm-lab.H49vqo/state/pr-health.check.sh	check: /tmp/fm-lab.H49vqo/state/pr-health.check.sh: pr-health: https://github.com/kunchenguid/firstmate/pull/7612 conflicts with its base at latest commit 4c60946 (task conflict1)
$ second watcher run with the same state (expect timeout 124: no new wake)
checkpoint: no actionable wake within 8s
[exit 124]
tmux calls:
finished 2026-10-22T15:23:28Z
Evidence: Fingerprint file after the live runs

Source: Fingerprint file after the live runs

{
  "schema": "fm-pr-health.v1",
  "prs": {
    "https://github.com/kunchenguid/firstmate/pull/7208": {
      "conflicts": [],
      "checks": [
        {
          "head": "0648e4a371156b819b2c40e9b078c6cc6535e5f7",
          "name": "Behavior portable serial 2"
        },
        {
          "head": "0648e4a371156b819b2c40e9b078c6cc6535e5f7",
          "name": "PR must be raised via no-mistakes"
        }
      ]
    },
    "https://github.com/kunchenguid/firstmate/pull/7612": {
      "conflicts": [
        "4c60946a388715d1cfb0a65865f4c2193b0ca0c1"
      ],
      "checks": []
    }
  },
  "branches": {},
  "ownership_error": false
}
Evidence: Focused test run (fm-pr-health, fm-pr-state)

Source: Focused test run (fm-pr-health, fm-pr-state)

FM_TEST_BEGIN 2026-10-22T15:19:30Z tests/fm-pr-health.test.sh family=pr-forge expected_gate_skip=none
FM_TEST_BEGIN 2026-10-22T15:19:30Z tests/fm-pr-state.test.sh family=pr-forge expected_gate_skip=none
ok - a passing required check and a skipped one leave nothing to report
ok - a terminal pull request reports that state and nothing else
ok - draft state blocks readiness
ok - stale changes-requested verdicts explain a blocking review decision
ok - approved PR ignores stale changes-requested history
ok - current changes-requested review blocks readiness
ok - a CHANGES_REQUESTED decision is always reported
ok - the author's own review is never listed as a blocker
ok - a pending approval is not reported as a blocker
ok - required failure blocks readiness
ok - given gh's sentence, an unreported required check is unconfirmed, other check lookup failures refuse
ok - given gh's sentence, a head with no reported checks is unverified rather than ready
ok - a failing reported check is shown when the base has no required checks
ok - a pending reported check is shown when the base has no required checks, and a failed fallback read refuses
ok - a protected base reports only required checks
ok - help states what empty output means and what is out of scope
ok - unknown and conflicting mergeability block readiness
ok - argument and lookup refusals exit nonzero
FM_TEST_END 2026-10-22T15:19:31Z tests/fm-pr-state.test.sh exit=0 duration_ms=873 gate_skip=false
ok - UNKNOWN then DIRTY wakes once
ok - DIRTY seen again at the same commits wakes nothing
ok - a conflict notifies once per latest commit despite recovery or base movement
ok - each required check that fails on an adopted draft wakes once per latest commit
ok - a fallback notification does not hide a later required failure at the same commit
ok - each check is judged by its newest run
ok - a latest commit that moves between the two reads waits for the next pass
ok - a red check on another home's PR wakes nothing in this home
ok - a PR enrolled before any ready report, and one kept after cleanup, both still wake
ok - an open PR that replaces a closed one on the same task branch is discovered
ok - a green PR without a reviewer never notifies
ok - a base with no required checks counts a failing reported check
ok - a retired contribution is not reclaimed through the cached branch lookup
ok - a retired contribution is not reclaimed by a fresh branch lookup
ok - an unreadable durable record pauses the monitor once and keeps its fingerprints
ok - nothing prints while nothing changed
ok - a merged PR leaves the monitor
ok - an absent flag leaves the home untouched
ok - the watcher turns one conflict into one durable wake
ok - check notifications survive cleanup and repeat only at a new latest commit
ok - all owned PR reads start in one wave without rotating a backlog
ok - all check pages contribute to required-check classification
ok - GitLab ownership and branch discovery make no GitHub reads
FM_TEST_END 2026-10-22T15:20:24Z tests/fm-pr-health.test.sh exit=0 duration_ms=54403 gate_skip=false
FM_TEST_SUMMARY total=2 failed=0 skipped_gate=0 duration_ms=54625
FM_TEST_SUMMARY_FAMILY family=pr-forge count=2 duration_ms=55276 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-pr-health.test.sh duration_ms=54403
FM_TEST_SLOWEST rank=2 script=tests/fm-pr-state.test.sh duration_ms=873
exit=0
Evidence: Bootstrap test run

Source: Bootstrap test run

FM_TEST_BEGIN 2026-10-22T15:22:15Z tests/fm-bootstrap.test.sh family=session-bootstrap expected_gate_skip=none
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ok - bootstrap reports treehouse lease + tasks-axi/quota-axi bootstrap contracts
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ok - bootstrap enforces no-mistakes minimum version
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ok - bootstrap enforces gh-axi minimum version
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS

... [25212 bytes truncated] ...

atal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ok - bootstrap gates resolver fields and additive harnesses on the typed key
FM_TEST_END 2026-10-22T15:23:44Z tests/fm-bootstrap.test.sh exit=0 duration_ms=89031 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=89128
FM_TEST_SUMMARY_FAMILY family=session-bootstrap count=1 duration_ms=89031 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-bootstrap.test.sh duration_ms=89031
exit=0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ bin/fm-pr-health.sh:146 - Commit a986889 restores the no-required-checks fallback ($has_required at bin/fm-pr-health.sh:145-146, the unlabelled "has failing checks" wording at :158, docs/configuration.md:632-633, and the two tests at tests/fm-pr-health.test.sh:227-243 and :385-401) that the round-3 recorded decision any-failing-check-fallback-beyond-intent asked to remove and that commit 3bc134e removed. The current user intent explicitly requires it ("When the base branch requires no checks, a failing reported check still counts, as bin/fm-pr-state.sh already does for stacked pull requests"), the issue text says "At least these changes count", and the commit is the author's own later act, so I treat the intent as the later human decision and did not change the code. The implementation matches fm-pr-state.sh's rule exactly: the fallback applies when no reported context is marked required, and once any required context has reported, optional failures are ignored; dedupe per latest commit and check name is unchanged, and a required failure appearing after a fallback notification at the same commit still wakes (traced through the optional-then-required test sequence). This finding only asks the supervisor to confirm the reversal of the round-3 decision; no code change is recommended.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 11 scenarios driven live against the product
Scenario Result Live Evidence
With config/pr-health-monitor absent, poll prints nothing and reads nothing, and arm refuses, leaving state and data untouched ✅ pass live live/transcript.txt (flag absent section: poll exit 0 with no output, arm exit 1 with refusal message, 'gh calls so far: 0', 'state and data unchanged')
An owned PR whose base requires no checks and has failing reported checks raises one notification naming the failing checks at the latest commit ✅ pass live live/transcript.txt poll-1 line for PR 7208 at 0648e4a; live/observations.json shows all 19 contexts isRequired=false with two failing (FAILURE and CANCELLED)
The same failing checks at the same latest commit do not notify again on the next poll ✅ pass live live/transcript.txt poll-2 and poll-4 print nothing; before-after/transcript.txt third poll silent
The pre-fix monitor printed nothing for the same PR; the target commit prints the fallback line once (regression reproduced live) ✅ pass live before-after/transcript.txt
An owned PR with a definite merge conflict (REST mergeable=false) raises one conflict notification per latest commit and no repeat ✅ pass live live/transcript.txt poll-3 conflict line for PR 7612 at 4c60946, poll-4 silent; live/observations.json rest_mergeable=false
The watcher turns a new condition into exactly one durable wake and a second sweep raises none ✅ pass live watcher/transcript.txt: one pr-health row in state/.wake-queue, second run 'no actionable wake' exit 124
The monitor only reads the forge: every GitHub call is a REST GET of one PR or a GraphQL query, never a mutation, comment, or branch change ✅ pass live live/observations.json call_kinds and live/gh-calls.log (12 calls); live/responses/*.cmd
Bootstrap arms state/pr-health.check.sh only when config/pr-health-monitor exists ⏸️ untested no The prior run did not drive the real bootstrap against a live home with and without config/pr-health-monitor; it only ran tests/fm-bootstrap.test.sh (bootstrap-tests.log), which is a unit test and doe…
Once a required check has reported, an optional failure does not notify, while a required failure at an already reported commit still wakes once ⏸️ untested no Not driven live. kunchenguid/firstmate has no required status checks on main (the rules endpoint returns none and every live context reports isRequired=false), so no real PR with a required check exis…
Unknown mergeability (REST mergeable=null) is neither clean nor conflicting and never clears a reported conflict ⏸️ untested no Not driven live. GitHub returns null mergeability only transiently while it recomputes, which cannot be held on demand without pushing to a real PR; the live PR 7612 reached the monitor already comput…
A retired contribution is not re-owned by cached or fresh branch discovery, and an unreadable contribution record pauses the monitor once without dropping fingerprints ⏸️ untested no Not driven live. Branch discovery needs a live task copy whose branch has an open PR in this account's repository, which the prior run did not set up. Only the fake-forge cases in tests/fm-pr-health.t…
  • MISE_TRUSTED_CONFIG_PATHS=~ MISE_DATA_DIR=~/.local/share/mise bin/fm-test-run.sh tests/fm-pr-health.test.sh tests/fm-pr-state.test.sh (total=2 failed=0)
  • MISE_TRUSTED_CONFIG_PATHS=~ MISE_DATA_DIR=~/.local/share/mise bin/fm-test-run.sh tests/fm-bootstrap.test.sh (total=1 failed=0, includes test_pr_health_monitor_arms_only_with_its_flag)
  • Live lab home (bin/fm-lab-home.sh create) with a forwarding gh shim that logs every call and response: bin/fm-pr-health.sh poll and arm with config/pr-health-monitor absent -> silent, arm refused, zero gh calls, state/data unchanged
  • Live: bin/fm-contributions.sh enroll ship1 https://github.com/kunchenguid/firstmate/pull/7208, bin/fm-pr-health.sh arm, then bash state/pr-health.check.sh twice -> one fallback line naming both failing reported checks at 0648e4a, then silence
  • Live: bin/fm-contributions.sh enroll conflict1 https://github.com/kunchenguid/firstmate/pull/7612 then two polls -> one conflict line at 4c60946, PR 7208 silent, then silence
  • Live before/after: pre-fix git show 3bc134e6:bin/fm-pr-health.sh poll on PR 7208 printed nothing; target script poll in the same home printed the fallback line once, third poll silent
  • Live: FM_POLL=1 FM_SIGNAL_GRACE=0 FM_CHECK_INTERVAL=0 FM_HEARTBEAT=999999 bin/fm-watch-checkpoint.sh --seconds 20 in a lab home with PR 7612 enrolled -> one pr-health wake-queue row; rerun with FM_WATCH_HANDLING_SUCCESSOR=1 exits 124 with no new wake
  • Verified from logged real responses (live/observations.json): all 12 gh calls are REST GET single-PR or GraphQL query reads; isRequired=false for all 19 contexts on PR 7208 and all 21 on PR 7612; GraphQL headRefOid equals REST head.sha
  • Read-only GitHub probes: gh api repos/kunchenguid/firstmate/rules/branches/main returns no required_status_checks rule, so no real PR with a required check exists in this repository for a live required-check scenario
⚠️ **Document** - 1 info
  • ℹ️ docs/fm-test-isolation-proof.md:164 - tests/fm-pr-health.test.sh joined the pr-forge family in bin/fm-test-run.sh, and script_allows_concurrency grants concurrency by family membership alone, so the new script runs concurrently with the other eight members without an isolation proof covering it. The doc now states that the 2026-09-12 result does not cover it, matching how the two earlier late joiners were handled. A follow-up could re-run bin/fm-test-isolation-proof.sh --pool pr-forge --jobs 4 at nine members on an idle host and record the result; that is a verification run, not a documentation edit, so it is out of this phase's scope.
✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @tiago-peixoto. This is a careful piece of work: the monitor is read-only, it stays fully off unless config/pr-health-monitor exists, and the live forge transcripts make the conflict and ownership paths easy to trust.

What I checked (head 2cefd90e against main 9fe25bca):

  • Opt-in holds. With the flag absent, poll exits before any read or write, arm refuses, and bootstrap arms nothing. The other default-path edits are a behavior-neutral move of the branch-to-PR lookup into fm_pr_number_from_branch (teardown still calls it with --state all inside the task copy) and two new fm-contributions.sh subcommands (owned, enroll) that nothing calls unless the monitor runs. The brief waiting-rule change the review flagged isn't in the diff anymore.
  • Security: clean. Forge calls are REST GETs and GraphQL queries only. There are no .github changes, and no secrets or new network endpoints.
  • The attestation matches 2cefd90e, and PR must be raised via no-mistakes passes. CI is green except Behavior portable serial 2, which was cancelled at the 30-minute cap (fix(pi): keep the Pi watcher armed after a successor or arm child dies #7255). I've re-run that job.

Contract-class: opt-in (my own read). VISION.md per rule: One captain aligns (one wake per condition, nothing while unchanged) · Authority aligns (notify only, never rebases or fixes, off unless enabled) · Scripts aligns (deterministic fingerprints in a script) · Restart aligns (fingerprints and enrolment are durable) · Delegation aligns · Vendor aligns (GitHub-exposed isRequired/mergeable semantics) · Scope aligns (field issue #7588).

One thing I need from you before this can land (waiting on you):
The PR says Fixes #7588, but it deliberately drops one of that issue's quality criteria: "When the base branch requires no checks, a failing reported check still counts, as bin/fm-pr-state.sh already does for stacked pull requests." The tip only counts contexts with isRequired == true (bin/fm-pr-health.sh ~L149), and docs/configuration.md now says a non-required check never counts "even when the base requires no check at all". On a repo with no required checks (this one included), a red PR would never wake. Could you pick one?

  1. Restore the no-required-checks fallback that Owned pull requests raise no notification when required checks fail or a merge conflict appears after the ready report #7588 asks for. A nice side effect: the failing-check path becomes live-testable right here, since this repo requires no checks. Please drive that scenario live and post the evidence, or re-raise through git push no-mistakes so it's captured.
  2. Keep the narrower rule, but change Fixes #7588 to Refs #7588 and say in the body which criterion is left open, so the issue stays open for it.

The remaining review note, that arm always arms the contribution observer, sits inside the opt-in path. It's fine to leave as is, or trim if you agree with it. No rush, and thanks again.

@tiago-peixoto
tiago-peixoto force-pushed the fm/upstream-7588-pr-health branch from 2cefd90 to b0115bc Compare October 22, 2026 15:30
@tiago-peixoto tiago-peixoto changed the title feat(bin): notify owned PR health changes behind an opt-in flag feat(bin): notify owned PR conflicts and failing required checks behind an opt-in flag Oct 22, 2026
@kunchenguid
kunchenguid merged commit c79cd40 into kunchenguid:main Oct 22, 2026
21 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

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

You picked option 1: the no-required-checks fallback is back, matching fm-pr-state.sh, and you drove it live against a real PR, including the before/after regression. With that, #7588 is fully covered. The monitor stays off unless config/pr-health-monitor exists.

roderik added a commit to roderik/firstmate-rex that referenced this pull request Oct 23, 2026
…ex integrations (#11)

* feat: add auto-detected Rex session backend (kunchenguid#7633)

* feat(bin): add Rex as an auto-detected session backend

Add bin/backends/rex.sh, a session-provider adapter for the Rex terminal
multiplexer, and wire it through the dispatcher, spawn, control plane,
crew state, busy evidence, and away-mode supervision.

- Auto-detect Rex from TERM_PROGRAM=rex with REX_BLOCK, after tmux and
  Herdr and before cmux; explicit --backend, FM_BACKEND, and
  config/backend still win, and a nested tmux or Herdr is never read
  as Rex.
- One focus-safe tab per task: in Firstmate's own Rex session when it
  runs directly inside Rex (confirmed against the server), otherwise in
  one session per home; new blocks are resized to 200x50; every call
  names its session and block by immutable id.
- Recovery-grade agent state from Rex's process view, OSC 7501 program
  status as positive busy evidence only while its owner is in the
  foreground chain, and a viewport derived from the last size.rows rows
  of the styled capture.
- Absence proof from a structured not-found on the recorded server
  (rex_server), so fm-control exit and relaunch work on Rex and a gone
  block is reclaimed into a fresh tab in its recorded session.
- Away mode for a Rex-hosted primary runs its daemon in a dedicated Rex
  session killed by exact id.
- Docs: docs/rex-backend.md, configuration and control-plane tables,
  and a dated live verification record; tests: a stateful fake-CLI
  suite, a real-server smoke test guarded to its own fm-test- session,
  and a Rex away-launcher e2e.

* no-mistakes(review): Recover Rex reclaim after server stops; document deferred asks

* no-mistakes(document): Correct Rex documentation and consolidate stale backend guidance

* fix(bin): guard the wedge cap-fire counter reset with the cap-state rollback (kunchenguid#7625)

* no-mistakes(review): wedge cap: guard the cap-fire counter reset with rollback

* no-mistakes(document): docs: repair shard-pack wording and wedge-cap marker shorthand

* no-mistakes(review): docs: correct away-release terminal-row bound claim

* no-mistakes(document): docs: cover third guarded cap-state write in watcher comment

* no-mistakes(ci): Reweighted the packing hint for tests/fm-supervision-host.test.sh from the local 789123 ms to 1192918 ms, the one completed successful CI sample (run 39642852135, job 119276758966), and let the LPT packer rebalance. The guard was not weakened (PORTABLE_SERIAL_MAX_WEIGHT_MS=1200000, PORTABLE_SERIAL_SHARDS=9, coverage guard and packing-boundary check untouched) and nothing was hand-placed. New packed hint sums of the 9 serial shards (ms): 1=1192918 (1 script), 2=1139923 (18), 3=1139903 (30), 4=1139922 (30), 5=1139917 (30), 6=1139886 (29), 7=1139891 (30), 8=1139880 (29), 9=1139911 (31). Total 228 scripts = the serial lane exactly; max 1192918 < 1200000, so it fits. Packing guard: bin/fm-test-run.sh --check-coverage -> FM_TEST_COVERAGE ok total=268 parallel=24 parallel_max_ms=665545 parallel_imbalance_ms=2 parallel_unhinted=0 serial=228 serial_shards=9 serial_unhinted=15 serial_max_ms=1192918 serial_budget_ms=1200000 herdr=16, exit 0. tests/fm-test-run.test.sh passes both packing contracts: 'coverage guard bounds the unmeasured share and serial packing within twenty minutes' and 'serial packing accepts the exact budget and refuses one millisecond above it'. bin/fm-doc-audience-check.sh ok (surfaces=124 local_links=851). docs/fm-test-portable-shards.md now states the same 1192918 ms for that script, citing run 39642852135 (documented duration == packed weight), and adds the required honesty note in the same paragraph style: run 39765114423 cancelled this script alone in a shard at the 30-minute job cap and upstream run 39618934309 hangs identically, so the weight is a fit to the 20-minute packing target, not a cure, and the underlying slowness is an upstream defect this branch does not own. No other file, weight, test or doc line touched. Unrelated pre-existing failure, verified by git stash at base commit 5af4072: tests/fm-session-lock-ancestry.test.sh asserts 'the pty-host was not reparented to init after the daemon ended' and fails identically on the unmodified tree (sandbox pty behaviour); the --jobs family-admission assertion in the same suite fails only because of it. Not caused by this change

* fix(bin): restore watcher downtime before main-only hand-back (kunchenguid#6588)

* fix(bin): restore inherited handling before main-only hand-back

* Restored downtime so an earlier engine turn could not suppress a later
  main-owned close while leaving a healthy successor behind
* Routed restoration failures through the existing Stop-hook alarm
  instead of silently discarding the hand-back
* Added host-and-hook regressions plus attended and away idle-return
  controls to separate missing monitoring from status classification

* no-mistakes(test): Assert ordered stale event in returned-driver controls

* no-mistakes(document): Document main-only hand-back downtime restoration and failure

* no-mistakes(document): Correct host header on main-only downtime republish

* test(herdr): bound the piped composer probe with fm_run_timed instead of GNU timeout (kunchenguid#7636)

* feat: add Rex push notifications and cursor-aware composer detection (kunchenguid#7639)

* feat(rex): push blocked edges from Rex program status through a bounded Lua reader

Rex joins Herdr as a push-capable backend: a bounded rex do reader streams
program_status_changed, child_exited, and block_closed for the watched task
blocks, and a trusted blocked edge wakes the supervisor with Rex's blocked
kind and message in the reason. The per-pane dedupe moves into the shared
transition lib, the record gains a detail field, and gone edges end the wait
for an immediate poll. The real-Rex test isolation is shared by both smokes.

* fix(rex): anchor the composer read on Rex's cursor position

Rex's format method reports the cursor alongside the styled grid, so the
composer verdict now uses the same cursor-anchored read as tmux and falls
back to the cursorless read only where that is unknown. OpenCode 1.19 draws
a status line below its composer, which made every cursorless read of an
idle OpenCode worker on Rex unknown and refused steers, exit, and relaunch.

* test(rex): add a live composer guard for every installed harness on Rex

* docs(rex): record push-event and per-tool live evidence on Rex

* no-mistakes(document): Clarify Rex documentation and shared transition ownership

* no-mistakes(ci): Fixed flaky public-followup fixture teardown: killing only the remote worker child allowed its supervisor to restart and race directory removal. Cleanup now uses the existing whole-worker-tree stop helper. Verified the full public-followup suite, remote-job orphan-reap suite, shell syntax, and git diff checks all pass

* feat(bin): notify owned PR conflicts and failing required checks behind an opt-in flag (kunchenguid#7634)

* refactor(bin): share the branch-to-PR lookup through fm-pr-lib

* feat(bin): notify owned PR health changes behind an opt-in flag

* no-mistakes(review): drop status-line ownership, key checks per name, remove PR wait rule

* no-mistakes(review): rediscover the branch PR once the cached one is final

* no-mistakes(review): refuse retired re-enrollment, require marked checks, verify owned records

* no-mistakes(document): note shared branch-to-PR lookup in scripts table

* fix(bin): notify reported failures when no checks are required

* no-mistakes(document): inventory PR health flag and state, note new pr-forge member

* test: isolate real-Rex suites on private servers (kunchenguid#7649)

* Isolate real Rex tests with private servers

* no-mistakes(review): Trap Rex cleanup early and prove passive-read autostart guard

* no-mistakes(document): Consolidate Rex test isolation documentation

* fix: distinguish outdated tools from missing tools (kunchenguid#5688)

* fix(bin): report an outdated bootstrap tool instead of a missing one

detect_local_tools printed "MISSING:" for a treehouse without --lease, a
no-mistakes below 1.46.0, a gh-axi below its floor, and an incompatible
tasks-axi or quota-axi, so a supervisor read an installed tool as absent
and took the first-install remediation again.

Report those as "OUTDATED:" with the installed version, the requirement
and the tool's own upgrade command: treehouse update, no-mistakes update,
gh-axi update and quota-axi update. tasks-axi ships no self-updater, so it
keeps its install command. "MISSING:" stays for absent tools only, and
lavish-axi keeps PRESENTATION_UNAVAILABLE with its text fallback.

Update the bootstrap-diagnostics handler, the AGENTS.md section 13 trigger
list and the operator diagnostics in docs/configuration.md, and cover
absent, below-floor and at-floor for every floored tool in
tests/fm-bootstrap.test.sh.

* no-mistakes(document): Documented distinct bootstrap tool diagnostics

* fix(bin): reuse the tasks-axi check's own probe results

Rendering the tasks-axi OUTDATED requirement text ran the two `--help`
capability probes again after the compatibility check had already run
them, including when session start handed bootstrap an incompatible
verdict. The check now records the reason behind its verdict - the
version floor, or the capability probes the build fails - and reuses it,
both within the process and across the existing one-hop handoff, so
naming a missing capability costs no second probe pass. A build below the
floor is answered by its version alone and never pays for capability
probes it cannot use.

The bootstrap tests that simulate a tool as absent removed it from the
fake bin directory while bootstrap kept searching the fallback base PATH,
so a real host install could satisfy the lookup instead of the expected
MISSING line. Those cases now hide the tool from the base path as well,
and a new case pins the contrast between a bare and a curated fallback.

Verified: the touched bootstrap suite passes, and its probe-count and
capability assertions fail against the pre-fix scripts. Run with a
fallback base PATH carrying real installs of the absent tools, the
pre-fix suite fails on "absent treehouse reports a missing tool" while
the fixed suite passes every case.

* no-mistakes(document): Documented missing versus outdated tool diagnostics

* no-mistakes(document): Refresh outdated-tool documentation

* no-mistakes(review): Reuse shared version parser for outdated diagnostics

* no-mistakes(document): Correct outdated-tool diagnostics documentation

* no-mistakes(document): Align toolchain upgrade documentation

* fix(skills): keep main's bootstrap-diagnostics description and only add OUTDATED

* fix(bin): clarify ahoy skill legacy session-start exclusion to require verbatim match (kunchenguid#7530)

* Clarify ahoy legacy startup exclusion

* Fix quoted payload code span

* fix(bin): resolve timeout/gtimeout to executable paths via type -P (kunchenguid#7637)

* fix(timeout): bypass shell builtins when invoking external runners

* no-mistakes(review): Remove redundant slashless runner resolution from external timeout

* fix(bin): count answered captain holds moved to the Done archive as durable (kunchenguid#6094)

* fix: count answered captain holds in the Done archive at the completion gate

Done retention moves closed markdown rows into the configured Done archive,
which tasks-axi show never reads, so verify, complete, and scout teardown
refused an answered captain hold once retention archived it. The completion
gate now reads the newest archived block for an attested entry, under its
exact or legacy identity, and accepts it only through a recorded resolution.
Unanswered archived closes and holds found nowhere still refuse.

* no-mistakes(document): document Done-archive durability in captain-hold verification record

* no-mistakes(ci): Fixed the selected Greptile findings in bin/fm-captain-hold.sh (all in the Done-archive read path added by this PR). code_change_needed=true. ci-3 (Archived reads can hang): task_show_archived() now bounds the replayed archive `tasks-axi show` with the same read bound the live backlog read uses (FM_BACKLOG_ROW_TIMEOUT_SECS via fm_run_timed, sanitising a non-positive/padded value to 10s, mirroring fm_backlog_row_show). A bound hit is treated as 124, not absence: task_show_archived returns 124 and prints a loud reason; archived_entry() propagates 124; verify_entry_durable() exits 124 on the archived-read bound (alongside its existing resolve 124 handling); verify_hold_durable() exits 124 rather than reading the row as absent. So verify can no longer hang and complete can no longer stay blocked while holding the origin metadata lock. ci-4 (User-level archive setting ignored): added captain_markdown_archive_setting(), which resolves the [markdown] archive key with tasks-axi's own source precedence — the backlog root's .tasks.toml first, then $HOME/.tasks-axi/config.toml — before the existing default of done-archive.md beside the backlog; a relative value still resolves against the backlog root, which I verified empirically matches tasks-axi (root config wins over home config; a relative home-config value resolves against the backlog root; default stays data/done-archive.md). tasks-axi exposes no command for the archive path, so re-parsing with matched precedence is the available approach. Added test_archived_answer_in_a_user_configured_archive_satisfies_the_gate, which sets the archive only in a fixture $HOME/.tasks-axi/config.toml and drives the whole hold→answer→retention→verify/complete/teardown flow with that HOME, asserting the answered call archived to the relocated location still satisfies the gate. ci-5 (repeated archive scans, P2): left unchanged per the instruction's opt-out. A clean reuse of the row archived_entry already found is not small: archived_entry runs inside a command substitution, so its TASK_SHOW_OUTPUT dies with the subshell and cannot be handed to verify_hold_durable without restructuring both to pass the loaded row through the current shell. The growth is bounded (O(archive size) per attested entry) and P2, so hardening it would add more machinery than the fix warrants. Unanswered archived closes and holds found nowhere still refuse (existing test coverage retained). Verification: `bash -n` clean; pinned ShellCheck 0.11.0 (`shellcheck -x bin/fm-captain-hold.sh`) reports 0 findings; tasks-axi archive-precedence behaviour confirmed by direct experiment. The full fm-captain-hold-lifecycle.test.sh suite (which exercises both the pre-existing archived-gate test and the new user-config test) is slow due to beads spawns and was still running at report time; recommend confirming it green before merge. ci-1/ci-2 need no code change (action_required fork workflow runs awaiting maintainer approval), per the recorded user decision

* no-mistakes(document): Document Done-archive reads under backlog row timeout

* docs: say only the archive row replay is bounded, not the archive scan

* no-mistakes(document): Move Done-archive rule to the complete section

* fix(bin): read a PR with no CI checks as unverified, not checks green (kunchenguid#7627)

* fix(bin): optionally read a PR with no CI checks as unverified, not checks green

nm_ci_checks_state maps the ci log marker "no CI checks reported - still
monitoring" to green, the same verdict as "all CI checks passed". A pull
request that no check ever ran against therefore surfaced as "checks green: PR
ready for review" (kunchenguid#3216).

Add a no-checks verdict for that marker, returned only in a home that creates
config/ci-no-checks-not-green. The run-step consumer reports working with a
detail naming the real condition, and the status-log override no longer
promotes a crew's own "checks green" report while that marker is the latest.
Without the flag every reading is unchanged.

Co-authored-by: Harlan Do <[email protected]>

* no-mistakes(document): document ended-monitor reading under the zero-checks flag

* fix(bin): read a PR with no CI checks as unverified on every home

The ci log marker "no CI checks reported - still monitoring" now always
yields the no-checks verdict, so a pull request that no check ran against is
reported as working instead of checks green (kunchenguid#3216). The opt-in flag, its
docs section, and its skill entry are removed, the default-path test now
expects working, and the usage header and architecture note describe the
no-checks reading.

---------

Co-authored-by: Harlan Do <[email protected]>

* fix(bin): correct the wedge reset-failure log line and make the fault test root-safe (kunchenguid#7650)

* no-mistakes(review): correct the counter-reset log line, the sentinel comment, and the root proof

Three findings the review step recorded but never applied, all in this branch's own change.

The clean-rollback branch of the counter-reset guard logged "cap state rolled back", copied
from the sibling marker-write branch. That is wrong here: the cap marker was already written
before this block and _wedge_cap_rollback only truncates the counter, re-arms the since-file
and clears write tracking - it never clears the markers. The window therefore stays silenced
for FM_CAP_HORIZON_SECS, so the one operator-facing line must say that rather than claim the
cap state was rolled back. The rollback behaviour is unchanged and no marker-clear call is
added: the marker is deliberately kept so the window stays quiet.

The sentinel short-circuit comment opened "from either route that has to defend cap state"
and then enumerated three routes. Wording only.

The new regression case injected its fault with chmod 444, which does not restrict root, so
under root the guard would never fire and the case would fail on its own exit-code
assertion. It now skips as root the way this suite's other mode-based faults do. The
assertions are untouched: as the ordinary user the case still proves the guard.

* no-mistakes(review): name both ways a capped window leaves the silence in the reset log line

The tier-0 message for a refused post-fire escalation-counter reset says the cap marker
stands, so the window stays silent until its horizon elapses. That names one release route
where there are two: wedge_episode_end drops the marker through _wedge_cap_markers_clear, so
any episode-ending route ends the silence early, and docs/configuration.md records deleting
the marker as the operator's way to re-engage a capped window at once. This tier writes no
sentinel, so the marker is the only thing left to remove.

The message now names the horizon, an episode-ending route, and the operator remedy, in one
line in the same shape and position as its sibling tier-0 messages. The rollback behaviour,
the marker handling and the tier are unchanged.

* no-mistakes(document): correct root-skip comment's mode-bit precedent in wedge-cap test

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Caleb LeNoir <[email protected]>

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

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

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

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

---------

Co-authored-by: Alexandre Custodio <[email protected]>

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

* Add explicit OpenRouter Jev dispatch resolution

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

* chore: exclude local Stele binding from PR

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

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

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

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

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

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

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

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

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

Fixes kunchenguid#5349

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

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

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

* Fix Rex secondmate session lifecycle

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

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

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

* docs: describe the merged Rex spawn gate and guide contents

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Lorenzo Minghini <[email protected]>
Co-authored-by: zachlandes <[email protected]>
Co-authored-by: Tiago <[email protected]>
Co-authored-by: YifuGu <[email protected]>
Co-authored-by: laffy-999 <[email protected]>
Co-authored-by: chsong <[email protected]>
Co-authored-by: Hamish <[email protected]>
Co-authored-by: Harlan Do <[email protected]>
Co-authored-by: Caleb LeNoir <[email protected]>
Co-authored-by: Caleb LeNoir <[email protected]>
Co-authored-by: Alexandre Custodio <[email protected]>
Co-authored-by: Alexandre Custodio <[email protected]>
Co-authored-by: Pedro Guimarães <[email protected]>
Co-authored-by: Konner Moshier <[email protected]>
Co-authored-by: Oscar Santis Brante <[email protected]>