Repository navigation
Conversation
|
Speaking as Kun's firstmate: triage complete — waiting-author. Contract-class (own tip-vs-main): opt-in. New VISION (per-rule):
Attestation: MISSING — PR body has no Checks: workflow-zero (no Closes-issue: none claimed/verified. Please bind attestation to the current HEAD (or push a tip that matches a fresh raise). I am Kun's firstmate (automated triage for firstmate-oss). |
Add bin/fm-capacity.sh, a read-only, network-free report of this home's running lanes against an optional config/lane-capacity target, plus 1-minute load versus logical cores, free memory, and free disk. The first output line is machine-readable (free_lanes=N reason=...), followed by a human summary. Probes degrade to unknown when unavailable on a platform. Document config/lane-capacity in docs/configuration.md and point the backlog re-evaluation rule in AGENTS.md at the new report.
5e94b6f to
b06330a
Compare
|
Rebased on current main and validated locally with no-mistakes 1.41.2 on b06330a (review, test, document and lint passed; the review step also tightened lane-capacity parsing and indexed the new script and config in the docs). |
|
Speaking as Kun's firstmate: thanks @Moshik21 for rebasing and running this through no-mistakes. The tightened What changed since my last stamp ( CI: I reviewed the diff first (no workflow, secret, or network surface), then approved CI Waiting on you, the author: as you noted, the body has no no-mistakes attestation, so "PR must be raised via no-mistakes" will fail and this can't merge yet. When you get a chance, could you upgrade no-mistakes to 1.46 or newer and push the branch through |
Summary
Firstmate re-evaluates queued work after every teardown and heartbeat, but nothing reports how much room the machine has for more lanes.
This adds
bin/fm-capacity.sh, a read-only, fast, network-free report firstmate can consult at that re-evaluation to notice open lanes and fill them with ready backlog work.state/*.meta(ship and scout work); persistent secondmates are reported separately and hold no lane.config/lane-capacitytarget (one non-negative integer). Absent means counts only - the script never invents a target. A malformed value reportsreason=invalid-targetand exits 1 instead of guessing.FM_HOME. Darwin readssysctl; other systems read/proc/loadavgand/proc/meminfo; cores come fromgetconfwith asysctlfallback; disk fromdf -Pk. Any unavailable probe printsunknownand its constraint is skipped.free_lanes = max(target - lanes, 0), forced to 0 when the host is constrained (load >= cores, memory free < 10%, disk free < 5120 MB), withreasonnaming each constraint.Example output:
Docs:
config/lane-capacityis documented indocs/configuration.md("Lane capacity");AGENTS.mdsection 10 gains one pointer line at the queued-work re-evaluation rule. The script header owns the output contract, thresholds, and probe fallbacks. Supervision behaviour is otherwise unchanged.Testing
bin/fm-test-run.sh tests/fm-capacity.test.sh tests/fm-documentation-audiences.test.sh- pass. The new test drives faked probes on PATH through the public command: no target, open/full/over-target, each host constraint plus just-inside-threshold values, unavailable probes, malformed target, and a real-host smoke.bin/fm-lint.shandshellcheck(pinned 0.11.0) on both new scripts - clean.bin/fm-doc-audience-check.sh- ok.bin/fm-test-run.sh --check-coverage- ok (new test lands in the serial lane as unclassified).