Repository navigation
fix(bin): count only live worker seats for the away cap and lanes - #299
Merged
Merged
Conversation
sKeLe100
force-pushed
the
fm/seat-count-liveness
branch
from
November 20, 2026 23:26
e859f7b to
df01924
Compare
sKeLe100
force-pushed
the
fm/seat-count-liveness
branch
from
November 21, 2026 09:40
df01924 to
b720cbc
Compare
…he duration hint for tests/fm-capacity.test.sh in bin/fm-test-run.sh was stale. This PR expanded that test, so it now runs in about 3s, but the hint was 839ms. That is 3.67x over on two consecutive runs, which trips the refusal. I updated the hint to 3076ms, the value CI measured. The other 14 scripts the check flagged were single-run warnings only, so I left them alone. The background run of tests/fm-test-run.test.sh finished with exit code 0. I did not re-run the CI hint-drift check itself locally
sKeLe100
added a commit
that referenced
this pull request
Nov 23, 2026
…anes Test-only. Fork #299 counts a lane only for a live record, and that count probes tmux read-only. Upstream's lane-cap deferral case now makes its lane-holding record live (working status plus a listed window), and its nothing-created check allows read-only tmux probes (list-windows, display-message, list-panes) while every mutating call stays forbidden.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Code fix C1 from the overnight review, captain-approved 2026-11-20 ("Ship all five"): worker seats count only live work. The away worker cap and lane count counted dead, done and captain-held task records, so the cap read 8 of 8 all night while no seat worked and nothing new could start. Context: the 2026-11-19/20 away window (9h20m) did no work because dead, done, and captain-held records held every worker seat.
What Changed
bin/fm-afk-contract.sh:live-workers(shared by the away-entry default and thefm-spawn.shcap refusal) now counts a non-secondmate record only while it is live. Done or failed records, records whose backend reports the endpoint missing or the agent dead (once past a 180s launch window), and records whose backlog row is held for the captain no longer take a seat. Reads that cannot answer, such as an unreadable backlog or an unknown state, still hold the seat.bin/fm-capacity.sh: the lane count now comes from the samelive-workerscount, so the away cap and lane count cannot diverge. It falls back to counting every non-secondmate record if that count is unreadable.docs/configuration.md,docs/pi-supervision-branch.md) describe the live-seat rule. Tests intests/fm-afk-contract.test.sh,tests/fm-capacity.test.shandtests/fm-branch-supervision.test.share extended for the new counting.Risk Assessment
✅ Low: The shared live-worker count correctly frees dead, done, missing and captain-held seats; the fail-closed fallbacks, launch window and skip notices reflect earlier review decisions, and I found no new defect.
Testing
The configured baseline passed first. I then ran the afk-contract, capacity and branch-supervision test scripts, which drive the real
fm-afk-contract.shandfm-capacity.shagainst fixture state directories, and all three exited 0. They cover dead, released, done and captain-held records holding no seat, and a backend that cannot answer never freeing a seat. They also cover a dead agent in a surviving pane freeing its seat, and a record inside the launch window keeping its seat.tasks-axiwas on PATH, so the captain-held case ran rather than being skipped. I drove no real Herdr or tmux session. No UI is involved, so there are no screenshots.Evidence: test run log
Source: test run log
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.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idlebash tests/fm-afk-contract.test.shbash tests/fm-capacity.test.shbash tests/fm-branch-supervision.test.sh✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.