Repository navigation
feat(bin): merge upstream Firstmate main 3d14792a into house - #96
Merged
Merged
Conversation
…guid#5879) * fix: route second-mate signal wakes by their new status span A second mate's status log is a shared channel carrying many independently keyed decisions, so judging its signal rows by every decision still open in the whole log pinned each routine update to main behind any unrelated parked hold. scopeForUnreadWake (the one owner for Pi and the attended supervision host) now judges a second-mate signal row by the lines presented since the last drain, bounded by the existing status-presentation cursor: a decision, blocked, resolution, or captain-held line, or a line declaring the key of a still-open decision, keeps the whole row on main, and any cursor problem falls back to the whole log. Keys are read only at the status parser's declared positions, with readable time stamps stripped as bin/fm-classify-lib.sh does. Single-task crewmate and stale routing are unchanged, and stale and signal rows for one mate keep independent verdicts. The supervision branch now treats a second mate's done and merged lines as relayed child outcomes, and fm-teardown refuses the branch actor second-mate retirement through the existing role-partition helper in both postures. * no-mistakes(review): Route second-mate resolutions to main only when closing open decision * no-mistakes(review): Guard bare-verb fold lines and fold resolution spans incrementally * no-mistakes(document): Clarify second-mate wake routing and retirement documentation * no-mistakes(ci): The CI failure was a timing-sensitive watcher teardown test, not the PR’s signal-scope code. Extended the bounded wait for both state-directory and home removal. The watcher suite passes locally, and git diff --check is clean
…extension (kunchenguid#5882) register-extension took the extension lifecycle lock and then the source lock, while reconcile republishing an unhandled extension result holds the source lock and reaches the lifecycle lock through the extension host's process-event path. Both waits are unbounded and both owners stay alive, so the two could wait on each other forever and freeze the home's monitoring cycle. register-extension now takes the source lock first, matching every other path that holds both. The lifecycle lock still spans binding resolution through registration publication, so binding retirement stays serialized. A new lifecycle-order section in the extension-binding suite, run in the default aggregate, holds a re-registration inside binding resolution while reconcile republishes that source's unhandled result and requires both to finish within a bound. Fixes kunchenguid#5866
* fix(bin): run the repository's own hooks when git -c carries the per-task hooksPath The per-task hooks wrappers cleared only the GIT_CONFIG_COUNT override before looking up the repository's own hooks directory. When core.hooksPath reached git through git -c (GIT_CONFIG_PARAMETERS), directly or inherited by a child process, the lookup found the wrapper directory again and exited 0, so the repository's real hook - such as a pre-push publish guard - never ran and the push succeeded. The lookup now ignores GIT_CONFIG_PARAMETERS too, so only the repository's config files decide its hooks directory, and a failed lookup exits nonzero instead of skipping the hook. AI-trailer stripping is unchanged. Fixes kunchenguid#5871 * no-mistakes(document): Document git hook chaining and lookup failure behavior
…unchenguid#5744) * feat(bin): add an optional never-send list to typed dispatch resolution * Added config/dispatch-never-send, an optional local list of literal values and re: regular expressions checked against every string of the resolver request before it is sent to typesafe.ai * A match, an unreadable list, or an empty or invalid pattern now stops the request and falls back to the off path, so firstmate dispatches through its existing intake; the one stderr diagnostic names at most the list line number and never the value * No list, or a list with no match, leaves resolution unchanged * no-mistakes(review): Match never-send literals across whitespace, drop regex mode * no-mistakes(review): Inherit the never-send list into secondmate homes * no-mistakes(ci): ci-2 (Lint 2), caused by this PR and now fixed. The rule that broke: the test script must not share shell variables with a library it sources. The new secondmate-inheritance test in tests/fm-dispatch-resolve.test.sh sourced bin/fm-config-inherit-lib.sh inside a `( ... )` subshell. That lib assigns `out`, so ShellCheck flagged every later `$out` in the test with SC2031. The subshell was the only place this PR sources that lib. The fix runs the propagation in a child shell instead (`bash -c '. "$1" && propagate_inheritable_config "$2" "$3"' _ lib from to`), so the test shell never sources the lib. `bin/fm-lint.sh tests/fm-dispatch-resolve.test.sh` now exits 0, and `bash tests/fm-dispatch-resolve.test.sh` passes. That includes the check that an inherited list is enforced in a secondmate home. ci-1 (Behavior portable serial 8), not caused by this PR, so no code change for it. The only failing test is tests/fm-remote-secondmate-relaunch.test.sh, which fails with "not ok - could not arm the PR poll fixture for the relaunch-ordering test". This PR doesn't touch that test or the code it runs. I reproduced the same failure locally on the base commit ea7c7f7. Main's own CI run on ea7c7f7 (run 36212602588) fails only this job, with the same message. The recent main runs before it also concluded failure
…hrashing guard (kunchenguid#5903) * feat(jev): add the guard framework and the memory RSS/swap thrashing guard A Jev guard is a bounded read-only host diagnostic that turns one class of resource pressure into a machine-readable audit record and a one-line verdict. This lands the framework contract (docs/jev-guards.md) with one representative family (Pattern 46, memory RSS and swap thrashing) as the pilot: thin bash wrapper, stdlib-only python engine, and a behavioral test through the CLI. * no-mistakes(review): fix jev mem guard fail-open unknown and contract * no-mistakes(review): fix mem guard rss pairing, memfree, tests, docs * no-mistakes(review): fix inverted UNKNOWN branch in fail-forcing test * no-mistakes(review): register docs/jev-guards.md in audience inventory * no-mistakes(review): simplify wrapper, drop dead top_n, single-source thresholds * no-mistakes(review): assert exact exit code in fail-forcing test leg * no-mistakes(review): tolerate any stdout encoding in text output * no-mistakes(document): Fix guard contract dash style and output wording
…enguid#5900) * fix(bin): stop slow GitHub reads from starving and waking the contributions poll The poll's fixed budget cut the tail URL's reads short, and any read killed at the bound was recorded as a forge failure, so routine GitHub slowness produced an observation-unavailable wake. A configured FM_CONTRIBUTIONS_BUDGET now rides the generated check shim and is cut down to the watcher's per-check bound with a margin, a read killed at the bound or the deadline is budget refusal that leaves records untouched, and the poll moves to the next URL that still has a full observation reserve instead of ending. * fix(bin): report the bound when a signal death leaks through fm_run_timed fm_run_external_timeout trusted the wrapper's recorded status over the runner's own bound verdict, so a read killed by the bound's TERM could surface as 143 and callers such as the contributions poll classified a budget-bound read as a forge failure. When the runner reports the bound, a signal-death status is the bound's own TERM racing the wrapper's bookkeeping and is reported as 124; a natural exit still passes through. The replace-shell probe also moves to the repo's portable BASHPID fallback so the suite runs on the macOS system bash. * no-mistakes(review): Rotate contribution polling and verify generated budget behavior * no-mistakes(review): Stabilize contribution rotation across successful observation refreshes * no-mistakes(review): Exclude settled contributions from live observation rotation * no-mistakes(document): Document contribution poll rotation and observation reserves * no-mistakes(ci): Captain, fixed timeout handling with a one-line change preserving natural exit 137. Full session-start and contributions suites, targeted regressions, and lint passed. The timeout suite still fails on the known Bash 3.2 BASHPID issue, left unchanged as instructed. Logs retained in .no-mistakes/ci-evidence/. Remote CI was not rerun * no-mistakes(ci): Fixed the fixture’s lock-acquisition race with a one-line bounded wait. Forced contention reproduced the CI error before the fix and passed afterward; the ordinary held-lock case, lint, syntax, and diff checks passed. Local Bash 3.2 failures remain: “cleanup lock bound 08 gave up before the marker lock freed” (also reproduced without the fix) and “TERM did not stop a watcher blocked inside a poll”. Remote CI was not rerun
…railers (kunchenguid#5859) * feat: add keep AI trailers setting * no-mistakes(document): Drop duplicate keep-ai-trailers line, update Cursor attribution note * no-mistakes(document): Honor keep-ai-trailers for Devin worker attribution * no-mistakes(document): Qualify Devin attribution note with keep-ai-trailers flag * no-mistakes(review): Inherit keep-ai-trailers into secondmate homes
…sh-command popup cannot hide the composer (kunchenguid#5876) * Fix Herdr composer reads blinded by the slash-command popup Capture the full visible viewport for every Herdr composer state and content read instead of a bounded tail. Claude Code renders its slash-command popup between the composer and the pane bottom, which pushes the composer outside a tail window. The pre-Enter payload proof then read an empty composer, judged a typed command unsent, and cleared it without pressing Enter. The proof-lines value now bounds only the clear cost, not the capture size. Growing the window adds rows above the composer only, so bottom-most shape selection and prior verdicts are unchanged. The suffix refusal is kept, and the shared inbox pending-line read stays a bounded tail. Portable regressions cover the popup-below-composer layout, and the live submit-confirmation guard gains a third exit scenario. The runtime-backends verification record documents the Herdr 0.9.0 and Claude Code 2.1.283 run. Closes kunchenguid#5533 * no-mistakes(document): Clarify composer capture bound ownership * no-mistakes(review): Drop unrequired bracketed-paste Enter fallback from live guard * no-mistakes(review): Latch trust prompt, check idle composer arm first
…configurable bound (kunchenguid#5917) Each per-task endpoint read in the session-start fleet digest runs in its own crash-isolated child under the existing timeout helper with a configurable FM_SESSION_START_ENDPOINT_TIMEOUT bound (default 10s). A hung or killed read becomes that task's endpoint error while the digest continues, and the wrapper banners any abnormal child exit naming its status.
…nchenguid#5886) * Keep lab tmux sockets on short private paths * no-mistakes(review): Fix Linux stat checks and fail-closed lab tmux teardown * no-mistakes(document): Update lab helper documentation for isolated tmux sockets
* Allow silent task-level no-change outcomes * no-mistakes(review): Exclude silent outcomes from captain-return handoffs * fix: look up supervision receipts by exact sequence * no-mistakes(review): Suppress silent notes in away-return brief * no-mistakes(review): Clarify visible notes; remove unused mode * no-mistakes(review): Clarify silent outcomes and avoid false drain promises * no-mistakes(document): Clarify silent supervision outcome documentation
…chenguid#5928) * feat: make /quiet a statement where the attended supervision host runs On a home that opted into the supervision host, quiet mode is what the attended host already does, so /quiet now enters nothing there instead of launching the quiet daemon and writing a record that would park a present captain's main. - bin/fm-afk-launch.sh quiet-check says quiet mode needs nothing where the attended host runs, or that the session is paused while its broken-session latch holds; a quiet enter refuses there before writing anything. - Where the home opted in but the attended host lacks a part (engine, tools, verified mirror writer, identifiable main session, valid mirror), quiet-check names it and quiet mode falls back to the daemon. - Under a live away record on that home, quiet-check and a quiet enter refuse and name the record, so the return runs first, whatever state/.afk says. - A quiet enter records mode: quiet in the posture record, so start and start-native launch the quiet daemon without FM_AFK_MODE, and the away refusal wording fires only for away. - bin/fm-host-mirror.sh check validates the dialog mirror read-only and exits 1 on a missing, unreadable, or invalid mirror. - The quiet and afk skills and the supervision-host docs describe the new behavior; homes without the opt-in and Pi homes keep the daemon path. * no-mistakes(review): Archive the quiet record when a quiet daemon start fails * no-mistakes(document): Clarify quiet-mode documentation and remove stale duplicates
…uid#5884) * fix(bin): grant Claude workers their task-channel dirs via --add-dir Since Claude Code 2.1.257, a file-tool read (Read/Glob/Grep, and an Edit's mandatory prior read) of a path outside the working directories parks --permission-mode auto panes on a one-time interactive question, and a "Block" answer lands permissions.blockReadsOutsideWorkingDirectories in user settings, refusing the same reads even under bypass. Firstmate launches Claude with no --add-dir, so a secondmate's parent-home steering inbox and a ship or scout worker's launch record, steering inbox, brief dir, and code-root .agents/skills were all outside: workers wedged on the question the first time they read a steer. Every Claude launch, spawn and relaunch, in both permission modes, now grants exactly the task's channel directories: state/<id>.inbox for a secondmate (in the parent home), or state/operational-inbox, state/<id>.inbox, data/<id>, and the code root's .agents/skills for a ship or scout. Paths resolve to real paths and lazily created channel dirs are made before launch so the grant never names a not-yet-existing directory; the whole state/ is deliberately never granted. The grant keeps the bypass-mode launch argv changed on purpose: it also protects bypass workers against a machine-recorded Block answer. * no-mistakes(document): Consolidate Claude launch guidance in configuration reference * no-mistakes(document): Clarify Claude permission documentation reference
…nguid#4819) * fix(supervision): prevent idle recovery loops without stranding wakes * no-mistakes(review): Remove unused wake-append rollback helper
…id#5889) * fix(bin): stop the remote-job worker busy-polling an idle queue The serving loop slept 50ms between passes and re-ran state preparation (chmod on every queue directory), the heartbeat publish, and the stale sweep on every pass. It now blocks on a worker.wake FIFO that staging, cancellation, and lane exit nudge, keeps a short fast-poll window after activity, refreshes the heartbeat at most once a second, and runs the sweep (which re-applies the queue directories' 0700 modes) at startup and then on a bounded interval. Lane-owned records are no longer re-read every pass. Measured with a fork/execve-interposing counter on a --serve worker in a disposable HOME and queue, bash 3.2, 20-second windows (the counter slows the old loop to about 5 passes a second, so real-host rates were higher): idle worker 146 forks/s, 61 execs/s -> 4.8 forks/s, 3.1 execs/s one running long job 232 forks/s, 100 execs/s -> 15 forks/s, 11 execs/s Stage-to-result latency for a no-op job, idle and back to back, stayed at about 0.8-1.2s in both versions (dominated by job execution, not pickup). * perf(bin): drop per-cycle forks from watcher, drain, and lock helpers The watcher, drain, inactive-reconcile scan, and branch-outcome reads forked small external commands on every cycle where bash can do the same work. - fm-wake-lib.sh gains fm_dirname_to, fm_basename_to, and fm_epoch_seconds_to, exact stand-ins for $(dirname --), $(basename --), and $(date +%s); the clock uses printf %(%s)T on bash 4.2+ and still forks date exactly once on stock macOS bash 3.2. - fm_lock_abs_path, fm_wake_signal_seen_path, fm_path_age, the watcher's age_of and wedge timer, and the recovery-marker line count use them or plain reads instead of dirname/basename/tr/date/wc. - window_to_task reads a meta file once instead of two grep | tail -1 | cut -d= -f2- pipelines per file per call. - fm-classify-lib.sh reads uname -s once at source time instead of in every status stat helper. - Libraries sourced every cycle derive their own directory without forking dirname, including the backend adapter siblings a subshell re-sources on each probe. tests/fm-fork-free-helpers.test.sh pins each replacement against the command it replaces on edge-case inputs, under every available bash and both the C and a UTF-8 locale; CI's stock macOS bash lane runs it under /bin/bash 3.2. Measured with a fork/execve-interposing counter in a disposable home, one tmux crew task, FM_POLL=1 (forks and execs per watcher cycle, per run otherwise): watcher cycle bash 5.3 299/138 -> 199/66 bash 3.2 341/146 -> 224/80 drain bash 5.3 492/238 -> 430/200 bash 3.2 567/250 -> 491/212 inactive scan bash 5.3 27/14 -> 17/4 bash 3.2 37/14 -> 17/4 branch-outcome bash 5.3 40/21 -> 35/16 bash 3.2 48/24 -> 38/19 * test: note the interpreter-expanded version probe for shellcheck * no-mistakes(review): Fix worker idle bounds and fork-free contributions snapshot * no-mistakes(review): Coalesce buffered worker wake nudges into one wake * no-mistakes(review): Coalesce wake nudges via pending marker so publishers never block * no-mistakes(review): Claim wake nudges atomically via noclobber pending marker * no-mistakes(review): Release abandoned wake claims only after a 30-second bound * no-mistakes(review): Drop worker wake FIFO; load path helpers side-effect free * no-mistakes(document): Document remote worker polling and preemption cadence * no-mistakes(ci): Fixed both failing CI shards: isolated remote and teardown test fixtures now include fm-path-lib.sh, which fm-wake-lib.sh requires. The three affected tests, fm-lint.sh, and git diff --check pass locally
Brings kunchenguid/firstmate main through kunchenguid#5889 into the fork's house line at 79ef0f4. Conflicts resolved keeping both sides, except that a silent routine outcome now updates the task's status-coverage index as upstream kunchenguid#5808 requires. The supervision-host fixtures now report once per wake row under house's per-row receipts.
…p-trailers push-guard gap
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
ok, lots of updates to firstmate upstream, youre going to have to check it out and see what we do in terms of clean/unclean merges
Context for reading that ask. Upstream Firstmate
main(kunchenguid/firstmate) is at 3d14792, 15 commits past the fork'shouse(jazz127/firstmate, at 7725545 after PR 91). A trial merge (git merge-treeof upstream/main into origin/house, 2026-09-28) conflicts in 18 files. The conflicts cluster around these upstream PRs: kunchenguid#5808 "silence routine no-change supervision outcomes" (the branch outcome/report/prompt scripts, the Pi branch extension, and the supervision docs, overlapping house's own routine-outcome and bookkeeping silence features); kunchenguid#5889 "reduce remote worker and polling helper process churn" (herdr backend, branch outcome, contributions, overlapping house's remote-worker identity features); kunchenguid#5900 "prevent contribution poll starvation on slow GitHub reads" (contributions and timeout-lib tests, overlapping house's automated-reviewer intake); kunchenguid#5877 "chain repository hooks under git -c overrides" and kunchenguid#5859 "config/keep-ai-trailers opt-out" (AI trailer stripping); kunchenguid#5884 "grant Claude workers access to Firstmate task channels" (spawn); kunchenguid#5876 Herdr composer full-viewport reads; kunchenguid#5879 second-mate signal wake routing; plus docs/configuration.md touched by most of them. The other upstream commits (kunchenguid#5903 guard framework, kunchenguid#5744, kunchenguid#5882, kunchenguid#4819, kunchenguid#5886, kunchenguid#5917, kunchenguid#5928) appear to merge cleanly.Standing guidance on tests for these merges: "i think we need to start not caring about the tests as much before the merge completes and just let a test suit run agter and follow up or somethjng. its way tok long for the whole suite"
As before, say in the PR body, for each house feature touched by a conflict, whether the upstream change now covers it (with evidence), or that it does not.
What Changed
kunchenguid/firstmatemain at 3d14792 (fix: silence routine no-change supervision outcomes kunchenguid/firstmate#5808, fix: reduce remote worker and polling helper process churn kunchenguid/firstmate#5889, fix: prevent contribution poll starvation on slow GitHub reads kunchenguid/firstmate#5900, fix: chain repository hooks under git -c overrides kunchenguid/firstmate#5877, feat(bin): add config/keep-ai-trailers opt-out to keep AI co-author trailers kunchenguid/firstmate#5859, fix: grant Claude workers access to Firstmate task channels kunchenguid/firstmate#5884, fix(bin): capture the full viewport for Herdr composer reads so a slash-command popup cannot hide the composer kunchenguid/firstmate#5876, fix: route second-mate signal wakes by presented status span kunchenguid/firstmate#5879, feat(jev): add the guard framework contract and the memory RSS/swap thrashing guard kunchenguid/firstmate#5903, fix(bin): withhold never-send values from dispatch resolver requests kunchenguid/firstmate#5744, fix: prevent extension registration and reconcile deadlock kunchenguid/firstmate#5882, fix(bin): prevent idle recovery loops without stranding wakes kunchenguid/firstmate#4819, fix: keep lab tmux sockets private and short under deep worktrees kunchenguid/firstmate#5886, fix(bin): bound per-task endpoint reads and banner every abnormal digest exit kunchenguid/firstmate#5917, feat: make /quiet a statement when attended supervision is ready kunchenguid/firstmate#5928) intohouse. New upstream features in this merge: theconfig/keep-ai-trailersopt-out,--add-dirgrants to Claude workers for their task-channel directories, full-viewport Herdr composer reads, the jev guard framework with its memory guard (bin/fm-jev-mem-guard.{sh,py},docs/jev-guards.md), fork-free path helpers (bin/fm-path-lib.sh), rotating contribution polls with a budget capped by the check timeout, and/quietas a statement.silent=trueis limited to routine no-change outcomes and no-change heartbeats. House's "Silent outcomes" bookkeeping section is removed from the branch prompt, along with its test. The supervision-host fixtures now report once per wake row under house's per-row receipts, and the host looks up returned rows through the newfm-branch-outcome.sh lookup --seqs.fm_composer_strip_ghoststrips a dark truecolor run only if it is also a muted near-grey (channel spread under 96). Before this, Claude Code's slash-command colour (38;2;87;105;247) was stripped as ghost text, so the pre-Enter proof cleared a typed/exit.docs/configuration.mdnow says that withconfig/keep-ai-trailerspresent, shipping workers also skip upstream's prior-art push guard, because that guard is installed only through the pane hooks.House features touched by conflicts, and whether upstream now covers them
silenton any task's routine outcome (the old fleet-only restriction is gone inbin/fm-branch-outcome.shand.pi/extensions/fm-branch-supervision.ts) and keeps silent rows out of captain-return relays (bin/fm-branch-report.sh,bin/fm-supervision-host.sh,bin/fm-afk-return.sh). Its eligibility is only "worker still busy, nothing new, no action taken", and upstream's test requires a silent task outcome to update the status-coverage index.display: !row.silent).display: false), the historical-message renderer still hides old routine notes, and the prompt and docs say routine outcomes are hidden regardless ofsilent. Upstream's sentence "stays rendered" becomes "is never silent", and the prompt assertion intests/fm-branch-supervision.test.shfollows.bin/fm-branch-report.sh,docs/supervision-host.md,tests/fm-supervision-host.test.sh--row, receipt lock held across check/append/write). Upstream's silent early exit now runs after the lock is released. Upstream's host test stub and its silent-after-return test now report once per wake row, and the large-turn fixture numbers its bulk rows after the real reports.bin/backends/herdr.shcomposer state and contentbin/fm-spawn.sh,bin/fm-git-strip-ai-trailers.shand its testconfig/keep-ai-trailersopt-out, but have no push guard.config/keep-ai-trailersinstalls no pane hooks at all (upstream kunchenguid#5859), so its shipping workers also skip the prior-art push guard. This home does not set the flag.bin/fm-spawn.shlaunch prefixbin/fm-contributions.sh,tests/fm-contributions.test.shtests/fm-contributions.test.shrunner listtests/fm-timeout-lib.test.shbin/fm-timeout-lib.shstill reads$BASHPIDdirectly.tests/fm-extension-binding.test.shremote file listfm-path-lib.shfrom upstream,fm-task-inbox-lib.shandfm-backend.shfrom house).Other house behavior checked beside the conflicts:
tests/fm-watch-triage.test.shdeclared-wait cases pass on the merge (see below).tests/fm-remote-job.test.shpasses on the merge.tests/fm-remote-doctor.test.shandtests/fm-remote-herdr-guard.test.shpass on the merge.Known follow-ups
config/keep-ai-trailersinstalls no pane hooks, so its shipping workers skip the prior-art push guard (upstream does not cover this house feature). Second mates inherit the flag, so theirs do too. Accepted for now because this home does not set the flag;docs/configuration.md"Commit attribution" now says so. Keeping the guard would need a guard-only hook install mode, which is new behavior.tests/fm-contributions.test.shfailed on plainhouse79ef0f4 as well (house's published-file check against the test's fake GitHub, which had no pull-request files route); not a merge regression. The pipeline's test step added that route to the fixture, so the file now passes on this branch.bin/fm-composer-lib.shghost-text stripping (see What Changed); upstream fix(bin): capture the full viewport for Herdr composer reads so a slash-command popup cannot hide the composer kunchenguid/firstmate#5876's/exit-behind-popup case failed on this Claude Code/Herdr version pair on upstreammainalone too. Worth reviewing as a behavior change beyond the merge itself.Risk Assessment
Testing
In round 2 the live Herdr check failed at the /exit-behind-popup step, on this merge and on pure upstream alike. I re-drove it with the real Claude CLI in a disposable fm-lab Herdr session. All three steps passed: a landed idle steer reads empty, a payload carrying the U+2063 away-supervisor mark is submitted, and a typed /exit behind the command popup is recognised as typed text, submitted, and Claude exits. The composer-lib test file also passes, including the new case built from the live capture and the existing cases for grok's placeholder and muse's prompt glyph. Those are unit tests only; live grok and muse panes were not launched, so that scenario is marked untested. I did not re-drive the other round-2 scenarios (silent outcomes, AI-trailer hook chaining, contributions, lab-home tmux) this round, because this round's only change is to the composer ghost-text stripper. Their round-2 evidence files are still in the evidence directory. There is no rendered UI change here, so the CLI test transcripts are the evidence.
Evidence: Live Herdr submit-confirm e2e (round 3, passing)
Source: Live Herdr submit-confirm e2e (round 3, passing)
ok - live Herdr submit confirm: Claude Code (2.1.283 (Claude Code)) on herdr 0.9.1 reports empty and renders the requested reply in isolated session fm-lab-herdr-submit-con-61540-23068 ok - ... submits a U+2063 away-supervisor payload whose read-back drops the mark ok - ... proves and submits a typed /exit behind its command popupEvidence: Composer lib targeted tests (round 3)
Source: Composer lib targeted tests (round 3)
Worker-side checks
Before the pipeline ran, the worker ran synthetic/offline local test runs of the covering test files on the pre-fix merge commit 68266ba and compared failures against
git archiveexports oforigin/houseand upstreammain; results are in the evidence artifact below. The full suite was not run, per the standing guidance.evidence-artifact: /tmp/fm-firstmate-house-upstream-merge-r6/tests/evidence-summary.txt
evidence-command: bash tests/.test.sh for each listed test, on the merge commit and on git archive exports of origin/house and upstream/main
evidence-captured: 2026-09-27T23:30:38Z
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:4901- The merge nests house's upstream prior-art push guard inside upstream feat(bin): add config/keep-ai-trailers opt-out to keep AI co-author trailers kunchenguid/firstmate#5859'sif [ "$KEEP_AI_TRAILERS" = 0 ]block. The guard's only install path is the strip-hookinstall ... <guard>pre-push wrapper, and the pane's core.hooksPath export at bin/fm-spawn.sh:5280 is gated the same way. So on a home withconfig/keep-ai-trailers, a ship task in a non-local-only mode gets nofm-upstream-push-guard.sh, and a push to a non-origin GitHub repo skips the prior-art receipt check (bin/fm-upstream-push-guard.sh). The updated comment at bin/fm-spawn.sh:4898 records this, but docs/configuration.md:1034 describes the flag as affecting only attribution and trailers. The inherited-config rule (bin/fm-config-inherit-lib.sh:82) carries the flag into secondmate homes, so their ship tasks lose the guard too. The fix needs a guard-only hook install mode (new behaviour), not only a correction, so a human needs to decide whether the guard should stay on when trailers are kept. For the PR body's per-feature accounting: upstream does not cover this house feature.bin/fm-branch-outcome.sh:487- The resolution drops house's rule that a silent outcome never updates the task's status-coverage index. The append at bin/fm-branch-outcome.sh:487 now writes the index for silent rows, and the rebuild at :278 no longer filters.silent != true. The house test that checked this (test_silent_bookkeeping_outcomes_stay_out_of_replay_and_coverage) was cut down, and upstream's opposite assertion now applies (tests/fm-branch-supervision.test.sh:158). Upstream fix: silence routine no-change supervision outcomes kunchenguid/firstmate#5808 only allows silent for a still-busy, no-change worker. House's merged prompt also allows it for pause echoes, rechecks of a registered pause, and re-confirmations of an open captain hold (bin/fm-branch-prompt.sh:98-101). Concrete sequence: task-p is on a captain hold; the worker writes a new captain-facing status (for exampleblocked: needs credential) whose wake is lost; the branch then handles a scheduled pause recheck and reports--silent true. The append records the current status endpoint, so fm-wake-drain.sh:365-367 treats the unseen blocked status as covered and the lost-wake backstop never re-delivers it. This is exactly the hazard house's removed comment guarded against. The merge commit calls this an adopted upstream requirement, so a human needs to confirm it. Options: keep upstream's index semantics and narrow house's bookkeeping-silent eligibility, or keep upstream's index write only for no-change silent rows. For the PR body: upstream does not cover this house invariant; it reverses it.bin/fm-branch-prompt.sh:81- The merged branch prompt now gives contradictory silence rules. Upstream's line 81 says to set silent true for a task-level routine outcome 'only when it says the worker is still busy, nothing new has happened since the last outcome, and no action was taken'. House's 'Silent outcomes' section (lines 96-103) tells the branch to set silent for 'the echo of a pause or status record you yourself just wrote', which is an action on a task that is not 'still busy'. Step 4 (line 54) joins the two with 'or', and the same union appears in docs/supervision-protocols/pi.md:25, .pi/extensions/fm-branch-supervision.ts:1182 and docs/configuration.md:218. This generated prompt is what the model follows, so pause echoes will be reported inconsistently: sometimes silent, sometimes not. Which case you pick also decides whether the coverage-index hazard above is reachable. The author needs to decide which rule wins and reword line 81, or the Silent outcomes section, to match.🔧 Fix applied.
1 warning still open:
bin/fm-spawn.sh:4901- The merge nests house's upstream prior-art push guard inside upstream feat(bin): add config/keep-ai-trailers opt-out to keep AI co-author trailers kunchenguid/firstmate#5859'sif [ "$KEEP_AI_TRAILERS" = 0 ]block. The guard's only install path is the strip-hookinstall ... <guard>pre-push wrapper, and the pane's core.hooksPath export at bin/fm-spawn.sh:5280 is gated the same way. So on a home withconfig/keep-ai-trailers, a ship task in a non-local-only mode gets nofm-upstream-push-guard.sh, and a push to a non-origin GitHub repo skips the prior-art receipt check (bin/fm-upstream-push-guard.sh). The updated comment at bin/fm-spawn.sh:4898 records this, but docs/configuration.md:1034 describes the flag as affecting only attribution and trailers. The inherited-config rule (bin/fm-config-inherit-lib.sh:82) carries the flag into secondmate homes, so their ship tasks lose the guard too. The fix needs a guard-only hook install mode (new behaviour), not only a correction, so a human needs to decide whether the guard should stay on when trailers are kept. For the PR body's per-feature accounting: upstream does not cover this house feature.🔧 **Test** - 1 issue found → auto-fixed (2) ✅
tests/fm-contributions.test.sh:137- tests/fm-contributions.test.sh failed 14 cases ('could not register the owned delivery'). It fails the same 14 on base house 79ef0f4, so this merge did not cause it. The test's fakeghhad no route forpulls/N/files, which house's published-scratch guard (fm_pr_refuse_published_scratch in bin/fm-pr-lib.sh) calls during fm-pr-check registration. I added apulls/*/files?*route that returns no files, and the whole file now passes.bin/fm-branch-prompt.shin a throwaway FM_HOME: checked that the emitted prompt has no 'Silent outcomes' section and no bookkeeping silence casesbin/fm-branch-outcome.sh appendin a throwaway FM_HOME: a silent routine row writes the status-coverage index,--verdict captain --silent trueis refused with rc=2, andunreadoutput checkedbin/fm-git-strip-ai-trailers.sh install <hooks> <repo> <guard>in a throwaway repo with .husky hooks: commits made through the pane GIT_CONFIG env and throughgit -c core.hooksPath; pushes made with the guard passing and with it refusingbin/fm-lab-home.sh create/tmux-dir/teardownwith a tmux server started on the lab socket and then killedbin/fm-test-run.sh tests/fm-branch-supervision.test.sh tests/fm-pi-branch-extension.test.sh tests/fm-git-strip-ai-trailers.test.sh tests/fm-contributions.test.sh tests/fm-timeout-lib.test.sh tests/fm-backend-herdr.test.sh tests/fm-spawn-dispatch-profile.test.sh tests/fm-remote-job.test.shbash tests/fm-contributions.test.shon a git-archive copy of base 79ef0f4e, which fails the same 14 cases, so the failure predates this mergebash tests/fm-contributions.test.shafter adding the fixture's pulls/*/files route: rc=0🔧 Fix applied.
2 issues (1 error, 1 warning) still open:
tests/fm-herdr-submit-confirm-live-e2e.test.sh- In the opt-in live Herdr check (Claude Code 2.1.283, herdr 0.9.1), the /exit-behind-command-popup step fails: the command is judged unsent and cleared instead of submitted. A pure upstream 3d14792 tree fails in exactly the same way, so the merge did not cause it. Upstream fix(bin): capture the full viewport for Herdr composer reads so a slash-command popup cannot hide the composer kunchenguid/firstmate#5876's fix does not hold on this Claude/Herdr version pair, which matters for the PR body's per-feature accounting.Trailer strip and hook chaining live in a throwaway git repo:bin/fm-git-strip-ai-trailers.sh install <hooks> <repo> <guard> g1, then commits and pushes through both the pane-styleGIT_CONFIG_*override andgit -c core.hooksPath=(#5877)Branch prompt: ranbin/fm-branch-prompt.shtwice, confirmed identical output, and checked the emitted prompt text for the silence ruleOutcome store in a lab home made bybin/fm-lab-home.sh create:bin/fm-branch-outcome.sh append --silent true(routine), append with verdict captain plus silent (should be refused), a visible routine append after a new status line, thenunreadandpresentFM_HERDR_SUBMIT_CONFIRM_LIVE=1 bash tests/fm-herdr-submit-confirm-live-e2e.test.sh: real Claude Code 2.1.283 on herdr 0.9.1 in an fm-lab-* session run through bin/fm-herdr-lab.sh, on the merge result and again on agit archive 3d14792aupstream treeTargeted test files:bash tests/fm-branch-supervision.test.sh,tests/fm-pi-branch-extension.test.sh,tests/fm-contributions.test.sh,tests/fm-git-strip-ai-trailers.test.sh,tests/fm-spawn-dispatch-profile.test.sh,tests/fm-devin-harness.test.sh,tests/fm-backend-herdr.test.sh,tests/fm-timeout-lib.test.sh,tests/fm-watch-arm.test.sh,tests/fm-remote-job.test.sh,tests/fm-secondmate-harness.test.sh🔧 Fix applied.
✅ Re-checked - no issues remain.
env -u NO_MISTAKES_GATE FM_HERDR_SUBMIT_CONFIRM_LIVE=1 bash tests/fm-herdr-submit-confirm-live-e2e.test.sh(real Claude Code 2.1.283 in an isolated fm-lab-* Herdr 0.9.1 session through bin/fm-herdr-lab.sh; the test tore the lab down itself)bash tests/fm-composer-lib.test.sh(48 ok, including the new test_claude_saturated_slash_command_is_typed_content and the existing grok/muse ghost-strip matrix cases)Checked that no fm-herdr-submit-confirm-live temp directories were left behind and the worktree is clean✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.