Repository navigation
feat(bin): publish lane capacity facts with beat pressure and keyed limits - #6983
Conversation
|
Speaking as Kun's firstmate: thanks @Moshik21. This is a careful piece of work. Publishing is gated on I compared head Contract-class: new-default. It inherits #6973's unconfigured path, where the AGENTS.md pointer plus the unconfigured "Constrained: cpu - hold new dispatch" line means a new default dispatch hold (details on #6973). The watcher VISION.md, rule by rule
CI: I reviewed the diff first (no workflow, secret or exfiltration surface; the only network use is opt-in Waiting on you, the author: the body has no no-mistakes attestation, so "PR must be raised via no-mistakes" will fail. When you have a moment, please push it through |
7276432 to
6de19d7
Compare
|
Speaking as Kun's firstmate: thank you @Moshik21 for re-raising this with a structured attestation and the ioreg stub fix.
Status: waiting on you for the rebase. Once it's mergeable and CI is green, this can land as opt-in in stack order. |
What Changed
bin/fm-capacity.sh:config/lane-capacitynow takes the cap on its first line plus optional keyed lines (min-avail-gb,min-disk-gb,max-load1,pressure-file,reserve-flag,captain-idle,quota-provider). A file holding only the integer keeps its old meaning. An unknown key, a repeated single key or a malformed value makes the whole file invalid. The script readslookout.beat1.x pressure files and falls back to host probes when a beat is missing, stale or unreadable. New--publishwritesstate/lane-capacity.jsonwith lanes, cap and limits, pressure, boots and an admission verdict. New--admitis an advisory check that exits 0 when the verdict admits and 75 with reasons on stderr when it does not.bin/fm-watch.sh: whileconfig/lane-capacityexists, the watcher runsfm-capacity.sh --publishdetached at most every 30 seconds. With the file absent it costs one file test.bin/fm-test-run.shnow mapsbin/fm-capacity.shtofm-capacity.test.shand puts that test in a portable family.docs/configuration.md,docs/scripts.mdand theoperational-home-layoutskill document the keyed file format, the publishedstate/lane-capacity.json, and--publish/--admit.tests/fm-capacity.test.shis extended to cover the new behavior.Risk Assessment
✅ Low: The change is an opt-in, best-effort publisher whose publish step always exits 0 and which does nothing without config/lane-capacity, and I found no concrete wrong-result path in the parser, pressure logic, verdict or watcher wiring.
Testing
I ran the existing 17-case fm-capacity test, which passes. I then drove the real bin/fm-capacity.sh in a throwaway FM_HOME across report, --json, --publish and --admit. With no config, the report has no constrained advice, --admit exits 0 and --publish writes nothing. With a cap of 3 and two lanes plus a secondmate, the report shows one open lane, --json carries the fm-lane-capacity.v1 verdict, and --admit exits 0. At the cap, --admit exits 75 with a factual
deferred:line that no longer claims a lane was not launched or a backlog item stays queued. --publish writes a private (mode 0600) file and is throttled on a second call. A keyed min-disk-gb limit plus a present reserve flag name both reasons in the report, --json and --admit (exit 75). A malformed config exits 1 with its line number, and bad flags exit 2. I did not drive the watcher publish live. It is covered only by the existing fm-capacity test case ("the watcher publishes lane facts only for an opted-in home"), which passed, but that is an automated test and not a live run.Evidence: Existing fm-capacity test run
Source: Existing fm-capacity test run
Evidence: Live CLI transcript of fm-capacity.sh modes
Source: Live CLI transcript of fm-capacity.sh modes
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-capacity.test.sh(17 ok, 0 not ok)Live run ofbin/fm-capacity.sh(report, --json, --publish, --admit, bad flags) against a disposable FM_HOME, with and without config/lane-capacity, at and under the cap, with keyed limits and a reserve flag, and with a malformed configChecked that the--admitdeferral text and docs/configuration.md no longer claim a lane was not launched or a backlog item stays queued✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Verification follow-up (2026-10-23)
Head:
5b8330d697afb5440b7248ca782f86a98b6cad42. Upstream baseline:699999151799e09dc6c76e4672bf4f5e0ff19908.GitHub CI passed all 19 checks at this head, including the real-Herdr job and both no-mistakes attestation events. CI run.
The local non-Herdr selection was stopped by request after 108 of 257 scripts completed: 74 passed, 7 failed, and 27 reported capability skips.
fm-lint.test.shwas interrupted; the remaining 148 scripts were not started. This is partial local evidence, not a full local-suite pass. CI supplies coverage for the unfinished selection and the 16 real-Herdr suites excluded from local execution to avoid local lifecycle operations.Five failing scripts were then run once each, serially, in a clean checkout of the upstream baseline:
fm-afk-return.test.shfm-cursor-harness.test.shfm-gate-refuse.test.shfm-gotmp.test.shfm-bearings-board.test.shTwo additional failures were present in the partial run:
fm-harness-precedence.test.shandfm-herdr-groups.test.sh. They were outside the five authorized baseline reruns and remain unclassified. These local results do not establish a PR-caused regression. No code changes or new tests were made for this follow-up.108 completed local scripts, including explicit capability skips
tests/fm-afk-contract.test.shtests/fm-afk-inject-e2e.test.shtests/fm-afk-pi-herdr-return-e2e.test.shtests/fm-afk-return.test.shtests/fm-agy-harness.test.shtests/fm-agy-signals-live-e2e.test.shtests/fm-arm-pretool-check.test.shtests/fm-ask-user-authority.test.shtests/fm-backend-cmux-smoke.test.shtests/fm-backend-cmux.test.shtests/fm-backend-herdr.test.shtests/fm-backend-orca.test.shtests/fm-backend-paseo-smoke.test.shtests/fm-backend-paseo.test.shtests/fm-backend-rex-composer-live-e2e.test.shtests/fm-backend-rex-eventwait-smoke.test.shtests/fm-backend-rex-smoke.test.shtests/fm-backend-rex.test.shtests/fm-backend-tmux-smoke.test.shtests/fm-backend-zellij-smoke.test.shtests/fm-backend-zellij.test.shtests/fm-backend.test.shtests/fm-backlog-atomicity.test.shtests/fm-backlog-handoff.test.shtests/fm-backlog-read-bound.test.shtests/fm-bearings-board-lavish-live-e2e.test.shtests/fm-bearings-board-render.test.shtests/fm-bearings-board.test.shtests/fm-bearings-snapshot.test.shtests/fm-bootstrap-network-parallel.test.shtests/fm-bootstrap.test.shtests/fm-branch-supervision.test.shtests/fm-brief.test.shtests/fm-busy-adapter-wiring.test.shtests/fm-busy-state.test.shtests/fm-calm-claude-mod-live-e2e.test.shtests/fm-calm-claude-mod-plugin.test.shtests/fm-calm-claude-mod.test.shtests/fm-calm-pi-extension.test.shtests/fm-calm-pi-queue-retention-live-e2e.test.shtests/fm-capacity.test.shtests/fm-captain-hold-lifecycle.test.shtests/fm-cd-pretool-check.test.shtests/fm-check-unregister.test.shtests/fm-ci-workflow.test.shtests/fm-classify-corr-token.test.shtests/fm-classify-decision-key.test.shtests/fm-claude-stop-autoarm-live-e2e.test.shtests/fm-claude-stop-autoarm.test.shtests/fm-claude-trust.test.shtests/fm-cmux-claude-composer-live-e2e.test.shtests/fm-codex-continuity-live-e2e.test.shtests/fm-codex-hook-layer-live-e2e.test.shtests/fm-commandcode-harness.test.shtests/fm-commandcode-signals-live-e2e.test.shtests/fm-composer-codex-idle-live-e2e.test.shtests/fm-composer-ghost.test.shtests/fm-composer-lib.test.shtests/fm-composer-matrix-live-e2e.test.shtests/fm-contributions.test.shtests/fm-control-relaunch.test.shtests/fm-control.test.shtests/fm-crew-state.test.shtests/fm-cursor-harness.test.shtests/fm-cursor-primary-live-e2e.test.shtests/fm-cursor-primary.test.shtests/fm-daemon.test.shtests/fm-devin-harness.test.shtests/fm-devin-signals-live-e2e.test.shtests/fm-dispatch-resolve.test.shtests/fm-documentation-audiences.test.shtests/fm-dod-lib.test.shtests/fm-ensure-agents-md.test.shtests/fm-extension-binding.test.shtests/fm-fleet-ledger.test.shtests/fm-fleet-snapshot-view.test.shtests/fm-fleet-sync.test.shtests/fm-forge-detect.test.shtests/fm-fork-free-helpers.test.shtests/fm-gate-refuse.test.shtests/fm-gemini-harness.test.shtests/fm-git-push-guard.test.shtests/fm-git-strip-ai-trailers.test.shtests/fm-gitignore-config.test.shtests/fm-gotmp.test.shtests/fm-grok-continuity-live-e2e.test.shtests/fm-grok-harness.test.shtests/fm-grok-stop-live-e2e.test.shtests/fm-guard-stale-banner.test.shtests/fm-harness-adapter-instructions-live-e2e.test.shtests/fm-harness-adapter-references.test.shtests/fm-harness-liveness-drift-live-e2e.test.shtests/fm-harness-precedence.test.shtests/fm-herdr-groups.test.shtests/fm-herdr-lab.test.shtests/fm-herdr-pi-stale-registration-live-e2e.test.shtests/fm-herdr-session-cleanup.test.shtests/fm-herdr-submit-confirm-live-e2e.test.shtests/fm-herdr-version-floor-live-e2e.test.shtests/fm-home-summary-refresh.test.shtests/fm-host-mirror-live-e2e.test.shtests/fm-host-mirror.test.shtests/fm-inactive-reconcile.test.shtests/fm-inbox.test.shtests/fm-jev-mem-guard.test.shtests/fm-kimi-harness.test.shtests/fm-launch-prompt-signals-live-e2e.test.shtests/fm-lint-workflows.test.sh149 local scripts incomplete or not started; coverage left to CI
tests/fm-lint.test.sh- interrupted, no completed local resulttests/fm-live-gate.test.sh- not started locallytests/fm-live-lab-up-mate.test.sh- not started locallytests/fm-live-lab.test.sh- not started locallytests/fm-mail-check.test.sh- not started locallytests/fm-mail.test.sh- not started locallytests/fm-muse-harness.test.sh- not started locallytests/fm-muse-signals-live-e2e.test.sh- not started locallytests/fm-nm-test-contract.test.sh- not started locallytests/fm-no-mistakes-required.test.sh- not started locallytests/fm-omp-harness.test.sh- not started locallytests/fm-omp-primary-live-e2e.test.sh- not started locallytests/fm-on.test.sh- not started locallytests/fm-opencode-abs-cwd-rail-live-e2e.test.sh- not started locallytests/fm-opencode-primary-live-e2e.test.sh- not started locallytests/fm-operational-input.test.sh- not started locallytests/fm-parent-channel-scan-exclusion.test.sh- not started locallytests/fm-peek-remote.test.sh- not started locallytests/fm-pending-reply.test.sh- not started locallytests/fm-pi-branch-extension.test.sh- not started locallytests/fm-pi-branch-live-e2e.test.sh- not started locallytests/fm-pi-branch-responsiveness-live-e2e.test.sh- not started locallytests/fm-pi-codex-native.test.sh- not started locallytests/fm-pi-primary-live-e2e.test.sh- not started locallytests/fm-pi-primary-types.test.sh- not started locallytests/fm-pi-seeded-home-trust-live-e2e.test.sh- not started locallytests/fm-pi-watch-extension.test.sh- not started locallytests/fm-pi-windows-shell-invocation.test.sh- not started locallytests/fm-pipeline-spend.test.sh- not started locallytests/fm-polytoken-harness.test.sh- not started locallytests/fm-polytoken-signals-live-e2e.test.sh- not started locallytests/fm-pr-check-security.test.sh- not started locallytests/fm-pr-health.test.sh- not started locallytests/fm-pr-merge.test.sh- not started locallytests/fm-pr-reviewers.test.sh- not started locallytests/fm-pr-state-live-e2e.test.sh- not started locallytests/fm-pr-state.test.sh- not started locallytests/fm-procevent-quota.test.sh- not started locallytests/fm-procevent-when.test.sh- not started locallytests/fm-procevent.test.sh- not started locallytests/fm-project-capacity.test.sh- not started locallytests/fm-project-mode.test.sh- not started locallytests/fm-project-origin.test.sh- not started locallytests/fm-public-followup.test.sh- not started locallytests/fm-quota-array-dispatch-live-e2e.test.sh- not started locallytests/fm-quota-choose.test.sh- not started locallytests/fm-remote-backlog-handoff.test.sh- not started locallytests/fm-remote-delta-read.test.sh- not started locallytests/fm-remote-doctor.test.sh- not started locallytests/fm-remote-entrypoint.test.sh- not started locallytests/fm-remote-herdr-guard.test.sh- not started locallytests/fm-remote-job-claim-reap.test.sh- not started locallytests/fm-remote-job-claim-retention.test.sh- not started locallytests/fm-remote-job-launchagent.test.sh- not started locallytests/fm-remote-job-orphan-reap.test.sh- not started locallytests/fm-remote-job.test.sh- not started locallytests/fm-remote-reply.test.sh- not started locallytests/fm-remote-secondmate-lifecycle-e2e.test.sh- not started locallytests/fm-remote-secondmate-parent-binding.test.sh- not started locallytests/fm-remote-secondmate-relaunch.test.sh- not started locallytests/fm-remote-secondmate-trace-context.test.sh- not started locallytests/fm-remote-transport-lanes.test.sh- not started locallytests/fm-review-check.test.sh- not started locallytests/fm-review-diff.test.sh- not started locallytests/fm-rovo-harness.test.sh- not started locallytests/fm-rovo-signals-live-e2e.test.sh- not started locallytests/fm-secondmate-busy-contract-live-e2e.test.sh- not started locallytests/fm-secondmate-harness.test.sh- not started locallytests/fm-secondmate-lifecycle-e2e.test.sh- not started locallytests/fm-secondmate-liveness.test.sh- not started locallytests/fm-secondmate-reconcile.test.sh- not started locallytests/fm-secondmate-restart.test.sh- not started locallytests/fm-secondmate-safety.test.sh- not started locallytests/fm-secondmate-sync.test.sh- not started locallytests/fm-self-repo-role.test.sh- not started locallytests/fm-send-agy-confirm.test.sh- not started locallytests/fm-send-inbox-doorbell-live-e2e.test.sh- not started locallytests/fm-send-inbox.test.sh- not started locallytests/fm-send-popup-settle.test.sh- not started locallytests/fm-send-remote-delivery.test.sh- not started locallytests/fm-send-resolve-key.test.sh- not started locallytests/fm-send-secondmate-marker-herdr-e2e.test.sh- not started locallytests/fm-send-secondmate-marker.test.sh- not started locallytests/fm-send-settle.test.sh- not started locallytests/fm-send-strict.test.sh- not started locallytests/fm-session-lock-ancestry.test.sh- not started locallytests/fm-session-start.test.sh- not started locallytests/fm-sessionstart-hook-live-e2e.test.sh- not started locallytests/fm-sessionstart-instruction-refresh-live-e2e.test.sh- not started locallytests/fm-sessionstart-nudge.test.sh- not started locallytests/fm-shared-captain-inheritance.test.sh- not started locallytests/fm-spawn-batch.test.sh- not started locallytests/fm-spawn-compact-adviser-disable-remote.test.sh- not started locallytests/fm-spawn-compact-adviser-disable.test.sh- not started locallytests/fm-spawn-dispatch-profile.test.sh- not started locallytests/fm-spawn-external-review.test.sh- not started locallytests/fm-spawn-orca-worktree.test.sh- not started locallytests/fm-spawn-pool-base-freshen.test.sh- not started locallytests/fm-spawn-worktree-settle.test.sh- not started locallytests/fm-startup-growth-check.test.sh- not started locallytests/fm-startup-memory-budget.test.sh- not started locallytests/fm-startup-network.test.sh- not started locallytests/fm-stat-shadowing.test.sh- not started locallytests/fm-stow-cascade.test.sh- not started locallytests/fm-subagent-pretool-check.test.sh- not started locallytests/fm-supervision-events.test.sh- not started locallytests/fm-supervision-host-attended-live-e2e.test.sh- not started locallytests/fm-supervision-host-live-e2e.test.sh- not started locallytests/fm-supervision-host.test.sh- not started locallytests/fm-supervision-instructions.test.sh- not started locallytests/fm-tangle-guard.test.sh- not started locallytests/fm-task-delivery.test.sh- not started locallytests/fm-task-inbox.test.sh- not started locallytests/fm-tasks-axi.test.sh- not started locallytests/fm-teardown-endpoint-safety.test.sh- not started locallytests/fm-teardown.test.sh- not started locallytests/fm-test-fixture-cleanup.test.sh- not started locallytests/fm-test-fixtures.test.sh- not started locallytests/fm-test-isolation-proof.test.sh- not started locallytests/fm-test-run.test.sh- not started locallytests/fm-timeout-lib.test.sh- not started locallytests/fm-tmux-agent-liveness.test.sh- not started locallytests/fm-tmux-submit-busy.test.sh- not started locallytests/fm-tool-update-check.test.sh- not started locallytests/fm-trace-context-lib.test.sh- not started locallytests/fm-trace-context-spawn.test.sh- not started locallytests/fm-transition-lib.test.sh- not started locallytests/fm-turnend-foreign-owner-arm-fix.test.sh- not started locallytests/fm-turnend-guard.test.sh- not started locallytests/fm-update.test.sh- not started locallytests/fm-vendor-auth-probe.test.sh- not started locallytests/fm-voice-relay.test.sh- not started locallytests/fm-wake-daemon-lifecycle-e2e.test.sh- not started locallytests/fm-wake-drain-open-decisions-cursor.test.sh- not started locallytests/fm-wake-drain-open-decisions.test.sh- not started locallytests/fm-wake-drain-outcome-backstop.test.sh- not started locallytests/fm-wake-drain-unread-status.test.sh- not started locallytests/fm-wake-queue.test.sh- not started locallytests/fm-watch-arm.test.sh- not started locallytests/fm-watch-checkpoint.test.sh- not started locallytests/fm-watch-recovery-loop.test.sh- not started locallytests/fm-watch-triage.test.sh- not started locallytests/fm-watch-wedge-cap-live.test.sh- not started locallytests/fm-watch-wedge-cap-unconfigured-parity.test.sh- not started locallytests/fm-watch-wedge-cap.test.sh- not started locallytests/fm-watcher-lock.test.sh- not started locallytests/fm-worker-account-live-e2e.test.sh- not started locallytests/fm-worker-account.test.sh- not started locallytests/fm-x-mode.test.sh- not started locally16 real-Herdr suites assigned to passing same-head CI
Passing Herdr CI job.
tests/fm-afk-inject-herdr-e2e.test.shtests/fm-afk-launch.test.shtests/fm-backend-autodetect-smoke.test.shtests/fm-backend-herdr-agent-exit-shell-e2e.test.shtests/fm-backend-herdr-eventwait-smoke.test.shtests/fm-backend-herdr-focus-flash-e2e.test.shtests/fm-backend-herdr-launcher-workspace-e2e.test.shtests/fm-backend-herdr-presentation-e2e.test.shtests/fm-backend-herdr-prune-safety-e2e.test.shtests/fm-backend-herdr-respawn-idem-e2e.test.shtests/fm-backend-herdr-smoke.test.shtests/fm-backend-herdr-stale-active-tab-e2e.test.shtests/fm-backend-herdr-workspace-per-home-e2e.test.shtests/fm-control-herdr-smoke.test.shtests/fm-herdr-attached-viewer-live-e2e.test.shtests/fm-herdr-session-cleanup-e2e.test.sh