Repository navigation
Conversation
…arness config Pure-local, jq-backed helpers for the codespace-as-crewmate-backend change: lease registry (state/leases.json), github repo resolution, pool FREE detection, label compose/parse, GH_TOKEN loader, cs-harness resolver. 26 offline unit tests (test/cs-lib-test.sh). gh-backed management wrappers included but verified live separately (needs codespace token scope). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fm-cs-setup.sh: idempotent in-codespace cold setup (copilot via npm, no-mistakes via canonical installer, git/gh identity verify), with a READY/INCOMPLETE summary the spawn flow can gate on. Auth/skill steps flagged for live verification. fm-cs-lib.sh: _cs_gh wrapper so codespace ops use GH_TOKEN when a token file is present (path B) and otherwise drop the integration GITHUB_TOKEN to fall back to gh's stored scoped cred (path A, gh auth login -s codespace). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fm-cs-relay.sh holds one persistent SSH tail -F stream of a single remote event file (~/.fm/<id>.events) and demultiplexes it into local state/<id>.status (append) and state/<id>.turn-ended (touch), so the existing file-mtime watcher backbone works unchanged for codespace crewmates. 8 offline tests (test/cs-relay-test.sh) cover stdin demux, live tail -F streaming via an injectable source, and turn-end re-touch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cs_pool_acquire reuses a FREE pooled codespace for the repo or cold-creates one and runs fm-cs-setup; cs_pool_release stops and relabels pooled machines FREE or deletes cold-created ones, dropping the lease either way. cs_pool_recreate_free rebuilds FREE machines after a tool change. Stubbed offline test covers both acquire paths, both release paths, and lease-registry transitions (13 tests). Harden cs-relay-test so the backgrounded relay redirects stdout, so the suite can't hang a CI pipe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cs_pool_free_entry returns name<TAB>displayName for a FREE pool codespace so the pool manager can recover the slot label on release; cs_default_branch resolves a repo's default branch for cold-create. Guard fm-cs-relay.sh main so it can be sourced in tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… env The rfeltis/vscode codespace image ships no gh, and a non-login SSH shell exposes neither the injected GITHUB_TOKEN nor ~/.local/bin. Add a sudo-free gh binary install (latest release resolved from the redirect) and self-source GITHUB_TOKEN + ~/.local/bin from a login shell so the cold-setup auth check is meaningful. Verified live on pool-vscode-02: gh 2.95.0 installed, gh auth ok, READY. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
copilot -i interactive ignores env tokens (needs device-flow login); only -p headless authenticates via the codespace native token. Replace the interactive pane launch with a headless driver loop: cs_push_driver writes ~/.fm/<id>.run.sh which runs the brief once (-p, streamed to the peekable pane), then watches ~/.fm/<id>.inbox and resumes the same copilot session for each steer, appending TURN-ENDED after every turn. Adds cs_session_id, cs_push_driver, cs_send_steer; cs_pane_launch_cmd now launches the driver. Native env auth, no secret propagation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r path gh codespace ssh -- mis-joins a multi-arg remote command (bash -lc "..." split into separate argv ran as a bare interactive bash that exited 0). Pass the remote command as a single quoted argument instead. Also embed the absolute remote run-script path (from cs_push_driver) in the pane launch rather than an escaped $HOME, removing tmux send-keys escaping fragility. Verified live end-to-end: brief turn, peekable pane, steer via cs_send_steer resumes the copilot session (context preserved), TURN-ENDED relayed after each turn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ship/scout crewmates now run their agent INSIDE a leased codespace: resolve the repo from the project origin, cs_pool_acquire (reuse FREE pooled else cold-create + setup), push the brief + driver loop, launch a local tmux pane that SSHes in and runs the driver (peekable/steerable), and start a detached self-restarting relay that mirrors remote ~/.fm/<id>.events to local state. Meta records codespace=, cs_repo=, lease_source=, repo_dir=, session_id=, relay_pid= instead of worktree=. Secondmates stay LOCAL and unchanged; the worktree/treehouse/isolation-guard/turn-end-hook machinery is now secondmate- free (removed, as it was always guarded off for them). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ace crewmates via inbox Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The codespace landed-work gate inferred 'landed' from empty SSH output, so a connection failure or unstarted codespace could pass the gate and delete a cold-created lease holding unpushed work. Require a positive __FM_OK__ sentinel proving SSH reached the repo dir; refuse otherwise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Sorry Kun, I meant to raise this against my own fork. |
umeranjum17
referenced
this pull request
in umeranjum17/juggernaut
Oct 25, 2026
* fix(nm-drain): register and unregister checks with FM_STATE_OVERRIDE unset (#32)
* fix(nm-drain): install registers and unregisters checks with FM_STATE_OVERRIDE unset
fm-check-unregister.sh treats an exported empty FM_STATE_OVERRIDE as set, so install.sh failed at its
unregister step when a caller exported it empty. Run both calls with env -u FM_STATE_OVERRIDE, and add an
install case that exports it empty against stubs that fail if it reaches them.
* no-mistakes(document): Fix stale nm-drain test scope; lint clean
* feat(pipeline-quota-failover): run requested model first in quota failover chain (#29)
* feat(pipeline-quota-failover): requested model first, then the rest of the chain in order
B2: with the pipeline profile set to Muse 1.3 Contributor, a quota error now
fails over to GLM 5.3 Flash, then DeepSeek v4.1 Flash, instead of skipping
the chain models listed before the requested one.
* docs(pipeline-quota-failover): README states the requested-model-first order
* no-mistakes(document): docs: align pi-quota-failover header comment with requested-first order
* fix(host-memory): hold wrapped emulator and Gradle jobs at their memory-gate caps (#34)
* host-memory: move fm-mem-gate.sh and its test verbatim from Main's config
* host-memory: hold wrapped emulator and Gradle jobs at their caps; install step and CI test
The gate matched the emulator and Gradle caps on its first word only, so a job run as
flock L timeout 60 bash -c "emulator ..." started a third emulator on a cap of 2.
It now looks past timeout, flock, nice, ionice, env, exec, NAME=VALUE and bash/sh -c
to the real program. host-memory/install.sh installs the gate under
~/.local/share/fm-host-memory/, and the gate's integration test runs in CI.
* fleet-flow: read the gate policy from the installed host-memory gate when present
Once Main's config/fm-mem-gate.sh is a one-line shim, the capacity census found no
cap defaults in it. It now reads ~/.local/share/fm-host-memory/fm-mem-gate.sh when
installed, else config/fm-mem-gate.sh, and gate_source names the file read.
* no-mistakes(document): docs: name memory gate test in CI-gate list; lint clean
* feat(merge-on-green): auto-merge green yolo PRs through fm-pr-merge (#33)
* feat(merge-on-green): merge a yolo task's PR through fm-pr-merge once checks are green
Watcher check per home: for each state/<task>.meta with yolo=on and a recorded
pr= and pr_head=, gate on fm-crew-state.sh saying checks green / PR ready, then
run fm-checks-lint.sh (PASS required), verify the run receipt (PASS verdict,
head == pr_head, spawn_gen match), and merge through bin/fm-pr-merge.sh only -
no --auto, no direct gh merge, refusals never bypassed or retried in-cycle.
One wake line per merge or refusal; one merge attempt per task per head,
remembered under the add-on's own data dir; silent otherwise; every command
timeout-bounded. install.sh mirrors nm-drain/install.sh; e2e test drives a
fixture home with stub fm-checks-lint / fm-pr-merge / fm-crew-state.
* no-mistakes(review): Reserve merge budget against watcher bound before recording head
* no-mistakes(review): Remember gate refusals per head and reason; wake once
* no-mistakes(review): Align timing contract comments with budget-reservation behavior
* no-mistakes(review): Treat own timeout kills as retried no-attempts, not refusals
* no-mistakes(review): Remember timeout wakes per head and reason like refusals
* no-mistakes(review): Scope timeout-wake contract to evidence gates and merge
* no-mistakes(document): Add merge-on-green section to README catalog
* no-mistakes(ci): Fixed CI check 'Add-on self-checks' (github-check-run:117075290612), which failed ShellCheck SC2002 (useless cat) at three sites in merge-on-green/tests/merge-on-green.test.sh (lines 62, 109, 117 — the only `cat ... | wc -l` instances in the repo, verified by grep). Invariant violated: every add-on script must pass the ShellCheck gate at every severity, per the workflow's own stated policy. Root-cause fix, smallest diff: replaced `cat "$STUB_DIR/lint-calls" [2>/dev/null] | wc -l` with `wc -l 2>/dev/null < "$STUB_DIR/lint-calls" || echo 0` — the identical-count semantics were verified empirically before editing: absent file yields `0` silently (the `2>/dev/null` must precede `<` or the shell's redirect-error line leaks to stderr), existing file yields the unpiped line count, and the `|| echo 0` keeps the `before=$(...)` assignment safe under set -euo pipefail. Applied the same canonical form at all three sibling sites; no workflow exclusion was added, so the style check stays on as the gate requires. Re-traced the ordinary path: the full e2e suite (bash merge-on-green/tests/merge-on-green.test.sh) passes end to end, exercising the absent-file case (test a) and present-file cases (f/j/k); shellcheck -x -e SC2015 on the file is clean under ShellCheck 0.11.0 (stricter than CI's 0.9.0). No behavior outside the three test-count expressions changed
* feat(merge-on-green): skip merge=manual and "not proven" PRs; write the merged status line
maintainer request conditions before merge: a task whose meta says merge=manual is
skipped silently (the lead marks it at intake on destructive, irreversible or
security-sensitive work and on work waiting for the captain's own review), and
a PR whose ## Checks block says "not proven" is skipped silently (filing the
proof gap stays with the lead). Each merge appends the normal
'done [at=<epoch>]: merged <PR URL>' line to state/<task>.status and runs the
fleet-ledger hook, so leads relay it. e2e asserts cover both skips (no body
read / lint / merge / recorded attempt), not proven outside the Checks block,
an unreadable PR body waking once, and the merged line.
* no-mistakes(review): Align condition-(b) skip with the evidence gate's Checks-block grammar
* no-mistakes(review): Stop the not-proven block extraction at bare ## lines like the evidence gate
* no-mistakes(review): Anchor the not-proven skip to evidence lines like the evidence gate
* no-mistakes(review): Skip not-proven PRs from the evidence gate's own PASS
* docs: add FORK-EXIT.md, the fork-exit list for every commit not on Kun's main (#35)
* fix(merge-card): resolve bare Checks evidence names against the task folder before done-done checks them (#37)
On done-done 0.3.0 (no --citation-base) merge-card ran done-done in the work
copy, so every bare evidence name read as missing (ENOENT) even though the files
were in $FM_HOME/data/<task>; the old fallback only rewrote the verdict after the
check had already failed. Now merge-card resolves each relative name in the
Checks block itself and hands it to done-done check --from -, naming the PR
branch as --claim-id. Absolute names stay unchanged; a name still missing is
reported at its resolved path. The e2e stub now models done-done's existence
check and covers the PR 24 shape, an absolute name and a missing name.
* feat(route-change): one command moves dispatch, gate and lead pins together (#38)
* feat(route-change): one command moves dispatch, gate and lead pins to a route
route-change [--dry-run] <fm-home> <route> takes a route from the
pipeline-quota-failover chain (read from the wrapper the gate runs, via the
new PI_QUOTA_FAILOVER_PRINT_CHAIN), refuses a route quota-axi reads exhausted
or quota-failover holds out, backs up every file, moves crew-dispatch.json,
the no-mistakes gate keys and non-Claude lead pins together, then sends one
real request through pi and restores every backup when it fails.
E2E test with a fixture home wired into the add-on CI.
* no-mistakes(review): fix(route-change): match prefixed dead-file entries, keep gate-line comments, refuse unusable quota reading
* no-mistakes(review): ci: provision python3-yaml before the route-change e2e step
* no-mistakes(document): CI job comment now names the route-change test
* pipeline-literal-delete: deliver the literal-path delete rule to pipeline agents (#40)
* pipeline-literal-delete: give pipeline agents the literal-path delete rule at the runtime instruction surface
Pipeline agents never read the worker brief and the gate neutralizes repo
AGENTS.md/CLAUDE.md, so review/test/document/lint steps kept deleting a $VAR
set in an earlier command and losing the step to a delete-guard block.
New add-on delivers the worker rule once, where every pipeline agent in every
home already reads it: a pi extension appending the rule on before_agent_start
(gate agents run with project context files disabled but user extensions load)
and a Claude Code SessionStart hook whose additionalContext carries the rule.
One per-user install covers every FM_HOME and every step; idempotent, .bak
backups, dry-run, no no-mistakes config touched.
Also names the literal-path fix in the delete-guard block message itself, so
any blocked agent (pipeline or not) sees rm -rf -- /tmp/tmp.Ab12 and the
same-command mktemp form instead of retrying.
* test: silence intentional SC2016 (literal $VAR/$(...) text is the subject)
* feat(quota-failover): move limit-stopped pool workers to the next account behind account-pool-autorelaunch (#41)
* feat(quota-failover): move limit-stopped pool workers to the next account behind account-pool-autorelaunch
A worker on a pool account (account= in its meta, usable config/account-pool)
that stops on a limit now moves through bin/fm-control.sh relaunch --account
next while config/account-pool-autorelaunch exists and its tool is in the D1
set fixed in code (Claude Code, Cursor, Pi subscription logins); when that
fails the existing route move runs. Otherwise (file absent, OpenCode Go, Codex
or an OpenAI login) the account only rests once and one wake line names it and
the manual command; check.sh prints that line as the watcher's wake. An
account limit no longer takes the route out of dispatch. Codex stays rest +
wake: OpenAI's consumer terms (effective 1 Jan 2026) bar circumventing rate
limits.
* no-mistakes(review): Key pool rest+wake dedupe on worker generation and wake on rest failure
* no-mistakes(review): Guard pool rest+wake against mid-pass worker relaunch like sibling paths
* no-mistakes(review): Let route-scoped probe evidence mark pool workers' routes out of dispatch
* no-mistakes(review): Dedupe pool rest+wake per stop identity, not label text
* no-mistakes(review): Dedupe rest-failed log+wake on stop identity
* no-mistakes(document): Fix stale pool-worker docs and probe-exception wording
* zai-quota-check: ship the GLM quota wake check with the repeat-signature fix (#43)
Main's state/zai-quota.check.sh (16 Oct) as an add-on: same thresholds, 10 min
read limit, message text and file-argument test mode. Repeat fix: the 5 h step
(fp//10) joins the signature only while the 5 h condition (fp<30, left>45)
holds, otherwise the week step alone - the old fp//10|wp//10 signature woke
about 10 times per 5 h window while the week-ahead condition stayed true all
week. ZAI_QUOTA_MARK names the repeat-state file in test mode so a fixture
sequence can prove the repeat logic. Integration test wired into addons-ci.
* fleet-stall: ship the fleet stall check with the paused-reason match on reason text only (#44)
Main's state/fleet-stall.check.sh (16 Oct) as an add-on: missed-wake guard,
fleet-pause marker, zero-busy guard, 2700 s age, live-lane filter, slot
exclusion and message unchanged. Fix: the paused word list now matches the
reason text with absolute paths, URLs, key=value tokens and [key=...] stamps
removed, so a /home/fixture/users/user-019/.treehouse/firstmate-... evidence path no longer
counts a worker waiting on its own run as waiting on the lead (17:18Z false
stall for muxr and writeboost). FM_STALL_ROOT/FM_STALL_BASE default to the
live paths for the fixture test. install.sh copies the check to
~/.local/share/fm-fleet-stall and writes the home's check as an exec shim.
Integration test wired into addons-ci.
* FORK-EXIT: add the PR 84 row (watch-triage drain-ack retry, diagnostics only) (#45)
* FORK-EXIT: add the PR 84 row (watch-triage drain-ack retry + miss diagnostics)
* FORK-EXIT: name the PR 84 merged commit (5758e520) per MainLead correct
---------
Co-authored-by: firstmate worker <worker@firstmate.local>
* feat(fleet-flow): free lane slots after long external waits and add counted/dry to pulse (#39)
* fleet-flow: move Main's config/fm-flow-check.sh in verbatim
* fleet-flow: long external waits free their lane slot; --summary adds counted and dry
A lane whose last status event is paused, blocked or failed, stamped more than
4 h ago, not waiting on the captain, and still that wait in bin/fm-crew-state.sh
stops counting toward config/lane-caps in fm-flow-check.sh: the --can-start
hard cap and the over-cap line use the counted lanes, and --summary appends
counted and dry (ready = 0 and counted < cap) for the fleet pulse.
install.sh installs the check; the fixture-home test runs in Add-ons CI.
* no-mistakes(review): fix(fleet-flow): skip long-wait probes for --target by moving its exit above the probe block
* no-mistakes(review): fix(fleet-flow): drop committed pycache artifact and ignore __pycache__
* no-mistakes(review): fix(fleet-flow): dry reads working < cap per intent, docs and test aligned
* no-mistakes(review): docs(fleet-flow): add operator install and symlink runbook
* no-mistakes(review): test(fleet-flow): export PYTHONDONTWRITEBYTECODE in check test
* no-mistakes(review): test(fleet-flow): correct dry-case comment to working = 1
* no-mistakes(document): docs: scope fleet-flow dormancy claim to the reader
* no-mistakes(review): fix(fleet-flow): tolerate non-UTF-8 crew-state probe output
* no-mistakes(document): docs: record flow check exit in FORK-EXIT list
* delete-guard: accept plain $NAME and ${NAME} in a same-command mktemp template (#46)
* delete-guard: wake Main only for literal-path blocks outside temp and scratch folders (#47)
The check now wakes only for a block whose target is a literal path, or a
variable the same command set to one, outside temp and scratch folders, from
an agent not itself working in one, and not a repeat the guard already woke
on. Every other block is counted per UTC day in state/delete-guard.counted for
the daily fleet summary. guard.mjs and the blocks are unchanged.
The test replays the 16 Oct log one sweep per row and asserts the only wake is
the 14:22 /home/fixture/users/user-019/mt-test block.
* feat(claude-quota): wake on the burn rate only under 40% of the week, with an install shim (#48)
* claude-quota: add Main's state/claude-quota.check.sh verbatim
Moved from /home/fixture/users/user-019/firstmate/state/claude-quota.check.sh (16 Oct 12:27) unchanged, so the next commit shows only the rule change.
* claude-quota: wake on the burn rate only under 40% of the week, and ship an install shim
Captain 16 Oct 15:00Z: Opus (effort medium) may take build work while the Claude week is at or above 40%, but the
state copy's burn-rate wake ('no new Opus workers') fired on every 10% step of the 5 h window or the week, 14 times
on 16 Oct. The burn rate alone no longer wakes; under 40% one week wake names the action (no new Opus build workers,
leads to the GLM/Go mix, Main reports to the captain) and carries the rate. The 5 h rule is unchanged.
install.sh writes Main's state/claude-quota.check.sh as an exec shim with a backup and re-registers it; the test
replays 16 Oct's readings and drives the install.
* fix(delete-guard): require mktemp delete variable to use the agent's own name (#49)
* delete-guard: rule text and block message name the own-variable requirement
The 21:08:45Z block set TMP=$(mktemp -d ...) and deleted "$TMP" in the same
command: correctly refused (SHELL_VARS never trusts a runtime name - an
inherited value would be deleted), but the rule text and block message never
said the variable must be the agent's own, so the agent could keep retrying
with TMP. One clause in the rule (rule.txt, README, block message); one
blocked and one allowed test case for the reduced shape.
* no-mistakes(document): Fix stale block-message description; lint clean
* fix(claude-quota): week wake fires at or under 40% left, not under 40 (#50)
The captain rule is 40% of the week LEFT: above 40% left stays quiet,
at or below 40% left fires once with the mix change. The check had
low = wp<40, so exactly 40% left stayed quiet. Now wp<=40, wake text
and comments say 'at or under 40% left' (LEFT, never 'use'), the 5 h
rule is unchanged, and the replay covers 41% left (quiet), 40% left
(one wake) and 39% left (no second wake right after 40).
* feat(glm-queue): queue GLM calls locally to cap concurrent Z.AI requests and stop 1302 refusals (#36)
* feat(glm-queue): one local queue in front of Z.AI so GLM calls wait instead of drawing 1302
* no-mistakes(review): Validate GLM_QUEUE_MAX loudly at proxy startup and install.sh
* no-mistakes(review): Add upstream idle timeout, end client response on stream error
* no-mistakes(review): Destroy client socket on truncated upstream responses for fast failure
* no-mistakes(review): Test truncated upstream response fails fast, slot drains
* no-mistakes(document): Document glm-queue fast-fail contract and full test coverage
* no-mistakes(review): Bound glm-queue test clients with timeouts so a wedged queue fails named, not hung
* feat(git-identity): pin lane git identity and refuse pushes of commits made as anyone else (#52)
* feat(git-identity): pin lane git identity and refuse pushes of commits made as anyone else
* docs(fork-exit): cite fork PR 90 for the launch-env hook
* no-mistakes(review): Fix pre-push guard to refuse uninspectable pushes; correct README leak PR list
* feat(fleet-flow): take FM_BIN for the fork helper libraries ahead of the fork shim (#53)
* feat(fleet-flow): take FM_BIN for the fork helper libraries ahead of the fork shim
The fork's bin/fm-flow.sh becomes a thin shim that execs this reader with
FM_BIN pointing at the fork bin/, so the reader resolves fm-classify-lib.sh,
fm-tasks-axi-lib.sh, fm-backlog-transition-lib.sh and the fm-tasks-axi.sh
consumer from ${FM_BIN:-its own directory}, exactly like fleet-dashboard.
The moved test now requires FM_BIN and drives the fork's model/skill readers
from it; the README tells the shim story and retires the parity section.
* docs(FORK-EXIT): cite the merged-flow fork shim PR for the fleet-flow row
* parked-homes: one shared reader parks a secondmate home for every supervision producer (#42)
* feat(parked-homes): one shared reader parks a secondmate home for every supervision producer
config/parked-homes lists parked home ids; the add-on's fm_parked_home reader
gates the supervision session (fm-send steer/answer/nudge), relaunch
(fm-control, remote relaunch, secondmate restart pass), reconcile and reread
nudges, config push (fm-config-push + bootstrap CONFIG_REREAD), pending-reply
retries, the model-outage scan, the wake-loop stall check, and quota-failover.
A parked home gets one log line per skip and nothing else; the fork hook PR
carries only the shim and one predicate call per producer (FORK-EXIT row).
The e2e drives a fixture fleet of two homes, one parked, through every path.
* style(parked-homes): inline the e2e EXIT trap for ShellCheck 0.9 (CI)
* fix(parked-homes): initialize locals in fm_parked_meta_id (set -u) and honor FM_CONFIG_OVERRIDE as the config dir
fm_parked_meta_id declared kind/home/fixture/users/user-015 without values and used an undeclared
line, so under the set -u producers (fm-watch, quota-failover) a meta without
kind= printed unbound-variable noise every pass and a remote secondmate meta
without home= aborted instead of being reported parked. The lead review found
it; both cases are now e2e cases run under set -u. fm_parked_homes_file also
treats FM_CONFIG_OVERRIDE as the config directory itself (the fork-wide
override convention) instead of appending /config twice.
* docs(fork-exit): rows for merged fork PRs 86, 91, 92; mark PR 90 merged (#54)
* README: a one-minute top for new users (#55)
* README: a one-minute top for new users
One-line purpose, who the add-ons are for, one plain line per add-on
with how it wires in, the shortest true install (a loop verified with
--dry-run against a throwaway home), one ran check command per add-on,
and per-add-on removal. The long per-add-on sections move under
Details unchanged.
* README: per-add-on list instead of a table, so phones render it without a cut column
* README review: standalone intro, upstream wording, plain-words add-on one-liners
* README: remove owner details; agnostic for any Firstmate user
* Scrub owner details from add-ons: generic paths, identities, history (#56)
* feat(owner-guard): refuse commits and pushes matching private owner-details patterns (#57)
* Add owner-guard hook: refuse commits and pushes matching private owner-details patterns
New owner-guard add-on shaped like delete-guard: a pre-commit and
pre-push guard matched against the home's private
config/owner-details-patterns (mode 600, never committed), chained
through a new hooks.d hook point in git-identity so every lane
commit runs it. Refusals print file:line plus a placeholder hint
and are final. Fixture test covers refused and clean commits,
refused push, removal-only pass, repo-hook chaining, and the
missing-patterns note.
* no-mistakes(review): Fix owner-guard new-push deadlock, root scans, diff parsing, fail-open
* no-mistakes(review): Scope guard matching to added content only; fix installer comment
* no-mistakes(review): Remove OWNER_GUARD_PATTERNS override; home patterns file only
* no-mistakes(document): Document hooks.d chaining; fix owner-guard shellcheck failures
* no-mistakes(document): Document hooks.d chaining in usage header; tighten owner-guard README
* no-mistakes(document): Wire owner-guard fixture test into CI
* fix(owner-guard): scan added lines that follow a missing trailing newline (#58)
* Fix owner-guard marker match: scan the line after a missing trailing newline
* no-mistakes(document): Fix owner-guard newline scan; add missing README row
* no-mistakes(document): Revert README owner-guard row; lints pass
* feat(owner-guard): daily scan of public repos for owner details (#59)
* feat(owner-guard): daily scan of public repos for owner details
Adds scan-check (once-a-day shallow clone of every fleet public repo,
matched against the private patterns file; one wake line with hit counts
and a private file:line report), install-scan.sh in the fleet-stall shape,
scan-e2e.sh fixture proof, and the README wiring.
* fix(owner-guard): detached scan loop and silent due run
The clone loop cannot finish inside the watcher timeout, so a due run
records the marker, starts the loop detached, and returns with no output.
A finished loop with hits leaves one wake line under state for the next
run to print once. Proof extended for the detached flow.
* fix(owner-guard): keep scan run dir and report owner-only
umask 077 so the copied patterns, the report and the result file are
never group- or world-readable; e2e asserts the report is mode 600.
* feat(owner-guard): extend owner-details guard to plain-shell commits and pushes via global hooksPath (#60)
* Guard owner details in plain-shell commits and pushes via global hooksPath
Point the user's global core.hooksPath at generated per-hook wrappers:
pre-commit and pre-push run the guard first, then chain the previous
global hooks dir and the repository's own hook. Install stays idempotent,
records a replaced global value instead of dropping it, and uninstall
restores it; repo-local config is never touched. Fixture tests cover
plain-shell and lane refusals, clean pass-through, hook chaining, double
install and uninstall.
* Document pipeline push bypass as a known owner-guard limit
The pipeline pins a per-worktree hooksPath and pushes with hooks
skipped, so only its own authored commits are unguarded.
* no-mistakes(review): Pin GIT_CONFIG_GLOBAL in owner-guard tests; assert real hooksPath unchanged
* feat(owner-guard): chain server-side hooks with byte-exact stdin replay (#61)
* fix(owner-guard): chain receive hooks in local bare repos under the global hooks dir
* no-mistakes(review): Replay stdin via here-string so chained hooks' verdicts win; dedupe stdin hook list
* no-mistakes(review): Add post-rewrite to stdin replay set so chained consumers all get git's input
* no-mistakes(review): Capture hook stdin to temp file for byte-exact NUL-safe replay
* no-mistakes(document): Document server-side hook chaining in owner-guard README
* feat(owner-guard): refuse PR merges that add owner details via the home merge gate (#62)
* feat(owner-guard): refuse PR merges that add owner details via the home merge gate
The no-mistakes pipeline pushes its own fix-round commits with client hooks
skipped, so a leak it authors is never checked at commit or push time.
owner-guard now has a merge-gate mode for the home's config/merge-gate
contract: it fetches the PR's exact head and base branch into a scratch
repo and scans every line the PR adds against their merge-base with the
same patterns and refusal text as the commit/push guard. Forge or fetch
failures refuse (nothing merges unscanned); a missing patterns file allows
with one note. install.sh chains the home's existing merge gate behind the
scan (moved aside, restored on uninstall), idempotently.
* no-mistakes(document): Fix merge-card docs for owner-guard merge-gate chaining
* no-mistakes(document): README Check/Remove list owner-guard tests and uninstall
* chore: update pull request (#64)
* feat(pipeline-quota-failover): fail GLM over to Claude Haiku 5.5
The default chain was GLM 5.3 Flash, Go Muse, DeepSeek; Go is locked and
DeepSeek is out, so a quota-dead GLM left the pipeline with no model.
The chain is now zai/glm-5.3-flash, then claude-bridge/claude-haiku-5-5:
GLM stays first, Claude Haiku 5.5 only as its failover, never Opus,
Sonnet, Fable or Step 5.
pi does not list Haiku 5.5 under claude-bridge yet; it runs the id as a
custom model and Claude Code serves claude-haiku-5-5. claude-bridge words
a Claude subscription limit as "Claude rate limit (...): You're out of
extra usage", which matched no quota pattern, so a quota-dead Haiku
would have passed through instead of ending in "quota exhausted"; both
phrasings now count as quota errors.
route-change's journeys pin their own three-route list so they keep
testing route switching independent of the default chain.
* feat(pipeline-quota-failover): skip a quota-dead model for an hour
A dead GLM spends 13-16 min in pi's own retries before the wrapper sees
its quota error, so after GLM runs out every pipeline call would wait
that long before reaching Haiku 5.5. A quota error now leaves a marker
(model and time) under the wrapper's state dir, and later calls skip
that model for PI_QUOTA_FAILOVER_DEAD_SECS (default 3600); after the
window it is tried again, and an answer without a quota error clears
the marker. With every model inside its window the call fails at once
with the terminal "quota exhausted" line and no pi call.
zai-quota-check's advice no longer says to set the pipeline to Muse or
"never Claude for reviews": the pipeline fails over to Claude Haiku 5.5
on its own.
* no-mistakes(document): Align README with skip-window failover; lint clean
* fix(owner-guard): stamp absolute tool paths into hooks and refuse scans on missing tools (#65)
* fix(owner-guard): run hooks without PATH lookups for bash
The global guard hooks started with `#!/usr/bin/env bash`, so every ref
update (git branch fires reference-transaction) failed with
"env: bash: No such file or directory" under a PATH without bash.
install.sh now writes the absolute bash path into each installed wrapper
and copy of owner-guard, plus absolute cat, mktemp and rm paths for the
wrapper, resolved at install time. Chained hooks still get the caller's
environment unchanged.
The scan refuses by name when a scan tool (grep, sed, awk, ...) is not on
PATH, so a missing tool can never read as "no match".
Tests: the global test adds a git-only PATH case (git branch passes, a
commit is refused naming the missing tool). Proof: learn-from-mistakes
apply test with a PATH holding every system tool except bash fails on
main's guard (4 env: bash lines) and passes on this change.
* no-mistakes(document): docs(owner-guard): scope stamped-path claim, list git-only-PATH test
* feat(fleet-dashboard): newest-first asks with sort toggle and typed filter (#66)
* feat(fleet-dashboard): newest-first asks with sort toggle, type tags and type filter
* feat(fleet-dashboard): live Needs you list gets newest-first, sort toggle, type tags and filter
* no-mistakes(review): ask-type rule: pick/choose verbs, approv/merg stems, dual option markers
* no-mistakes(review): Add visible keyboard focus ring to static ask controls
* no-mistakes(document): Update dashboard fork-provenance docs for asks change
* feat(bearings-board): add the Bearings board as a standalone dormant add-on (#63)
* feat(bearings-board): add the Bearings board as a dormant add-on copy
Standalone copy of the fork's Bearings board script and template, with the
milestone fields, evidence thumbnails, home-board links and reconcile choice
the fork's 9ad8e1fb and 08472745 added. It runs against any Firstmate home
named by FM_HOME and calls that home's own lifecycle helpers.
The test is a new behavior suite over stub helpers and a stub lavish-axi;
the fork's process-event and live-Lavish tests stay on the fork. FORK-EXIT
moves the row to dormant copy, fork shim next.
* no-mistakes(review): wire bearings-board test suite into addons CI
* fix(bearings-board): wrap the Captain's Call header at 390 px and show only the last path segment for repo names
The Captain's Call header wrapped its label off-screen at 390 px. Project names
that arrive as a path now show only their last segment, so no home path is shown.
* no-mistakes(document): Aligned FORK-EXIT bearings status punctuation; docs and lint verified clean.
* test(bearings-board): use a placeholder user in the home-path example paths
The owner-details guard refuses the real home user name in the test's example
paths. The example paths now use the placeholder 'you'; the test's meaning is
unchanged.
* fix(fleet-dashboard): wrap long ask text and tag multi-option asks as pick (#67)
* fix(fleet-dashboard): wrap long ask text and tag multi-option asks as pick
Long unbroken URLs in an ask pushed the age past the right edge at 390 px;
the text cells now wrap (overflow-wrap:anywhere, min-width:0) in the static
page, the Needs you view and the overview card.
Ask type reads an optional type column (yn|pick|approval) before the wording,
falling back to inference when it is empty or unknown. The wording rule now
tags three or more comma-separated choices ending in 'or ...?' and single-letter
option markers ('A Foo, C Bar') as pick; plain yes/no wording stays yes/no.
* no-mistakes(review): Document captain-asks.tsv optional fifth type column in fleet-dashboard README
* no-mistakes(document): Ask-type docs already consistent; all lint checks pass
* chore(bearings-board): remove dormant bearings-board add-on (#68)
* chore: remove the bearings-board add-on
Kun's plain board (bin/fm-bearings-board.sh) is the fork's Bearings board.
Nothing in the repo, the live homes, scripts or systemd units calls the
add-on, so drop its folder, its README line, its CI test step and its test
command, and point the FORK-EXIT.md Bearings row at Kun's helper.
* no-mistakes(review): Mark Bearings row dropped in FORK-EXIT.md
* no-mistakes(document): Document Bearings add-on drop and dropped status
* fix(fleet-flow): read captain holds from the backlog in the flow check (#69)
fm-captain-hold.sh hold records the hold on the task's backlog line, not in
the status file, so a captain-held lane still flagged red. A lane whose open
backlog item carries hold-kind captain (active until hold-until) is now
captain-held: no wait or red line. The status-key path is unchanged.
* refactor(sentinel): replace the copied restart supervisor with a thin wrapper (#70)
The sentinel script and its two tests were a verbatim copy of the Firstmate
checkout's files. The add-on now holds only a wrapper that runs the checkout's
bin/fm-sentinel.sh with the same argv, plus a hermetic wrapper test. Copied
upstream lines in sentinel/: 450 before, 0 after.
* refactor(signoff): remove the copied sign-off adapter; add-on holds no code (#71)
* refactor(signoff): remove the copied sign-off adapter; add-on holds no code
The adapter and its journey test were a verbatim copy of Firstmate files (fork
commit 0689b4b9). Upstream has since dropped the sign-off source, and its runner
cannot dispatch an add-on adapter, so the copy cannot run. Removed here, and the
upstream seam is written up for the lead. Recoverable at 33a8de8.
Overlap with current upstream main: 0 whole-line matches before (238 counted
lines), 0 after; the signoff/ folder holds only README.md.
* fix(signoff): restore the sign-off adapter as a thin layer on the Firstmate checkout
The adapter is our own logic and stays in the add-on, dormant until the fork
dispatch hook lands. It now resolves the runner, the keyed-answer intake and the
libraries from the Firstmate checkout (FM_CODE_ROOT, default FM_HOME), not from
its own directory. Its test sources tests/lib.sh from that checkout.
Copied upstream lines: 0 whole-line matches against kunchenguid/firstmate main
c7b7798 in signoff/ (12 idiom lines and 5 test lines rewritten to equivalent
forms; the beads fixture is our own, since upstream exposes no sourceable helper).
The ack-contract drift between upstream and the fork is in the seam record.
* fix(pipeline-quota-failover): skip exhausted routes and fail over on silent calls (#72)
* fix(pipeline-quota-failover): skip exhausted routes and fail over on a silent pi
Before each route, ask quota-axi for its provider; an exhausted_now runway
skips the route without a call and writes its dead marker. quota-axi missing,
slow (10s cap) or failing leaves the route to be tried as before.
A pi call with no stdout and no stderr for PI_QUOTA_FAILOVER_IDLE_SECS
(default 300) is killed (TERM, then KILL) and counts as a quota failure.
A dead marker is cleared only when the attempt answered (exit 0, no
errorMessage); a kill, timeout or other failure keeps it.
* no-mistakes(review): skip routes only on structured exhausted_now match
* no-mistakes(review): add SIGINT idle-path test, real quota-axi rejection stub
* no-mistakes(review): Signal pi's process group on idle and forwarded signals
* fix(pipeline-quota-failover): skip exhausted routes and fail over on a silent pi
Before each route, ask quota-axi for its provider; an exhausted_now runway
skips the route without a call and writes its dead marker. quota-axi missing,
slow (10s cap) or failing leaves the route to be tried as before.
A pi call with no stdout and no stderr for PI_QUOTA_FAILOVER_IDLE_SECS
(default 300) is killed (TERM, then KILL) and counts as a quota failure.
A dead marker is cleared only when the attempt answered (exit 0, no
errorMessage); a kill, timeout or other failure keeps it.
* no-mistakes(review): skip routes only on structured exhausted_now match
* no-mistakes(review): add SIGINT idle-path test, real quota-axi rejection stub
* no-mistakes(review): Signal pi's process group on idle and forwarded signals
* no-mistakes(review): Stop failover when signalled during idle-kill grace
* no-mistakes(review): install signal traps before forking pi
* test(pipeline-quota-failover): fix ShellCheck SC2034 and SC2261 in e2e test
* no-mistakes(review): Forward received INT or TERM to pi; kill orphaned sleep in test 9h
* no-mistakes(review): stop path escalates to KILL, exits 128+signal
* no-mistakes(review): Drop signal forwarding; idle kill signals pi's full tree
* no-mistakes(review): no changes; both findings not legitimate on current code
* no-mistakes(review): Forward INT to pi and wait full grace before KILL
* no-mistakes(review): Simplify run_watched reap loop to single wait
* no-mistakes(document): Document quota pre-check and idle watchdog; fix SC2086
* feat(sentinel): restore the sentinel as the add-on's own code, with install and uninstall (#73)
Restores bin/fm-sentinel.sh from the fork's current file (origin/main of
umeranjum17/firstmate) under sentinel/bin, and removes the PR 70 wrapper and
its test. The sentinel calls the host tool's scripts and libraries from
$FM_HOME/bin and copies none of them.
Adds install.sh and uninstall.sh: install copies the sentinel to the data dir
and points the fm-sentinel user unit at that copy for one home, restarting
the service in the same step; uninstall restores the unit recorded before the
first install and restarts on it. Both are idempotent, and install takes
--dry-run.
Slice 1. The restart tests (dead relaunch, restart resume, live e2e) follow
in slice 2 from commit d670f4e, which holds them.
The fork's reconcile loop guard becomes two `|| continue` statements instead
of one `&&` test, the same logic, so no run of three lines matches upstream.
* fix(pipeline-quota-failover): a stall is not a quota error (#74)
A pi call silent for the idle window was counted as a quota failure, so
the route got a dead marker for 3600s and the whole chain had no model
under host load. A stall now moves on to the next chain model for that
call only and writes no marker; only a real quota error or quota-axi
exhausted_now marks a route dead. A chain that only stalled fails without
the terminal 'quota exhausted' line, so the pipeline may retry it.
The skip log shows the time left for a future-dated marker instead of a
negative age.
* test(sentinel): move the restart tests into the add-on (#75)
Slice 2 of the sentinel restore. Brings the three restart tests from the fork
onto the add-on: dead relaunch (runs without a live host), restart resume (a
real-Herdr lab), and the live Herdr e2e (opt-in). Each sources the fork
checkout's tests/lib.sh through FM_UPSTREAM_ROOT and runs the add-on's
bin/fm-sentinel.sh. Fixture homes symlink the checkout's bin/ because the
sentinel runs the host tool's scripts from FM_HOME/bin.
Only dead-relaunch runs here. restart-resume and the live e2e skip without a
live Herdr and a signed-in Claude.
* fix(fleet-stats): source fm-wake-lib.sh from the Firstmate checkout, not the add-on (#76)
The outcome recorder sourced a sibling fm-wake-lib.sh that only exists in the
fork tree. Source it from FM_BIN, else $FM_HOME/bin, and exit 2 with the path
when it is missing. The library is not copied into the add-on.
* feat(backlog-lock-reclaim): reclaim a 0-byte backlog lock left by a dead tasks-axi writer (#77)
tasks-axi 0.2.6 creates <backlog>.lock with wx and writes its token after;
a writer killed between the two leaves an empty lock that is never reclaimed,
so every later write fails LOCKED. This add-on's watcher check removes a
0-byte lock older than 60 s that no process has open, logs the reclaim, and
prints one wake line. Install and uninstall are delete-guard style.
* fix(fleet-flow): a paused lane whose own run is executing counts as busy (#78)
A lane that waits on its own no-mistakes run writes paused:, so the flow
check's working count (field 3 of --summary, read by the fleet-stall
zero-busy guard, and the --can-start spawn gate) left it out. crew-state reads
the same lane's run-step as working. Probes ran only for paused lanes older
than 4 h and only freed slots, so a busy paused lane never counted.
Paused lanes are now probed at any age; a paused lane whose crew-state reads
working is busy. Blocked and failed waits keep the 4 h rule. fleet-stall gives
the check 20 s, above its 15 s probe deadline, so a slow probe does not read
as no answer.
Repro: fleet-flow test (working count and --can-start) and fleet-stall e2e
(no muxr 0-busy line). Both fail on origin/main.
* fix(pipeline-quota-failover): idle limit 120 s and one retry for a stalled last route (#79)
* fix(pipeline-quota-failover): set the idle limit to 120 s from measured Haiku streams
pi in --mode json streams text and thinking deltas as they are produced:
two Haiku 5.5 calls on a 103 KB review prompt gave 1390 and 1574 events,
with the longest mid-stream gap 12 s. The longest gap of the whole call was
26 s, before pi's first event. So idle is a real liveness signal and the
watchdog stays, but 300 s was far above what a live call ever goes silent for.
120 s is about 4.5x the worst measured gap.
A route that stalls now fails over after 2 min instead of 5. The stall still
writes no quota marker. Adds an e2e case: a route that streams for longer
than its idle limit is not killed.
* fix(pipeline-quota-failover): retry a stall once on the last route
Measured stalls on Haiku were silent calls: no byte on stdout or stderr for 300 s,
then killed. They cluster in time and carry no quota text. When the stalled route
is the last live one, the call failed on its first attempt, and no-mistakes does
not retry a wrapper stall. A stall on the last route now gets one more try on the
same route before failing. A second stall fails as before. e2e 9o covers a route
that is silent on its first call and answers on the next.
* fix(pipeline-quota-failover): GPT-6 Luna fallback, pi without pi-hermes-memory, codex quota mapping (#80)
* fix(pipeline-quota-failover): default fallback is GPT-6 Luna, quota-axi codex mapping, log successes
The claude-bridge Haiku route left the default chain: every pi start waits on
pi-hermes-memory's session_start persistence sync, and the 120 s no-output
watch killed those starts. The chain is now GLM 5.3 Flash, then
openai-codex/gpt-6-luna.
quota-axi knows the openai-codex provider as codex, so the pre-check maps the
pi name before asking; it no longer exits 2 for the fallback route.
Each successful call writes one log line with the model, duration and bytes.
* fix(pipeline-quota-failover): run pi without pi-hermes-memory
pi-hermes-memory's session_start sync runs before pi emits agent_start and kept
pipeline calls silent for 5 s to 134 s on this host, so the 120 s watch killed
them. Every wrapped call now runs pi with -ne plus -e for each extension pi
would load except pi-hermes-memory: user packages from pi list, the user
extensions dir (fm-rm-guard, fm-literal-delete), settings extensions, and the
built-ins minus any settings turn off. An unreadable list runs pi as before
with one log line.
Proof: GPT-6 Luna large review through the wrapper, 17.4 s total, session
header 1.0 s after pi starts, agent_start 82 ms later.
* refactor(pipeline-quota-failover): compact the extension set code and tests
Same behaviour as the previous commit: one listing helper and the built-in list
inline, shorter comments and README, and a smaller extension test block. Keeps
the PR under 300 changed lines against main.
* supervisor-guard: own the supervisor-work guard, zero copied upstream lines (#81)
* feat(supervisor-guard): own the supervisor-work guard; install and uninstall; drop upstream copies
The add-on owns the supervisor-work guard, which upstream Kun does not ship. The
upstream-copied transport and test lines are gone: the scope predicate and the
shell lexer are read from the Firstmate checkout the hook is installed for.
install.sh copies the guard to the user's data dir and merges one PreToolUse
Bash hook into ~/.claude/settings.json; uninstall.sh removes it. Both are
idempotent, take --dry-run, and back up what they change. The guard stays
inert outside a supervisor home and fails open on any missing piece.
* no-mistakes(review): Harden hook array expansion, uninstall no-op, tests, docs
* no-mistakes(review): Drop unused hook args, restore prefilter, align docs
* no-mistakes(review): strip newline continuations from supervisor prefilter
* no-mistakes(review): Remove Grok toolInput fallback from pretool hook
* refactor(supervisor-guard): export decision inline; drop the copied-looking export line
* feat(kill-guard): block kill, pkill and killall outside the caller's own tree (#82)
* feat(kill-guard): block kill, pkill and killall outside the caller's own tree
A worker killed the systemd user manager as a "stray" parent on 18 Oct and
every lane and lab on the host dropped. kill-guard/ is the guard that stops
it: kill, pkill and killall (any signal, kill -9 included) may signal only the
caller's own descendants, found from /proc. PID 1, the systemd --user manager
and the herdr server are always refused, and so is any target the guard cannot
resolve (a $VAR, %job, xargs input, an unknown PID or a pattern it cannot read).
A refusal names the target and tells the worker to write blocked:.
Same hook wiring as delete-guard: guard.mjs (the rule and the Claude hook CLI),
a pi extension, an OpenCode plugin, and install.sh. The Claude hook passes
--caller $PPID so the agent's children are the ones allowed. The e2e test
signals only sleep children and fake named processes it starts itself.
The watcher check and block log are a second slice.
* no-mistakes(review): strip redirections from kill operands; execute adapters in tests
* no-mistakes(review): Close kill -l and unreadable-/proc bypasses
* no-mistakes(review): Judge wrapped kills and refuse ambiguous pkill patterns
* no-mistakes(review): Close nested substitution, killall path and wrapper bypasses
* no-mistakes(review): Trim kill guard to intent, drop heredoc bodies
* fix(kill-guard): judge shell heredoc bodies; narrow heredoc delimiters
Only a letter or underscore delimiter opens a heredoc, so $((1<<2)) never drops a line.
A body fed to bash, sh, zsh or dash is kept and judged, since the shell runs it.
* fix(kill-guard): compare realpaths in the hook entry check; document known gaps
A symlinked install dir made argv[1] differ from the resolved module path, so the hook
exited 0 and allowed every command. The e2e journey now runs the hook through a symlink.
* chore(kill-guard): drop the known-gap README and a repeated PID 1 case
Known gaps move to the PR body; the PID 1 rule stays proven by the sh -c, installed hook and adapter cases.
* no-mistakes(review): Fix kill -l signal-list parsing
* no-mistakes(review): Trim kill guard below the 300-line cap
* test(kill-guard): drop the unused argument pass-through in the install helper
ShellCheck (SC2119/SC2120) flagged inst() forwarding "$@" that no call passes.
* Support multiple supervisor guard homes (#83)
* fix(kill-guard): close the parser bypasses that slice 1 left open (#84)
* docs: correct fork exit audit facts (#85)
* Retry stalled final quota-failover route three times (#86)
* Add uninstall scripts for first add-on slices (#87)
* fix(kill-guard): load in compiled pi, ask for the literal PID, treat quoted text as data, add uninstall.sh (#88)
The pi extension failed to load in the compiled pi binary: guard.mjs's entry check ran realpathSync on argv[1], which is /$bunfs/root/pi there. An argv[1] that does not resolve is now just not this file.
A kill whose PID the shell sets ($pid, $!, %1, $(...)) now asks for the literal PID instead of a final block; a final block anywhere in the command still wins.
Heredoc writes to a *.sh file are data; an unquoted heredoc's $( ) and backticks are checked.
uninstall.sh removes the rule, adapters, the disabled/ pi copy and only the kill-guard hook (backup, --dry-run).
* Add uninstall scripts for next add-on slices (#89)
* Add uninstall scripts for next add-on slices
* Label uninstall test evidence distinctly
* Unregister shared checks through Firstmate
* Weight heavy memory-gate scopes against app.slice (#90)
* Scope heavy memory-gate jobs in weighted slice
* Weight heavy scopes against app slice without replacing caps
* Add uninstallers for remaining add-on slices (#91)
* Allow kill guard targets in task worktree (#92)
* feat(parked-homes): add refusal and skip gates (#93)
* feat(parked-homes): add refusal and skip gates
* test(parked-homes): keep fallback checks shellcheck-clean
* docs(parked-homes): keep fork inventory out of add-on repo
* host-memory: expose optional sampler lifecycle library (#94)
* Protect Herdr from CPU-heavy pane jobs (#95)
* Add fleet read guard for agent tools (#96)
* Add fleet read guard
* Block reads through protected directories and code paths
* Allow non-secret runtime state reads
* read-guard: block only real login paths and path fields (#97)
* read-guard: block only real login paths and path fields
Wildcard-only fragments such as bold markers matched every protected
file, and non-bash tools scanned body text like content. A fragment is
now a glob only when it is rooted at a slash or at a home-relative
prefix, and non-bash tools scan only path-like fields. Adds tests for a
markdown heredoc, a Pi-style write, and a glob through a wildcard home.
* read-guard: scan find patterns as paths too
Pi's find tool takes a glob pattern, so the pattern field is scanned for
find as well as glob. Adds a test for a home-rooted codex login glob.
* read-guard: stop false matches on text-only commands and doc-comment openers (#98)
* read-guard: block only real file access, not text-only commands or doc-comment openers
A bare doc-comment opener fragment is no longer a root-wide glob: a path
glob now needs a literal segment. echo, printf and fm-send.sh may name a
login path as text; substitution, redirects and a ';' chained read still
block. Adds regression cases for both false matches.
* read-guard: a pipe in the command ends the text-only exemption
printf or echo of a login path piped to xargs cat or sh passed the text-only
exemption and then read the file. The exemption now needs the whole command
to have no pipe, backtick, substitution, or redirect.
* Skip captain-held lanes in land actions (#99)
* fix(pipeline-quota-failover): default failover chain to claude-haiku-5-5 (#100)
* pi-quota-failover: default failover to claude-bridge Haiku 5.5 instead of GPT-6 Luna
Both chain models were out of quota, so every fleet pipeline call failed.
Haiku through claude-bridge becomes the GLM failover. The e2e suite pins
the GLM -> GPT-6 Luna pair for its failover cases and checks the new
default chain.
* no-mistakes(review): Reword stale GPT-6 Luna failover comment in wrapper
* feat(pipeline-quota-failover): own idle limit for claude-bridge models (#101)
Add PI_QUOTA_FAILOVER_BRIDGE_IDLE_SECS (default 300) for claude-bridge/*
models; PI_QUOTA_FAILOVER_IDLE_SECS (default 120) keeps applying to every
other model. The kill log line and stall detail name the limit used.
Fleet logs show Haiku calls over claude-bridge answering in 30-166 s, so the
120 s limit killed slow answers and failed whole sign-off reviews.
Tests: e2e cases for a silent bridge route under its limit (not killed), a
silent non-bridge route over its limit (killed), and the bridge kill naming
its own limit.
* feat(pipeline-quota-failover): add DeepSeek Flash to the failover chain (#102)
Default chain is now zai/glm-5.3-flash, deepseek/deepseek-flash, then
claude-bridge/claude-haiku-5-5. quota-axi answers provider deepseek with
no exhausted scope, so the pre-check passes it through unchanged.
* fix(pipeline-quota-failover): DeepSeek hop, GLM off the chain, quota failures move on (#103)
- DeepSeek gets its own idle limit (PI_QUOTA_FAILOVER_DEEPSEEK_IDLE_SECS,
default 300); the generic 120 s watch killed its slow first answers and
moved every call to Haiku.
- Default chain is DeepSeek Flash then claude-haiku-5-5; GLM is removed.
- QUOTA_RE matches Z.AI balance and rate-limit texts and DeepSeek's
Insufficient Balance, so those move on instead of ending the run.
- A call pinned outside the chain runs the chain in chain order, so a
Codex-pinned fix step cannot bypass the failover.
- e2e journey covers the DeepSeek hop, the GLM-free chain, and GLM
quota failures that move on.
* feat(bearings-board): run the Bearings board from the Firstmate checkout as a thin wrapper (#104)
* feat(bearings-board): thin wrapper over the checkout's board (slice 1)
Runs the Firstmate checkout's bin/fm-bearings-board.sh unchanged: no copied
upstream code. Dormant until wired by install.sh. Extras (projects strip,
underway/landed rows, Captain's Call cards, evidence thumbnails) follow in
later slices.
* no-mistakes(review): fix bearings-board install order, uninstall launcher safety, recursion guard, arg forwarding
* no-mistakes(review): uninstall no longer restores a backup naming the launcher
* no-mistakes(review): Found all review findings already fixed; corrected remaining doc claims
* no-mistakes(review): Verified hook symlink/mode and hook-ownership fixes already hold
* no-mistakes(review): install leaves launcher-naming hooks alone; uninstall drops backup grep
* no-mistakes(review): Test install rerun and dry-run paths; warnings already fixed
* no-mistakes(document): Fix bearings-board install doc facts; shellcheck pass
* fix(claude-model-guard): allow Sonnet, keep Fable refused (#105)
* merge-card: move fork merge gate and post-merge hook into the add-on (step A) (#106)
* WIP: extract merge-card adapters and stage integration journey
* test: retain failed merge fixtures and create their data directory
* feat(account-pool): launch-side pool pick and fm-spawn hook as an add-on (fork exit 7, slice 1) (#107)
* feat(account-pool): launch-side pool pick and fm-spawn hook events as an add-on (slice 1)
* test(account-pool): use the exact hook setup line
* lead-wake: move the fork's lead-wake policy into an add-on behind one watch-policy seam (step A) (#109)
* merge-card: refuse a PR merge with no checks-lint PASS row for its head; log the evidence folder on post (#110)
* alerts: serve the model-outage observer from the add-on (step A) (#108)
* alerts: run the model-outage observer from the add-on with fork-bin dependencies; add hook e2e
* alerts: silence SC2317 on the test stubs
* pipeline-quota-failover: fail over on WaitDelay, extension-warning exits and no credit (#111)
* pipeline-quota-failover: free MiniMax OpenRouter route in the default chain (#112)
* pipeline-quota-failover: add free MiniMax OpenRouter route after Haiku; never credit-probe :free models
* pipeline-quota-failover: drop DeepSeek from the default chain
* pipeline-quota-failover: fail over on OpenRouter's 402 requires-more-credits error (#113)
* merge-card: stop passing a bare --judge to done-done 0.4.1 (needs a route) (#114)
* merge-card: skip the card for a merge that declares screen: none (#115)
* brief-inherit: shared worker-instruction include behind a fork seam (step A) (#116)
* wait-timers: run the timer library from the add-on with fork-bin dependencies; add hook e2e (#117)
* receipts: serve acceptance and publisher from the add-on (step A) (#118)
* WIP receipts step A (paused)
* receipts: serve acceptance and brief/meta helpers from the add-on; publisher reads fork libs from fork bin; add hook e2e
* feat(merge-card): attach passed-test receipt to evidence cards (#119)
* merge-card: attach the passed-test receipt (run) to the evidence card when a sealed done-done run backs the pass
* no-mistakes(review): Bind passed-test receipt to merge head and cited file
* no-mistakes(review): Bind passed-test receipts to sealed file bytes; drop line cap
* no-mistakes(review): Scrub local folders from receipt evidence and proof
* no-mistakes(review): test abspath fixture with absolute proof path
* no-mistakes(review): cut passed-test receipt to head-matched clean run only
* no-mistakes(review): restore media gate so receipts never change posting
* no-mistakes(document): Document merge-card passed-test receipt in root README
* test(merge-card): run merge hook e2e against the real fork seam (#120)
* merge-card: run merge-hooks e2e against the real fork seam
* no-mistakes(review): Update merge-card README for merged fork seam
* no-mistakes(document): update merge-card docs for merged fork seam
* fix(alerts): define fm_alerts_push_suppress for the fork's push-transition hook (#121)
* alerts: define fm_alerts_push_suppress for the fork's push-transition hook
* no-mistakes(document): document push-suppress hook in alerts README
* no-mistakes(ci): Root cause: ShellCheck reported SC2317 (unreachable command) on the `fm_meta_get` and `task_captain_call_open` stubs defined inside the push-transition subshell in alerts/tests/model-outage-hook-e2e.sh (lines 73-74). The existing disable directive above that block listed only SC2031 and SC2329. Fix: added SC2317 to that directive in alerts/tests/model-outage-hook-e2e.sh. The stubs are invoked indirectly by the sourced hook, so the directive is accurate. Verified locally: the edited file and alerts/bin/fm-model-outage-lib.sh pass `shellcheck -x -e SC2015,SC1091`, and a full run of the CI ShellCheck loop over all 148 add-on bash scripts reports zero failures. Local shellcheck is 0.11.0 while CI uses 0.9.0, so the full loop was not run on the CI version. I did not run the e2e test itself because it needs FM_TEST_FORK. The declined simplify-push-suppress-guard item was not touched
* test(brief-inherit): compare e2e against a pinned pre-seam reference (#122)
* test(brief-inherit): compare against a pinned pre-seam reference, not the live fork checkout
* no-mistakes(review): harden pre-seam patch and compute seam presence once
* no-mistakes(document): Update brief-inherit README for pinned pre-seam reference
* feat(owner-rules): refuse a lane brief with no owner ask or no-mistakes without a risk reason (#123)
* feat(owner-rules): merge gate refuses a merge with no done-done receipt (#124)
* feat(owner-rules): merge gate refuses a merge with no done-done receipt
* test(owner-rules): silence SC2119/SC2120 on the gate helper
* feat(owner-rules): leads skill stating both rules, the refusal lines and their fixes (#125)
* feat(owner-rules): merge gate refuses a merge with no checks-lint PASS for the PR head (#126)
* feat(owner-rules): merge gate refuses a merge with no checks-lint PASS for the PR head
* fix(owner-rules): skill quote matches the lint refusal; test counts four
* feat(owner-rules): name the skill firstmate-addons-owner-rules (#127)
* fix(owner-rules): install line links firstmate-addons-owner-rules (#128)
* feat(merge-card): accept a sealed clean run from done-done's default evidence root (#129)
receipt_run asks done-done (doctor) for its evidence root and also reads
<root>/*/.done-done/runs; the per-task lookup and acceptance test are kept,
and with no done-done only the task folder counts.
* test(alerts): port the model-outage scan cases from the fork (#130)
* feat(receipts): fm_receipts_accept_done, call-site signatures for inherit and promote (#131)
* Test wait timers with post-step-B fork hooks (#132)
* fix(sentinel): restore recorded Claude models after restart (#133)
* fix(sentinel): reconcile model mismatches in lead homes (#134)
* Require fleet evidence cards before PR merges (#135)
* Accept sign-off evidence commit in owner gate (#138)
* Replace dismissed merge evidence cards (#139)
* Inherit fleet board from main home (#137)
* Inherit fleet board from main home
* Fix board fallback test lint
* Keep merge-card media in task evidence folder (#136)
* Post merge evidence per PR head (#140)
* Add Firstmate sign-off engagement route (#141)
* Show captured command output on text evidence cards (#142)
* test: cover wait timer Main escalation hook (#143)
* test: cover wait timer main escalation hook
* test: run focused wait escalation journey in CI
* fix: record task-owned device processes in kill guard (#144)
* feat: refuse blocked status lines that declare waits (#146)
* feat(merge-on-green): route checks lint through done-done (#147)
* test(owner-rules): verify evidence gate contract (#145)
* fix: normalize trailing status verb colon (#148)
* Refuse sentinel relaunch without stored model (#150)
* fix(merge-on-green): resolve lint input paths and receipts (#149)
* fix(addons): reverse parked homes and owner guard installs (#151)
* fix(addons): reverse parked homes and owner guard installs
* test(addons): isolate uninstall journeys from user homes
* test(addons): isolate quota failover uninstall home
* Fail clearly when owner guard is missing (#152)
* Fail clearly when owner guard is missing
* Add owner guard installation doctor
* fix(addons): use moved receipt publisher path (#153)
* fix(addons): use moved receipt publisher path
* test(addons): exclude regression test from scan
* Make owner-rules card hint runnable across homes (#155)
* Add private captain chat TSV extractor (#154)
* Add private captain chat TSV extractor
* Filter injected chat transcript wrappers
* Filter Firstmate wake text from chat backfill
* Filter system-style transcript XML wrappers
* Add fleet-pulse chat TSV refresh hook (#156)
* Add incremental fleet-pulse refresh hook
* Add done-done proof for fleet-pulse refresh
* Add fleet pulse gate audit (#157)
* test(owner-rules): match stable checks-lint refusal (#158)
* Add stable Firstmate pane titles (#159)
* Fix quota failover screen matching (#160)
* Fix quota failover screen matching
* Add done-done proof for quota failover
* Keep quota proof out of code-only journey detection
* Make failover proof captures judgeable
* pipeline-quota-failover: pin the pipeline route to the OpenRouter DeepSeek floor route (#161)
* pipeline-quota-failover: pin the pipeline route to the OpenRouter DeepSeek floor route
The no-mistakes config holds agent_config.pi.model =
openrouter/deepseek/deepseek-v4.1-flash-1017:floor, but the wrapper's
default chain was claude-bridge/claude-haiku-5-5 then
openrouter/minimax/minimax-m3.1-flash:free. A pinned model outside the
chain does not run, so the config's route was not the route that ran: the
pipeline answered through claude-bridge while the config named the
OpenRouter DeepSeek floor route.
The default chain is now that one route, so the config's route is the
route that runs. An openrouter/* route also takes the deepseek idle
limit (300 s) instead of the generic 120 s one, because the floor route
answers on the same clock as direct DeepSeek.
The route fixture test pins the chain, the off-chain pin and the idle
class; the add-on README and the root README record the route and the
daemon environment caveat: the OpenRouter key lives only in the systemd
user manager environment, so after a reboot or a manager restart it has
to be re-imported from ~/.config/openrouter/api_key before the daemon
starts. The key is never copied into a file and never printed.
* pipeline-quota-failover: add the done-done route journey and its proof script
The verify skill names the persisted pipeline route as a feature, so
done-done needs a journey that drives it: run-proof.sh captures the
chain the wrapper holds and the fixture journey's output in the
evidence root, with a result.json summary and the exit code of each
capture. The route feature file names the paths the journey covers.
* pipeline-quota-failover: capture the route proof in the names the PR cites
The judge checks that every cited evidence file is tied to a done-done
run, so the journey now captures exactly the files the Checks block
names: the chain the wrapper holds, the live config's agent and model
read-only next to that chain, the fixture journey's output and the same
journey against the wrapper in main, which must fail.
* pipeline-quota-failover: persist the pipeline agent and route switch (#162)
* pipeline-quota-failover: persist the pipeline agent and route switch
The no-mistakes pipeline agent is global: every step (intent, rebase,
review, test, document, lint, push, PR, CI) runs the configured `agent`,
and a route that is not the one the config names changes what the whole
pipeline runs on. Switching that by hand meant editing the config
without a backup, without a check that the model actually answers, and
without a way back.
switch.sh does the switch the safe way: it edits only the two keys by
name (agent, agent_config.<agent>.model), leaves every other key, value
and comment alone, writes a timestamped backup next to the config first,
and keeps the backup's version unless a real request on the model
answers PONG. --dry-run prints the planned edit and writes nothing,
--restore-latest puts the last backup back. The script is persisted
byte-identical from the copy that runs this host's pipeline.
The test drives the real script against a fixture config and a stub pi:
the two keys change and nothing else does, a backup is written, a model
that does not answer PONG leaves the config alone, and the backup
restores it. The default model is the pipeline route the wrapper's
chain holds.
* pipeline-quota-failover: group the switch test with its add-on checks, restore the CI file's trailing newline
* Insights: name each waiting task's recorded reason, count parked apart from open (#164)
* Insights: show each waiting task's recorded reason and count parked work apart from open
* Insights: split recorded waits by real reason; Open counts active only
* Add done-done journey for the Insights wait-reasons card
* run-proof: stop the browser it started
* claude-accounts: quota reader and dashboard card (slice 1) (#165)
* claude-accounts: quota reader for every signed-in Claude account, plus dash…
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
… line into the account degrade pin (kunchenguid#148) * fix(bin): strip agent co-author trailers from the squash commit message (kunchenguid#136) * fix(bin): strip agent co-author trailers from the squash commit message GitHub composes the default squash message from every commit in the PR and appends a hoisted Co-authored-by block, so a trailer removed from the branch tip came back at merge time: main 1574bc8 landed "Co-authored-by: Cursor" from a branch whose tip had been cleaned. bin/fm-pr-merge.sh now supplies the squash body itself. It reads the forge's own merge-box body, drops Claude-Session trailers and every Co-authored-by trailer whose identity names an agent, and passes the result back as --body-file. Human co-authors are preserved, every other line is byte identical, and the separator and blank lines an emptied trailer block leaves behind are cleaned up. A body the caller supplies is sanitized the same way; merge and rebase merges compose no message. A message that cannot be read refuses the merge rather than letting the forge compose one this path cannot sanitize. The body is read with gh rather than gh-axi because gh returns the message verbatim while gh-axi's api wrapper re-renders and may truncate it, the same reason bin/fm-pr-check.sh reads the head commit with gh. * no-mistakes(review): harden squash body sanitizing: short flags, bots, null body * no-mistakes(review): revert short merge flags, replace bot rule with vendor domains * no-mistakes(review): describe the vendor noreply mailbox without a literal address The public-repo leak guard flags any real email address in tracked files, and the strip_agent_trailers comment spelled one out as its example. Reword the example so the guard passes while the comment still says which mailbox shape the vendor-domain rule covers. * feat(pi): port Calm mode and add a Cursor Grok 4.5 primary profile (kunchenguid#141) * feat(pi): port Calm mode and add a Cursor Grok 4.5 primary profile Two primary-session ergonomics changes. Calm: `.pi/extensions/fm-calm.ts` and its four library modules come across from upstream with the minimum adaptation needed to load beside this fork's turn-end guard and watcher extensions. `/calm` hides tool calls, tool results, collapsed thinking, mid-turn working notes, and Firstmate's own operational rows, and replaces Pi's stock working row with a boat sailing a rippling waterline while a run is active. The choice persists in this home's gitignored `config/calm`. The only behavior adaptation is in `.pi/extensions/lib/fm-operational-input.ts`, which gains the `kind` bridge the operational-user row needs. Its result is stripped of the framing newline that `bin/fm-operational-input.sh` prints, which upstream leaves attached; every command but `encode` prints exactly one value, so that newline is framing rather than data. Verified live on Pi 0.80.10 in a throwaway project outside any Firstmate checkout: all four project extensions load together, `/calm` toggles and persists, the boat replaces the stock working row only while a run is active, and the turn-end guard and watcher extensions still write their load markers from the same Pi process. `docs/calm.md` carries that transcript. `tests/fm-calm-extension.test.sh` drives the real extension factory, the visibility rules, and the boat animation against the installed Pi package. cursor-grok45: `agent --yolo --model cursor-grok-4.5-high` keeps the previous Grok generation launchable. It shares every mechanic with the certified cursor-grok profile - the same `.claude/settings.json` hook set, version warning, login gate, session lock, and `FM_PRIMARY_HARNESS=cursor` - and the test compares the two launches field by field so the model id stays the only difference. The certified profile is untouched, and `cursor` still resolves to it. `agent --list-models` confirmed the model id on Cursor CLI 2026.09.02-c22c1a3. * no-mistakes(review): skip calm test when node lacks native type stripping * no-mistakes(document): docs: point config/calm AGENTS entry at its owner * fix(test-run): map the Calm extension modules to their owning tests The two Calm layout modules are only reached through the fm-calm.ts factory, so the by-path grep resolver found no owner and the declared-fork-surface check refused the change. Name the calm suite and the strict type check as explicit owners for fm-calm.ts and every lib/fm-calm-*.ts module. * feat(bin): cap every future session's auto-compaction window at 500k tokens (kunchenguid#144) * feat(bin): cap every future session's auto-compaction window at 500k tokens Captain's order 2026-09-13: set the context window for Claude Code, Pi, Codex and Cursor to 500k so an orchestrator compacts itself instead of being managed by hand, for future launches only, leaving everything already running alone. bin/fm-primary.sh and bin/fm-spawn.sh are the single owners of launch mechanics, so the cap is applied there and nowhere else. It never reaches the captain's global config or a pinned account's config for any harness. Claude Code: export CLAUDE_CODE_AUTO_COMPACT_WINDOW=500000 on the primary launch and as an env prefix on the worker launch line. claude 2.1.270 reads that variable directly, reports the window as "<n> tokens (from CLAUDE_CODE_AUTO_COMPACT_WINDOW)", says it takes precedence over the autoCompactWindow setting, and resolves to min(model maximum window, value). Codex: -c model_auto_compact_token_limit=500000 on both launch lines. codex-cli 0.154.0 accepts the key (codex debug models -c model_auto_compact_token_limit=500000 exits 0) and types it (the same key with a string value exits 1 with `invalid type: string "nope", expected i64`). Pi: nothing is passed. pi 0.80.10 has no context-window or auto-compaction launch knob; its trigger is contextTokens > contextWindow - reserveTokens, where contextWindow comes from the model catalog and reserveTokens exists only in a settings file. Cursor: nothing is passed. The Cursor CLI 2026.09.02-c22c1a3 exposes no context or compaction setting; contextWindowSize appears only in its token-usage display, and the bracket parameters offered for grok-4.6 are effort and fast. docs/configuration.md gains a "Context window" section carrying one sentence of evidence per harness. Tests pin the emitted env and flag for each of the four, including the two that deliberately stay bare, on both launch paths. * docs(configuration): note Pi's pinned model already sits inside the 500k cap Pi has no launch knob to cap, so record where it actually lands today: its pinned primary model openai-codex/gpt-5.6-sol declares a 272,000-token window, which is well under the cap. Marked as an observation about today's model rather than a guarantee, since a future Pi model above 500k would compact late and there would still be no launch knob to prevent it. * no-mistakes(review): fix stale watcher doc and narrow bare-launch test assertion * no-mistakes(document): note direct launches skip the compaction cap * test(fm-spawn-account): carry kunchenguid#144's launch line into the account degrade pin Merging main brought kunchenguid#144, which prefixes the claude worker launch line with CLAUDE_CODE_AUTO_COMPACT_WINDOW=500000. That pull request updated the two launch expectations it could see in this file, but the account-library degrade pin is fork material that exists only on the integration branch, so its expectation was never updated. Both sides merged cleanly because the hunks do not overlap, and the pin then failed for the wrong reason: the launch line had changed, not the degrade guarantee. The pin's claim is that an absent bin/fm-account-lib.sh leaves the launch line byte-identical to a spawn from before account pinning existed, and the baseline for that claim is test_absent_registry_changes_nothing in the same file. Matching its expectation restores the claim rather than weakening it, and a comment now records that the two must move together, since that coupling is what this failure was. The pin still discriminates. With the guarded hook mutated to pin a Claude home even when the library is absent, which is the regression it exists to catch, it fails with exactly this message. A sweep of the remaining launch-line expectations found no other stale exact-match: the three other references assert a substring and are unaffected by a prepended variable.
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…d#156) * fix(bin): strip agent co-author trailers from the squash commit message (kunchenguid#136) * fix(bin): strip agent co-author trailers from the squash commit message GitHub composes the default squash message from every commit in the PR and appends a hoisted Co-authored-by block, so a trailer removed from the branch tip came back at merge time: main 1574bc8 landed "Co-authored-by: Cursor" from a branch whose tip had been cleaned. bin/fm-pr-merge.sh now supplies the squash body itself. It reads the forge's own merge-box body, drops Claude-Session trailers and every Co-authored-by trailer whose identity names an agent, and passes the result back as --body-file. Human co-authors are preserved, every other line is byte identical, and the separator and blank lines an emptied trailer block leaves behind are cleaned up. A body the caller supplies is sanitized the same way; merge and rebase merges compose no message. A message that cannot be read refuses the merge rather than letting the forge compose one this path cannot sanitize. The body is read with gh rather than gh-axi because gh returns the message verbatim while gh-axi's api wrapper re-renders and may truncate it, the same reason bin/fm-pr-check.sh reads the head commit with gh. * no-mistakes(review): harden squash body sanitizing: short flags, bots, null body * no-mistakes(review): revert short merge flags, replace bot rule with vendor domains * no-mistakes(review): describe the vendor noreply mailbox without a literal address The public-repo leak guard flags any real email address in tracked files, and the strip_agent_trailers comment spelled one out as its example. Reword the example so the guard passes while the comment still says which mailbox shape the vendor-domain rule covers. * feat(pi): port Calm mode and add a Cursor Grok 4.5 primary profile (kunchenguid#141) * feat(pi): port Calm mode and add a Cursor Grok 4.5 primary profile Two primary-session ergonomics changes. Calm: `.pi/extensions/fm-calm.ts` and its four library modules come across from upstream with the minimum adaptation needed to load beside this fork's turn-end guard and watcher extensions. `/calm` hides tool calls, tool results, collapsed thinking, mid-turn working notes, and Firstmate's own operational rows, and replaces Pi's stock working row with a boat sailing a rippling waterline while a run is active. The choice persists in this home's gitignored `config/calm`. The only behavior adaptation is in `.pi/extensions/lib/fm-operational-input.ts`, which gains the `kind` bridge the operational-user row needs. Its result is stripped of the framing newline that `bin/fm-operational-input.sh` prints, which upstream leaves attached; every command but `encode` prints exactly one value, so that newline is framing rather than data. Verified live on Pi 0.80.10 in a throwaway project outside any Firstmate checkout: all four project extensions load together, `/calm` toggles and persists, the boat replaces the stock working row only while a run is active, and the turn-end guard and watcher extensions still write their load markers from the same Pi process. `docs/calm.md` carries that transcript. `tests/fm-calm-extension.test.sh` drives the real extension factory, the visibility rules, and the boat animation against the installed Pi package. cursor-grok45: `agent --yolo --model cursor-grok-4.5-high` keeps the previous Grok generation launchable. It shares every mechanic with the certified cursor-grok profile - the same `.claude/settings.json` hook set, version warning, login gate, session lock, and `FM_PRIMARY_HARNESS=cursor` - and the test compares the two launches field by field so the model id stays the only difference. The certified profile is untouched, and `cursor` still resolves to it. `agent --list-models` confirmed the model id on Cursor CLI 2026.09.02-c22c1a3. * no-mistakes(review): skip calm test when node lacks native type stripping * no-mistakes(document): docs: point config/calm AGENTS entry at its owner * fix(test-run): map the Calm extension modules to their owning tests The two Calm layout modules are only reached through the fm-calm.ts factory, so the by-path grep resolver found no owner and the declared-fork-surface check refused the change. Name the calm suite and the strict type check as explicit owners for fm-calm.ts and every lib/fm-calm-*.ts module. * feat(bin): cap every future session's auto-compaction window at 500k tokens (kunchenguid#144) * feat(bin): cap every future session's auto-compaction window at 500k tokens Captain's order 2026-09-13: set the context window for Claude Code, Pi, Codex and Cursor to 500k so an orchestrator compacts itself instead of being managed by hand, for future launches only, leaving everything already running alone. bin/fm-primary.sh and bin/fm-spawn.sh are the single owners of launch mechanics, so the cap is applied there and nowhere else. It never reaches the captain's global config or a pinned account's config for any harness. Claude Code: export CLAUDE_CODE_AUTO_COMPACT_WINDOW=500000 on the primary launch and as an env prefix on the worker launch line. claude 2.1.270 reads that variable directly, reports the window as "<n> tokens (from CLAUDE_CODE_AUTO_COMPACT_WINDOW)", says it takes precedence over the autoCompactWindow setting, and resolves to min(model maximum window, value). Codex: -c model_auto_compact_token_limit=500000 on both launch lines. codex-cli 0.154.0 accepts the key (codex debug models -c model_auto_compact_token_limit=500000 exits 0) and types it (the same key with a string value exits 1 with `invalid type: string "nope", expected i64`). Pi: nothing is passed. pi 0.80.10 has no context-window or auto-compaction launch knob; its trigger is contextTokens > contextWindow - reserveTokens, where contextWindow comes from the model catalog and reserveTokens exists only in a settings file. Cursor: nothing is passed. The Cursor CLI 2026.09.02-c22c1a3 exposes no context or compaction setting; contextWindowSize appears only in its token-usage display, and the bracket parameters offered for grok-4.6 are effort and fast. docs/configuration.md gains a "Context window" section carrying one sentence of evidence per harness. Tests pin the emitted env and flag for each of the four, including the two that deliberately stay bare, on both launch paths. * docs(configuration): note Pi's pinned model already sits inside the 500k cap Pi has no launch knob to cap, so record where it actually lands today: its pinned primary model openai-codex/gpt-5.6-sol declares a 272,000-token window, which is well under the cap. Marked as an observation about today's model rather than a guarantee, since a future Pi model above 500k would compact late and there would still be no launch knob to prevent it. * no-mistakes(review): fix stale watcher doc and narrow bare-launch test assertion * no-mistakes(document): note direct launches skip the compaction cap * feat(bin): add Deepgram desk floater with speak-out preference and voice mailbox (kunchenguid#155) * Add Deepgram desk floater with speak-out preference and voice mailbox. Wire fm-speak to Deepgram Aura when DEEPGRAM_API_KEY is present (say fallback), and ship a Mac push-to-talk floater that delivers transcripts into a durable desk-voice inbox plus wake for this home's single primary. * no-mistakes(review): fix floater env, PTT race, empty deliver, curl key, pipe hang * no-mistakes(review): restore click-to-talk toggle alongside hold-to-talk * no-mistakes(document): docs: index desk-floater and Deepgram keys * fork-surface: declare the desk-floater-voice capability The Deepgram desk floater added ten fork-only paths without a [capability] block, so bin/fm-fork-surface.sh check and the fm-fork-surface test in the portable serial shard both failed. * ci: own the Deepgram STT and floater paths, and stop the arm self-evict flake The "Declared fork surface" job died on bin/fm-deepgram-stt.sh (and would have died next on bin/fm-desk-floater.sh and desk-floater/*) because no test referenced them. Cover the STT helper with a mocked curl (transcript, --json, HTTP failure, key never in argv), cover the floater launcher's --help and option refusal, and map the Swift package paths to the desk voice suite. The portable serial shard failed in tests/fm-watcher-lock.test.sh: the arm-self-eviction test set FM_ARM_CONFIRM_TIMEOUT=1, so a loaded runner hit "no live watcher with a fresh beacon" before "started" was ever printed. Use the arm's default confirm bound like its sibling tests, stop polling as soon as the arm exits, and include the arm output in the failure. * ci: let the self-evicted arm finish its successor wait before judging it The previous fix left the arm on its default confirm bound, but after the lock takeover the arm waits that full bound (plus a rounding second) for a healthy successor before it fails. The test still gave it eight seconds to exit, so a correctly loud arm was reported as a timeout (status 124) on every run. Widen the exit wait past the arm's own bound. * fix(fork-surface): record the squash-merge commit for desk-floater-voice Main's kunchenguid#155 recorded its pre-squash branch commit (a059107) in the desk-floater-voice capability. The squash merge orphaned that commit, so bin/fm-fork-surface.sh check and tests/fm-fork-surface.test.sh both refused the merged tree. Record the squash-merge commit 389a48e instead, as the check's own message instructs.
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…unchenguid#141) * feat(pi): port Calm mode and add a Cursor Grok 4.5 primary profile Two primary-session ergonomics changes. Calm: `.pi/extensions/fm-calm.ts` and its four library modules come across from upstream with the minimum adaptation needed to load beside this fork's turn-end guard and watcher extensions. `/calm` hides tool calls, tool results, collapsed thinking, mid-turn working notes, and Firstmate's own operational rows, and replaces Pi's stock working row with a boat sailing a rippling waterline while a run is active. The choice persists in this home's gitignored `config/calm`. The only behavior adaptation is in `.pi/extensions/lib/fm-operational-input.ts`, which gains the `kind` bridge the operational-user row needs. Its result is stripped of the framing newline that `bin/fm-operational-input.sh` prints, which upstream leaves attached; every command but `encode` prints exactly one value, so that newline is framing rather than data. Verified live on Pi 0.80.10 in a throwaway project outside any Firstmate checkout: all four project extensions load together, `/calm` toggles and persists, the boat replaces the stock working row only while a run is active, and the turn-end guard and watcher extensions still write their load markers from the same Pi process. `docs/calm.md` carries that transcript. `tests/fm-calm-extension.test.sh` drives the real extension factory, the visibility rules, and the boat animation against the installed Pi package. cursor-grok45: `agent --yolo --model cursor-grok-4.5-high` keeps the previous Grok generation launchable. It shares every mechanic with the certified cursor-grok profile - the same `.claude/settings.json` hook set, version warning, login gate, session lock, and `FM_PRIMARY_HARNESS=cursor` - and the test compares the two launches field by field so the model id stays the only difference. The certified profile is untouched, and `cursor` still resolves to it. `agent --list-models` confirmed the model id on Cursor CLI 2026.09.02-c22c1a3. * no-mistakes(review): skip calm test when node lacks native type stripping * no-mistakes(document): docs: point config/calm AGENTS entry at its owner * fix(test-run): map the Calm extension modules to their owning tests The two Calm layout modules are only reached through the fm-calm.ts factory, so the by-path grep resolver found no owner and the declared-fork-surface check refused the change. Name the calm suite and the strict type check as explicit owners for fm-calm.ts and every lib/fm-calm-*.ts module.
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.
Summary
Migrates the crewmate execution backend for project ship/scout tasks from local treehouse git worktrees to leased GitHub Codespaces. Each project crewmate now runs its Copilot CLI harness inside a leased codespace, driven from a local tmux pane over
gh codespace ssh, with a relay bridging remote status back to local state. Secondmates remain local treehouse worktrees — unchanged.What changed
New backend infrastructure (prior commits):
bin/fm-cs-lib.sh— lease registry, repo/pool helpers, dual-authghwrapper, token/harness config, headless copilot driver-loop spawn helpers (cs_push_brief,cs_push_driver,cs_send_steer,cs_pull_report, …).bin/fm-cs-setup.sh— codespace cold-setup (installs user-localghwhen the image lacks it).bin/fm-cs-relay.sh— remote→local status / turn-end bridge over a persistent SSHtail -F.bin/fm-cs-pool.sh— pool acquire/release (reuse FREE pooled lease, else cold-create).cs-lib(35),cs-pool(13),cs-relay(8) — all green.Rewired existing scripts to the codespace backend:
fm-spawn.sh— ship/scout lease a codespace, push brief+driver, create SSH pane, detached relay supervisor; refuseslocal-only(no GitHub repo ⇒ no codespace).fm-teardown.sh— codespace teardown branch with a fail-closed landed-work check (requires a positive__FM_OK__SSH sentinel; an SSH failure no longer reads as "landed").fm-send.sh— steers codespace crewmates via the remote inbox file (the headless driver loop can't be reached bytmux send-keys).fm-review-diff.sh,fm-pr-check.sh— run their diff / HEAD / PR checks over SSH inside the lease.fm-brief.sh— ship/scout briefs rewritten for the codespace model (remote events/report paths; ship resets to a clean default branch before branching).fm-tangle-lib.shdeleted; refs removed fromfm-guard.sh,fm-bootstrap.sh) — project crewmates no longer touch local worktrees.AGENTS.mdrewritten for the codespace-lease model (CLAUDE.md symlink unchanged).Notes for the reviewer
local-onlyprojects are now unsupported on this backend (they have no GitHub repo to lease a codespace from);fm-spawnrefuses them with a clear message.code-reviewpass was used as the substitute; it found one high-severity fail-open bug in the teardown landed-check, now fixed (__FM_OK__sentinel, fail-closed).🤖 Generated with GitHub Copilot CLI