Repository navigation
Conversation
…ests The imported steward-exemption tests used bare GNU-only `sed -i`, which fails under BSD/macOS sed with no backup suffix argument. Match the repo's existing sed -i.bak convention.
…osures reconcile close requires a board-created reconcile request, so an OPEN DECISIONS reconciliation that finds a moot call with no pending request has no truthful completion path, and closing it under answer would fabricate captain provenance for words the captain never gave. Add fm-captain-hold.sh rule: it records the same evidentiary standard as reconcile close (a non-empty evidence file, never an assertion) under a distinct Firstmate ruling label, closes an actively held call without the board-request precondition, and retroactively attaches the same record to a task already closed with no resolution record so a truthful ordinary closure can satisfy verify without impersonating a captain answer. An exact retry is idempotent; drifted evidence or an incompatible existing resolution mode is refused rather than relabeled.
(cherry picked from commit 9d00a76d8b22ae39c72d20256c600737b9820129)
The registered `axi respond --action fix --findings <ids>` interface only advances the findings a round selects; an unselected finding is not re-surfaced by the tool's own output on a later round and had no durable firstmate-side record, so a worker could report everything addressed while silently dropping open findings (observed run 01M1TB9ZZQGN0JQ1RYV3WERD4S, review round3). Add bin/fm-nm-findings-lib.sh as the single owner of a durable, append-only JSONL finding-retention ledger and its fold/report/completion logic: every finding a gate presents is retained under its original identity, verbatim text, and provenance until an explicit fixed/skipped-closed/deferred disposition names it, with deferred requiring both an external owner and id. A disposition for a finding never seen is not fabricated into a closure, and an absent or malformed ledger degrades safely rather than erroring. Wire the worker-side contract into bin/fm-dod-lib.sh's no-mistakes Definition-of-done block and its ask-user escalation block (both single policy owners), so a driving worker hand-appends to the ledger at every gate and folds it before reporting done, and extend the two fm_dod_block call sites (bin/fm-brief.sh, bin/fm-promote.sh) with the data-dir argument the new ledger path needs. (cherry picked from commit a5ac620d184655e256e53989569a9ffa2f2f927e)
A spawn whose treehouse-get never reaches an isolated worktree refused at the deadline but left the window it had just created behind: no task record named it, nothing else could ever close it, and the clean retry refused on "window <session>:fm-<id> already exists". The abort trap now runs a transactional rollback that closes exactly the endpoint this spawn created, and only after proving it still answers as this spawn's own endpoint, holds no agent and no composer work, has no task record (partial ones included), and acquired no isolated copy - so a pre-existing or replaced endpoint is never closed and no project path or other task's worktree is touched. Armed on tmux and herdr, the backends whose liveness classifier is recovery-grade; disarmed the moment the task record publishes and teardown takes ownership. Adds executable race/negative tests: the incident's refused-isolation shape rolls its window back and retries cleanly, and pre-existing window, partial metadata, and live agent each block the rollback. (cherry picked from commit ea4715d91c8c45dd2867e9eaa313020d25dec83a)
Absorbs: - daaffdb fix(bin): create captain-hold rows when Beads requires due (kunchenguid#4854) - 1bb72cc fix: disable compact adviser for spawned agents (kunchenguid#4877)
Absorbs: - 4812db8 fix(bin): preserve Claude lock ownership after helper recycling (kunchenguid#4894) - 65a3bac feat: park main under the away posture on Pi (kunchenguid#4889) - 2bcb88c ci: standardize workflow timeouts into three tiers (kunchenguid#4910)
A separated Pi composer was rejected while the agent was working, leaving lifecycle restart unable to queue a control command. Admit working only after the existing identity and blank-pair proof; blocked Pi panes still defer because their prompts intercept input.
…fresh-20260920 # Conflicts: # docs/architecture.md
Defect: when `no-mistakes axi status`'s overview is truncated (a task's
own branch has zero rows among the shown ones), fm_nm_select_run's
Python fallback derived the repo identity for its direct SQLite query
from a `repo: <path>` line it expected in the overview text. The real
CLI never emits that line, truncated or not (see the genuine capture at
tests/captures/no-mistakes-v1.70.1/overview.toon, which has only
`count:`/`runs[...]:`), so the lookup always failed and reported
"unreadable runs table" for a task that simply has no run on its
branch. On a fleet with many concurrent runs, every idle-branch task
hits the truncated-overview path routinely, so this fired every few
minutes and drowned genuine unreadable/blocked verdicts in noise.
Fix: derive the repo identity from the task worktree path instead,
which is exactly the value `no-mistakes` records as a repo's
`working_path` (confirmed against the existing capped-overview test
fixtures, which already register repos by worktree path). A worktree
path that is not absolute cannot be matched and still reads as
unreadable rather than being guessed at. Also raise the reader's
SQLite busy timeout from 1s to 30s so ordinary lock contention on a
busy fleet cannot masquerade as an unreadable database.
Safety: every other verdict byte-for-byte unchanged - the repo lookup
still requires exactly one matching row (a genuinely corrupt or
mismatched repos table still reports unreadable, per the existing
`repo` failure-mode test), the branch query and row validation are
untouched, and a zero-row result for the branch still flows through
the same recursive re-parse that already turns an empty `runs[0]{...}`
table into `absent`. Added a regression test
(test_capped_overview_without_repo_line_and_no_runs_reports_absent)
that reproduces the real overview shape - capped, zero rows for the
task's branch, no `repo: ` line - and asserts the crew state falls
through to the pane/busy verdict instead of reporting unknown or
"unreadable". Full fm-crew-state.test.sh suite passes unchanged
otherwise.
…under native status
Two independent defects in the published --secondmate-home-summary path made a healthy home read as invalid, burying real alarms under false ones. 1. bin/fm-nm-run-lib.sh: a pooled lane is a git worktree whose `git rev-parse --git-common-dir` resolves to the primary checkout, and the no-mistakes daemon files every lane's runs under ONE repo row keyed by that primary path. fm_nm_select_run's capped-overview reader looked up repository identity by the lane's own exact worktree path, which never matches that row, so a live run on the lane's branch was reported as "complete same-branch run inventory unreadable" - unknown run-step, which then surfaced as child_current_unavailable. The reader now also tries the lane's resolved primary-checkout path (derived from its common dir) as a second identity candidate, and, when neither path matches a repo row, falls back to a runs-by-branch lookup that is trusted only when the branch resolves to exactly one repo_id (two repos coincidentally sharing a branch name stays unresolved, preserving the cross-repo safety the exact-path lookup exists for). A genuinely unreadable database still reports unreadable. 2. bin/fm-fleet-snapshot.sh: unknown_children can only exempt a child via a steward exemption when a matching "hold" identity row exists in durable_steward_rows, and that row was synthesized from live current-state only for the parked/paused/blocked states - never for unknown or stopped, the two states unknown_children actually gates on. A plain in-flight child with no backlog hold at all (current_role == "worker") could therefore never be exempted once its endpoint read unknown or stopped: even a fully valid, date-current, state-and-detail-matching steward exemption stayed permanently inactive, and the home stayed invalid. The child-state row generator now also fires for unknown and stopped, matching the doc comment at the top of the file, which already promised this coverage. A record with no matching exemption at all is unaffected and still reads unknown.
…eadable fm_nm_select_run's deep SQLite reader rebuilds a `count:`/`runs[...]:` overview and re-runs it through the same awk selection pass. When that rebuilt inventory has zero rows for the branch, the row-matching loop never executes, so its counters (`seen`) stay at awk's uninitialized empty string while `expected` and `shown` are plain strings parsed from the header text. Comparing an uninitialized value against a non-numeric string uses string comparison, so "" != "0" is true, and the END block takes the "unreadable runs table" branch instead of falling through to the correct "absent" verdict for a branch with genuinely zero runs. Coerce the affected END comparisons with `+0` so they are always numeric, matching seen/expected/shown/total regardless of whether awk classified them as strings or numeric strings. A truncated or genuinely malformed inventory still differs numerically and still reports unreadable.
# Conflicts: # bin/fm-dod-lib.sh
… lines The rule-command regression test predates upstream's status-line timestamping and compared raw parent-channel content, so every stamped line broke it after the merge.
A user systemd unit does not inherit the login PATH (~/.local/bin, the nvm node dir), so fm-fleet-steward.sh arm's generated next-up-refresh.service ran refresh with a PATH missing tools such as br, and every scheduled run exited 1 with "required tool not found: br". The scheduled refresh therefore never regenerated the verified ready queue after the first arm, and data/next-up.md silently went stale while still listing already-merged work. Worse, that failure was invisible: refresh only exited nonzero into a journald line nobody reads, so a day-stale ready list looked no different from a healthy one to the rest of the fleet-steward machinery. Fix both halves: - action_arm's generated service unit now carries a single Environment=PATH=... line copied from the arming shell's own PATH (the environment an interactive arm already proved works), so the scheduled run resolves the same tools an interactive run does. - action_refresh now writes a durable failure record (state/.fleet-steward-refresh-failure) on every failure path instead of only returning nonzero, and the registered check surfaces each new failure once as a fleet-steward wake, clearing the record (and its report marker) on the next successful refresh. Adds behavioral tests covering: a missing required tool produces the visible failure record and a nonzero exit; a refresh run with exactly the armed unit's own PATH still resolves every tool; the check surfaces a new failure once and stays silent on a repeat poll; and the generated unit actually carries the PATH line.
Defect: a remote secondmate's idle Pi pane read composer state `unknown` forever even though herdr's own `agent get` reported the Pi idle, so `bin/fm-remote-secondmate-control.sh relaunch` refused to type the `/quit` exit command it needs to recover a supervisor agent. The captain had to type the exit command by hand. Cause: `_fm_composer_scan_screen`'s Pi handling only proves a composer when it sees a matched PAIR of horizontal separator rows bounding a (possibly blank) content region - the classic rule/blank/rule sandwich. A live capture from the affected pane (preserved at data/fm-overlay-pi-composer-idle-unknown-0921-capture.txt) shows a newer Pi rendering that draws only ONE separator for a genuinely empty composer: unrelated transcript/queued-follow-up text sits above the rule, and directly below it Pi draws its own status furniture instead of a second rule - a cwd+branch line, then a resource-usage line shaped like `↑<tokens> ↓<tokens> R<mem>M <pct>%/<ctx>K (<mode>)`. With only one separator ever drawn, the pairing state machine never completes a pair, so every caller fails closed to `unknown`. Fix: `_fm_composer_scan_screen` gains a fallback that runs only when no ordinary pair was found and a lone separator exists. It checks whether the screen's own last row matches the resource line and, optionally, whether the row above that matches the branch line; if so it treats the footer's start as a synthetic closing separator, so the gap between the lone rule and the footer becomes the composer's content region, scanned by the same `_fm_composer_classify_pi_rows` a real second rule would feed. Every other verdict path (identity, blocked, the max-line bound, non-blank content) is unchanged, and a normal two-rule pair never reaches this fallback at all. Safety: the resource line's arrows and fixed `R<n>M`/`%/<n>K` tokens are not something a human composes by accident, so recognizing it is new positive structural proof, not a relaxation of the strict blank-row rule that already refuses an unidentified blank composer row. The fallback still requires the identity+structure conjunction the rest of the Pi path enforces (missing or foreign identity, or a blocked status, stays `unknown`), and content between the rule and the footer that fails to resolve empty still reads `pending`, never a forced `empty`. Tests: tests/fm-composer-lib.test.sh gains test_matrix_pi_lone_separator_footer, pinning the real capture's shape and asserting idle -> empty, typed content -> pending, blocked -> unknown, missing/foreign identity -> unknown, a malformed footer -> unknown, and an over-tall gap -> unknown. The full fm-composer-lib.test.sh and fm-composer-ghost.test.sh suites, plus fm-lint.sh and shellcheck, pass unchanged. docs/verification/runtime-backends.md records the dated evidence and the still-owed live-guard refresh once a Pi release that renders this footer is reachable from a fresh isolated tmux session.
# Conflicts: # bin/fm-composer-lib.sh # bin/fm-dod-lib.sh # bin/fm-nm-run-lib.sh # tests/fm-crew-state.test.sh
The doorbell, generated brief, and relaunch note told a worker to acknowledge a steering-inbox record with a literal mv naming the inbox directory by its absolute path on both sides. Some worker-environment command guards refuse a file-relocation command that names an absolute path under a user home, so the worker understood and intended the acknowledgement but had it refused at execution time: the record stayed unhandled, the watcher re-rang forever, and the lane looked stuck. Add bin/fm-inbox-ack.sh, invoked by its own absolute path (an ordinary script invocation, not itself a relocation command) and performing the actual mv using paths relative to the inbox directory after cd'ing into it. The doorbell (fm_task_inbox_doorbell_line), the generated brief scaffold, and the relaunch progress note all now name this helper instead of mv directly.
…r unasked confirmations Two independent workers on different harnesses closed their own no-mistakes gate findings the same day, and three lanes froze silently on confirmation prompts they could not answer. Add both rules as plain sentences to every ship mode's Definition of done, wording only.
…e both real files fm-ensure-agents-md.sh refused a project that deliberately keeps both files real (e.g. decision-os) with only "reconcile them manually", leaving a worker told to record project memory and blocked from the pointer convention with no sanctioned path, pushing toward hand-writing AGENTS.md directly.
A worker's done: event is treated as a completion signal regardless of whether it matches the ready shape its recorded delivery mode promises (a pull request URL for no-mistakes/direct-PR, "ready in branch" for local-only). Two 2026-09-21 mode=no-mistakes instances reported done naming only a branch and a commit, with no pull request in any state, and neither was caught until a supervisor checked the forge by hand. kunchenguid dbc0bc4 does not cover this: it only strengthens a done report that CLAIMS a pull request by reading it back from the forge, so a report claiming none stays invisible to it. Add a pure shape comparison against the already-recorded mode (status_done_mode_shape_ok, bin/fm-classify-lib.sh) and wire it into the wake annotation firstmate actually reads (fm_wake_print_annotations, bin/fm-wake-lib.sh), so a mismatched done line is called out as a DONE SHAPE MISMATCH instead of presented as an ordinary completion. No new record: both the mode and the event text were already being read.
… fm-tool-update-check.sh bin/fm-tool-update.sh is the mechanical applier for config/watched-tools.json, in the shape of bin/fm-update.sh plus the updatefirstmate skill. It never passes --force to anything and treats a tool's own nonzero exit, or git's own refusal of pull --ff-only, as authoritative proof an update should not proceed - reported skipped, never retried or worked around. A command tool is verified before and after its update_args run, so an update that exits 0 without moving the version is reported failed, not done. Fleet dispatch applies on this host and on every host registered in data/secondmates.md. The updatetools skill drives it from a captain invocation or the existing tool-updates check wake becoming actionable.
Teardown removes state/<id>.status and state/<id>.meta once a task lands, destroying exactly the decision and merge provenance most worth auditing on the tasks that just finished. Move two writes to data/<id>/, which cleanup never touches: fm-send.sh --resolve-key now durably records a gate finding's full, untruncated disposition to data/<id>/decisions.md alongside the capped status-log close line, and fm-pr-merge.sh now records who merged and against which verified head to data/<id>/merge-proof.md alongside state/<id>.merge-authority.
…refusing teardown
…without clobbering
Fork keeps: review-receipt gate docs, trim-guard hardening, no-mistakes mirror tests, squash-preserve behavior and its tests. Upstream brings: Forgejo tea merge path, wake-fold/Codex-checkpoint docs, FORGE_RULE_LINE scaffold refactor, Forgejo teardown tests.
…test shard (#16) * fix(tests): repair the eight baseline CI failures on the fleet fork Reconcile fixtures and one type error with behavior that already landed: Pi extension handlers narrow the before_agent_start event union before reading prompt; Pi secondmate fixtures name an explicit model and run the first-call fake; the wake-fold suite follows the scan exclusion of a remote mate's own parent channel; the kimi launch expectation carries the spawner PATH export; and three lint findings are cleared. * no-mistakes(test): Make busy-adapter and session-start test fixtures hermetic * fix(tests): give the supervision-host test its own portable serial shard The hosted rerun of Behavior portable serial 2 was cancelled at the 30-minute limit: tests/fm-supervision-host.test.sh took 1030s and then 1620s against a 789s planning hint, and the planner had packed about 150s of other scripts behind it. Raise its hint to the lane budget so the planner leaves it alone in its shard, require that isolation in the runner test, and record the reason in the shard doc. No test is skipped and no timeout changes. * no-mistakes(document): Fix stale wake-fold echo reference in supervision-host docs --------- Co-authored-by: Authentis <authentis@users.noreply.github.com>
… each launch took a turn (#17) * feat(bin): check worker models against the harness catalog and verify each launch took a turn Adds the launch-check verb, the shared Pi/OpenCode catalog rule, launch-registered provider handling, and the custody-first completed/held/failed verdicts, with regression and live-guard tests. * no-mistakes(document): Align control-plane docs with the launch-check verb * no-mistakes(review): Remove host-load rule from worker briefs and its test
… landed lanes (cherry picked from commit 66b8242)
…ks, serve stale on wait timeout (cherry picked from commit e2cce5d)
…ss refresh fallback (cherry picked from commit 8c85324)
…queue (cherry picked from commit eb85ee3)
(cherry picked from commit 2ca05de)
(cherry picked from commit 637a87f)
…and clean lint (cherry picked from commit 62a92ed)
…LI exit codes off the lock sentinels (cherry picked from commit 7b08029)
… with SHA-256, and kill only fixture children (cherry picked from commit 5176349)
…path without external tools (cherry picked from commit a4e458b)
(cherry picked from commit 3f7c2f3)
… with rate-limit backoff Concurrent GraphQL reads plus a gh-axi fallback on every failure exhausted GitHub's secondary limit. Reads now share a machine-wide cache and lock, back off exponentially on a rate-limit refusal, and never fall back while limited. Adds bin/fm-pr-read.sh so timer-driven scripts can share the throttle, and collapses four duplicate bounded readers in fm-crew-state.sh. (cherry picked from commit af1890f)
A heartbeat fanning out over many lanes spawned one status read per lane at once, since each cache key lock serializes only its own lane. Reads now take one of FM_NM_STATUS_SLOTS (default 2) machine-wide flock slots and fail to unknown after FM_NM_STATUS_WAIT seconds. The update check was already skipped on these reads and stays covered by the existing test. (cherry picked from commit 6d52fc0)
…hold under failure Stamp the per-PR attempt before the request so a killed or limited read still spends the window, and keep it composed with the global backoff. Replace the pid-file lock with a kernel flock so a dead holder can never be reclaimed unsafely. Make one request per attempt (gh, else gh-axi) with no second provider after a failure. Close the status-slot descriptor before the CLI runs so a leftover child cannot pin a slot. (cherry picked from commit d4513c5)
…air the dead-holder fixture, and keep shellcheck source-following clean The large-snapshot test now gives each lane its own worktree and asserts the in-flight read count (1 serialized, 2 concurrent) instead of a wall-clock saving. The dead-holder fixture kills the process that owns the flock, recorded by the holder itself. fm_pr_github_read_record names its cache directory cache_dir so followed sources no longer raise SC2031 in callers.
…ion fill it The no-mistakes status cache decided generation membership by whole-second mtimes, so a key first read in the same second a sibling was published kept that sibling serving the pre-read answer, and a fill that straddled a second boundary respawned its own earlier reads. A generation is now a token in the worktree's .gen record, carried in every entry's file name. A key the generation lacks joins it only when the same invocation started it (fm-crew-state sets FM_NM_CACHE_INVOCATION; any other caller is its own process); from another invocation it starts a new token and orphans the siblings, whatever the clock says. The regression tests drop the one-second pause and cover both directions.
The watcher's merge poll ran gh pr view directly every sweep, so it spent no read window, ignored the global rate-limit backoff, and let two homes or two tasks on one pull request each read it. When the watcher runs it from bin/, the GitHub branch now reads through fm-pr-read.sh; a copy run elsewhere keeps the direct read. The security fixtures answer the throttle's query and keep a private cache, and the throttle test covers the poll sharing the window and honouring the backoff.
Contributor
Author
|
Opened against the wrong base repo by mistake; superseded by the fork PR Authentis#20, which carries this content. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Open one fork pull request on Authentis/firstmate-upstream that carries the nm-cache substrate (starting at 637a87f, plus only the commits the throttle fix needs — expected about 10 commits, list them all in the PR body) plus the throttle fix at d4513c5, all based on the fork main. Stop with the PR checks green so it can be landed with a plain merge and no force-push. Everything else in the local private stack stays out. Purpose: give the crew host an update path that contains the substrate the rate-limit fix needs, so the fix can finally be installed there.
Rulings on this PR (supervisor decisions, verbatim; they only narrow what the review may flag and never add a requirement):
What Changed
bin/fm-nm-run-lib.sh,bin/fm-crew-state.sh). Whenfm-crew-state.shreadsaxi,axi statusorruns, it now reuses a successful result forFM_NM_CACHE_TTLseconds (default 120). The cache lives instate/nm-cache, and a per-key flock lets only one writer refresh it. If the lock wait times out, the read gets the stale value instead. A cache generation belongs to one token or invocation. Across all lanes, at mostFM_NM_STATUS_SLOTSstatus reads run at once (default 4, waitFM_NM_STATUS_WAIT). Every call setsNO_MISTAKES_NO_UPDATE_CHECK=1, and lanes that are already landed skip the no-mistakes lookups entirely.FM_NM_LOWLOAD=0turns all of this off. Teardown and the DoD custody gate infm-dod-lib.shstill read live and never use the cache.bin/fm-pr-lib.sh, newbin/fm-pr-read.sh). On each machine, a PR's state is fetched from GitHub at most once perFM_PR_READ_TTLseconds (default 300). Reads are serialized, back off on rate limits, and fall back to the cached answer when the lock times out.fm-crew-state.shuses this throttle. Per ruling 013, the only other behavior change is that the GitHub branch ofbin/fm-pr-poll.shnow callsfm-pr-read.shwhen that script sits beside it, and callsgh pr viewdirectly otherwise.docs/configuration.mdandfm-pr-read.shis listed indocs/scripts.md. Test coverage is in the newtests/fm-pr-read-throttle.test.shplus additions totests/fm-crew-state.test.sh,tests/fm-bearings-snapshot.test.shandtests/fm-pr-check-security.test.sh.Scope
The fork base is
fork/mainat1079f44c, so per ruling 002 this was not rebased onto kunchenguid upstream. Against that base the PR touches 13 files (+1222/−123) in the 20 commits below. The first 11 are the nm-cache substrate and the next 9 are the PR-read throttle and its fix.2f585770is the fix that routesfm-pr-poll.shthrough the throttle. No other part of the local stack is included.b148c003perf(bin): cache crew-state no-mistakes reads, skip update checks and landed lanes13f1be3cfix(bin): hold the cache lock for every refresh, recover orphaned locks, serve stale on wait timeoutd9e8124cfix(bin): make cache lock recovery ownership-safe and drop the lockless refresh fallback6d1c8746fix(bin): replace the cache mkdir lock with an ownership-safe ticket queue19dcc033fix(bin): replace the cache ticket queue with a slotted lease lock335e943efix(bin): guard the status cache with a process-owned flock7763de2cfix(bin): keep the lock off the CLI, make teardown ignore the cache, and clean lintc02638cffix(bin): never replay an expired cache entry past the TTL and keep CLI exit codes off the lock sentinels95065298fix(bin): keep the cache library pure-shell at source time, hash keys with SHA-256, and kill only fixture children3309d624fix(bin): read file ages with GNU stat first and resolve the library path without external tools6d0cf9b1fix(tests): silence SC2016 on the empty-PATH library probe11a13923feat(bin): throttle GitHub PR state reads to one per PR per 5 minutes with rate-limit backoffb657b124feat(bin): limit concurrent no-mistakes status reads across lanes to two345a2bf0fix(bin): make the PR read throttle's window, lock, and status slots hold under failure59b2e31cno-mistakes(review): Serve cached PR state on lock timeout; scope cache generationsee66c9e1fix(tests): bound bearings read overlap by the status-read limit, repair the dead-holder fixture, and keep shellcheck source-following clean23282243no-mistakes(review): Read DoD custody gate live, raise status slots to four22325003fix(bin): name a status-cache generation by token and let one invocation fill it2f585770fix(bin): read a GitHub merge poll through the shared PR read throttle2a48cd85no-mistakes(document): Document FM_PR_READ_TTL throttle knob in configuration🤖 Generated with Claude Code
Risk Assessment
Testing
I ran the real bin/fm-pr-poll.sh in the form the watcher uses (--validated) and bin/fm-pr-read.sh against real GitHub (merged PR Authentis#17 and open PR #20). A logging shim sat in front of gh to count requests and to inject rate-limit and SAML 403 refusals, with a private throttle cache. I covered: the poll going through the throttle and sharing its window with fm-pr-read, an open PR staying silent, the global rate-limit backoff and its doubling, a SAML 403 not triggering a global backoff, a stale cached record being served when the lock times out, and a copy outside bin/ falling back to a direct read. For the no-mistakes cache I stood up an isolated no-mistakes instance (its own NM_HOME daemon and a throwaway repo under /tmp) and ran the cache library and the real bin/fm-crew-state.sh against real axi status, axi and runs reads. The second heartbeat gave the same verdict with zero new spawns, a live read bypassed the cache, and failures and daemon status probes were never cached. I also ran the targeted throttle and poll-security test files, plus the 20 nm-cache crew-state tests (the 8x3 cold-heartbeat bound, four status slots, and the DoD custody gate reading live), extracted with a temporary runner that I deleted afterwards. Those tests are the only coverage for the DoD custody gate and cold-heartbeat scenario, so that scenario is recorded as untested live. The lab daemon was stopped, the LaunchAgent that no-mistakes init registered for the lab NM_HOME was uninstalled, and all scratch dirs were removed. init also printed that it reinstalled its /no-mistakes skill at user level; that skill was already installed. The worktree is clean. No UI surface was involved, so there are no screenshots.
Evidence: PR throttle and merge poll live transcript (real GitHub)
Source: PR throttle and merge poll live transcript (real GitHub)
Evidence: nm-cache and crew-state live transcript (isolated no-mistakes instance)
Source: nm-cache and crew-state live transcript (isolated no-mistakes instance)
Evidence: nm-cache crew-state targeted tests
Source: nm-cache crew-state targeted tests
Evidence: PR read throttle tests
Source: PR read throttle tests
Evidence: PR poll security tests
Source: PR poll security tests
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
tests/fm-crew-state.test.sh- merge conflict rebasing onto origin/mainbin/fm-pr-poll.sh:70- This change edits bin/fm-pr-poll.sh, and every armed merge poll is authenticated by checking it byte-for-byte against that file:cmp -s "$template" "$check"and the recorded template hash in fm_pr_poll_artifacts_content_valid (bin/fm-pr-lib.sh:720 and :732). Each state/<id>.check.sh is a copy of the old bytes, so after the update lands on the crew host every poll armed before it (GitHub, GitLab, Gerrit and Forgejo alike) stops matching. fm_pr_poll_snapshot_capture then fails, and fm-watch.sh puts the poll in rejected_checks (bin/fm-watch.sh:3040/3071). The watcher wakes with 'check: rejected unauthenticated state checks' (:3156) on each sweep and stops following those PRs to merge. No path re-arms them automatically: nothing in session-start, bootstrap or the watcher calls fm-pr-check.sh. Concrete case: a lane has an open GitHub PR with a poll armed, the host installs this PR, the PR merges, and no merge wake ever fires while the watcher keeps raising the rejection wake. Ruling 013 authorizes editing line 69, so the change itself is in scope. What needs a decision is how to handle this upgrade step: either tell the operator in the PR body to re-run fm-pr-check.sh for each armed lane after the update, or add a re-arm or migration path. A migration path would extend the change, so it needs authorization.tests/fm-bearings-snapshot.test.sh:3170- The rewritten overlap assertion requires the peak number of reads in flight to be exactly 4 ([ "$max" = 4 ]) with 5 lanes and 1s fake reads. On a slow runner the five crew-state processes may not all reachaxi statuswithin the same 1s window, so the peak can read 3 even though nothing is wrong.-ge 2 && -le 4would still catch both serialized reads and a broken slot limit, so it is the more robust bound. This is noted for the test step and needs no action now.✅ **Test** - passed
✅ No issues found.
/tmp/fmthr-01M58/drive.sh(deleted afterwards): runs real bin/fm-pr-poll.sh --validated and bin/fm-pr-read.sh against real GitHub PRs #17 (merged) and #20 (open) through a logging gh shim and a private FM_PR_READ_CACHE_DIR/tmp/fmthr-01M58/nmdrive.sh(deleted afterwards): fm_nm_run_checked against the real no-mistakes CLI, isolated NM_HOME=/tmp/fmnm/home and a throwaway repo initialised withno-mistakes initFM_STATE_OVERRIDE=/tmp/fmnm/state bin/fm-crew-state.sh lab-xrun twice against the isolated no-mistakes instancebash tests/fm-pr-read-throttle.test.shbash tests/fm-pr-check-security.test.shthe 20 nm-cache tests in tests/fm-crew-state.test.sh (test_status_cache_hit_skips_second_spawn_and_update_check through test_lowload_kill_switch_restores_old_behavior, including test_cold_heartbeat_of_eight_lanes_fits_the_snapshot_bound and test_dod_custody_gate_bypasses_the_status_cache), run through a temporary runner that was deleted afterwards✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.