Skip to content

fix: merge upstream firstmate 64254de4 - #408

Merged
trillium merged 5 commits into
mainfrom
fm/upstream-merge-20261111
Nov 11, 2026
Merged

trillium merged 5 commits into
mainfrom
fm/upstream-merge-20261111

Conversation

@trillium

Copy link
Copy Markdown
Owner

Intent

Nightly reconcile of the fork with upstream main 64254de (4 new commits), merged with a merge commit.

What changes for a human

Nothing new is built here; the fork picks up four upstream changes and keeps its own fixes:

  • Claude workers honor the configured tool-exclusion list (--disallowedTools), with a new token-free live guard and a measurement record in docs/verification/runtime-backends.md.
  • A continued Claude session can take over the Stop auto-arm claim.
  • The Herdr lab reports a server that fails at startup (with its log tail) and refuses session names whose socket path is too long.
  • Per-task supervision markers reset at away-session boundaries.

Affected commands and outputs: bin/fm-spawn.sh (Claude launch line), bin/fm-herdr-lab.sh (provision), bin/fm-test-run.sh (shard weights), the Stop auto-arm hook, and the runtime-backends verification doc.

Conflicts resolved (both sides kept)

  • bin/fm-herdr-lab.sh: upstream's early-exit server check landed; the fork's /bin/sleep polling (immune to a PATH sleep shim) is kept.
  • bin/fm-spawn.sh: the fork's Pi MCP --no-approve handling is kept; upstream's __CLAUDEEXCLUDE__ substitution is added next to the Claude permission flag.
  • bin/fm-test-run.sh: the fork's weight table is kept, plus upstream's new live-guard entry.
  • docs/verification/runtime-backends.md: the fork's token-pin note and upstream's tool-exclusion section both stay.
  • tests/fm-herdr-lab.test.sh: the fork's sleep-shim test and upstream's four new tests all run.

Tests

Test Result
fm-herdr-lab pass (27 ok)
fm-spawn-dispatch-profile pass
fm-test-run pass (46 ok)
fm-claude-stop-autoarm pass (74 ok)
fm-claude-tool-exclude-live pass
fm-control-relaunch pass (108 ok)
fm-account-fingerprint pass
fm-worker-account pass
fm-spawn-batch pass
fm-spawn-herdr-lease pass
fm-backend-t3code 53 ok, 1 not ok

The one t3code failure ("a tracked worktree .claude/settings.local.json must refuse the spawn") is environmental: the test machine's global gitignore ignores that file, so the fixture cannot stage it. That test region is untouched by this merge. A first run also hit a Homebrew md5 lacking -q, which passes with the system md5 first on PATH.

Flow

flowchart LR
  U[upstream main 64254de4] --> M{merge commit}
  F[fork main a4702044] --> M
  M --> R[5 conflicts resolved, both sides kept]
  R --> P[this PR]
Loading

kunchenguid and others added 5 commits November 10, 2026 17:08
…unchenguid#8318)

* fix: clear per-task away-session markers at return and fresh entry

The five .subsuper per-task families (stale, reported-stale, dialog,
paused, pause-until-due) were episode state with no session scope: a
first-seen-idle clock left behind when a session ended inside the 240s
recheck window was read by the next away session's first housekeeping
pass as its own, reporting a "stale persisted Ns (possible wedge)"
whose duration never happened.

fm_afk_clear_stale_artifacts now drops all five families with the
delivery artifacts on a fresh entry, and fm_afk_launch_stop drops them
at the return. The launch backup/rollback lists cover the same set so a
failed entry still restores prior state. Accepted cost, recorded on the
cleanup's header: a declared wait spanning two away sessions restarts
its recheck window at re-entry.

* no-mistakes(document): Correct away-session lifecycle documentation

* no-mistakes(ci): Initialized pendingBashComponents in the shared Pi test host, fixing the CI renderer crash. Full suite failure was downstream of that lane. Focused behavioral checks, shell syntax, and diff checks pass locally; the newer CI Pi version was not available locally
kunchenguid#8322)

* fix: surface herdr lab server failures and refuse over-long socket paths

The lab helper discarded the herdr server's output and waited the full timeout even after the server exited, so a startup failure such as a socket path over the sun_path limit looked like a plain timeout.

Provision now keeps the server output in a log in the helper state directory, stops waiting as soon as the server process exits, and prints the log tail in the failure message.
Name and prepare now refuse a session whose client socket path would exceed the 103-byte sun_path limit, naming the limit.

* fix: count socket path bytes, check it in provision, and use the documented config default

The sun_path limit is a byte limit, so the length is now counted under the C locale.
Provision runs the check up front so the reuse path is covered.
The config root default is the documented ~/.config/herdr, and an early server exit rechecks status once before failing.

* no-mistakes(review): Cap server log at 64 KiB; drop config-dir override

* no-mistakes(ci): I fixed both Greptile findings in `bin/fm-herdr-lab.sh`. I ran `tests/fm-herdr-lab.test.sh` and every test passed, including the new ones. I did not check that the new pipe-capture test fails against the old collector. **ci-1 (captured provision can hang).** - Invariant: the log collector must never hold the caller's stdout or stderr open. - The collector now runs as `{ head -c "$cap" > "$server_log"; cat; } >/dev/null 2>&1`. The server pid stays in `$!`. - The log cap is 4096 bytes. One shared value, `fm_herdr_lab_server_log_cap`, now sets both the stored log size and the tail shown in the failure message. - I added `test_captured_provision_returns_promptly`, which captures provision's output through a command-substitution pipe and checks it returns promptly. - I updated the cap test to 4096 bytes and the header comment to match. **ci-2 (XDG_CONFIG_HOME ignored).** - Invariant: the socket-length check must use the same config root herdr resolves. - `fm_herdr_lab_config_dir` now returns `$XDG_CONFIG_HOME/herdr` when `XDG_CONFIG_HOME` is set, and `$HOME/.config/herdr` otherwise. `name`, `prepare` and `provision` all go through `fm_herdr_lab_check_socket_path`, so one change covers all three. - I added tests for a long `HOME` with a short `XDG_CONFIG_HOME` (accepted) and a short `HOME` with a long `XDG_CONFIG_HOME` (refused). - The test file now unsets `XDG_CONFIG_HOME` at the top so the other tests don't depend on the CI environment. - I updated the header comment to match

* test: keep the fake server alive so the captured-output test proves the fix

The fake server exited right after reporting running, so the captured-output test passed without the fix.
It now stays alive and is cleaned up afterwards, and the test fails on the old redirection.
The collector now redirects with exec in a subshell, because a group redirect leaves saved copies of the caller's pipe open.
…claim (kunchenguid#8334)

Claude Code delivers an asyncRewake hook's exit-2 rewake to the session
that launched the hook. When Claude continues a conversation under a new
session id - a backgrounded session resumes with --fork-session under the
same lock-holding front end - the Stop auto-arm firing claimed before the
fork stays alive, descended from the session-lock pid, and open, so every
Stop of the continued session deferred to it, and its eventual rewake was
queued into the abandoned session while the live one stayed idle.

Record the Stop payload's session_id in the generation claim and treat an
arming claim recorded under another session as not open for that firing.
The continued session's next Stop takes the next generation and translates
its own close, and the earlier firing goes silent as any superseded owner
does. A firing from the claim's own session still defers, and claims,
payloads, and guard checks without a session id keep the previous behavior.
…guid#8223)

* feat: let Claude workers hide tools listed in config/crew-exclude-tools

A Claude ship or scout launch now honors a non-empty exclusion list by
passing --disallowedTools, which drops each tool's schema from every model
request. The list still refuses on runtimes that cannot hide tools, and a
token-free live guard checks the installed Claude Code removes the schema.

* no-mistakes(review): skip live Claude guard when no request captured

* no-mistakes(document): Fixed one stale measurement claim in docs/verification/runtime-backends.md: the repeat-consistency sentence contradicted the table's two differing request-byte rows. Reworded it to match. Other exclusion docs (configuration.md runtime table, fm-spawn.sh and fm-exclude-tools-lib.sh comments and refusal text) already reflect Claude support. bin/fm-doc-audience-check.sh passes (141 surfaces, 1193 local links).

* fix: isolate the Claude exclusion live guard from real providers

Run the guard's claude launches in a clean environment with a private
config directory and a synthetic API key so they can only reach the local
capture server, map the capture fixture to the guard for --changed
selection, and run fm_test_cleanup from the guard's EXIT trap.

* no-mistakes(document): Point Claude exclusion trimming note to Validation owner

* no-mistakes(document): Align Claude exclusion docs with validation behavior
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c53754f1-adea-408d-ac77-529541ceca6e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@trillium
trillium merged commit 3b977d2 into main Nov 11, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants