Repository navigation
Conversation
|
Speaking as Kun's firstmate: thanks, @Moshik21. This is a carefully specified piece, and turning the proposal's worked examples into fixtures is great. I read head What I checked: Contract-class: opt-in (my own read). Unconfigured, this costs one file test per beat plus one conditional contract line. Waiting on you, gently:
Once both are in and the base PRs land, it'll go to Kun. |
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.
…imits Extend bin/fm-capacity.sh with --json, --publish, and --admit, optional config/lane-capacity lines (min-avail-gb, min-disk-gb, pressure-file, reserve-flag, captain-idle, quota-provider, max-load1), lookout.beat pressure reading with probe fallback, and an opt-in watcher publish of state/lane-capacity.json.
…ublished-text redaction
bin/fm-place.sh reads each candidate home's state/lane-capacity.json (local, or through fm-on.sh and fm-remote-file.sh for a remote home), filters and scores the fitting homes, prints one TOON answer with every home's reasons, and appends one line to state/lane-placement.jsonl. It never spawns, routes, or moves anything. Modes are off and advise, opted in by config/lane-placement.json; outcome records firstmate's choice and review summarizes the advice period. Facts failing fail open; a malformed config exits 2.
d4f47a0 to
075b237
Compare
|
Speaking as Kun's firstmate: thanks @Moshik21 for getting this rebased. Which PR should stay open? #7585 has the same title and diff, and its body says its goal is to update this PR. This branch ( What I checked on Contract-class: opt-in (my own read; unchanged from the earlier pass). Without any config, the only costs are one file test per beat and the contract lines. One note: the carried VISION: One captain: aligns (advice only; it escalates only when there is a real choice). Authority: aligns (a home the captain names always wins; it never dispatches). Scripts/agents: aligns (the script scores, the agent decides). Restart: aligns (durable log and facts files). Delegation: aligns (live evidence 13/13 in the body). Vendor: aligns (no harness coupling). Scope: aligns (command layer only). Stack order is still a blocker: this branch carries #6973 and #6983, and both are still open. As before, at most one layer lands at a time, starting with #6973. Then this branch needs a rebase so its diff covers only PR B. That part is on the stack order, not on you right now. The one thing I need from you is the #6984/#7585 answer. |
|
Speaking as Kun's firstmate: thanks @Moshik21. You confirmed #7585 was opened in error and closed it, so this is the PR we'll keep. You don't need to do anything right now. What's left is the serial 2 re-run ( |
|
#7595 replaces #6984. Pipeline custody for the old branch could not be recovered safely; the replacement also includes the privacy scrub. Keep the replacement open; the old PR is being closed as superseded. With #6973 merged, the remaining landing order is #6983, then #7595. The required rebases are still in progress. |
Intent
Our own open upstream pull request #6984 (feat(bin): advise lane placement from published lane facts, branch fm/router-p1-pr-b) currently shows mergeable=false (conflicts) against upstream main. Get it rebased and passing its checks again. Upstream consent for updating this exact PR branch is recorded for this task. The PR adds bin/fm-place.sh, an advisory lane-placement command that reads published lane capacity facts, and is stacked on the open PRs #6983 and #6973, whose commits it carries and must keep unchanged.
What Changed
bin/fm-capacity.sh, which reports open lanes and host headroom against an optionalconfig/lane-capacitytarget. Its--publishmode writes thestate/lane-capacity.jsonfacts document, and--admitreturns this home's admission verdict as an exit status.bin/fm-watch.shpublishes the document from a detached job only whileconfig/lane-capacityexists.bin/fm-place.sh, an advisory placement command that is opt-in throughconfig/lane-placement.json. It ranks candidate homes from their published lane facts and prints a status and score breakdown. It appends each decision tostate/lane-placement.jsonl, and it also providesoutcomeandreviewsubcommands. It never spawns or routes anything.docs/configuration.md,docs/scripts.md, the operational-home-layout skill,AGENTS.md, and a newdocs/examples/lane-placement.jsonlisted indocs/documentation-audiences.json. Addedtests/fm-capacity.test.shandtests/fm-place.test.sh, and registered both withbin/fm-test-run.sh.Risk Assessment
✅ Low: The rebase kept the carried #6973/#6983 commits and the fm-test-run.sh resolution as the user decided, and I found no concrete defect in the new advisory, opt-in, exit-0 placement script or the capacity publisher.
Testing
I ran
tests/fm-place.test.shandtests/fm-capacity.test.shin full; both pass, including the captain/quota case that failed last round. A dry merge of HEAD into currentorigin/mainis clean, with 9 commits ahead of it. I then ran the realbin/fm-capacity.sh --publishandbin/fm-place.shagainst two disposable lab homes (a main home and a local secondmate "scholar"), covering the config guards, scoring, outcome and review recording, and the stale and foreign-facts guards. All 13 live scenarios passed (see the scenario list). The lab homes were removed afterwards.tests/fm-test-run.test.shhas one failure, "packing exactly at the budget": the coverage guard reports that portable serial shards share scripts. It fails identically on the base commit 9d76aa8, so I report it as unrelated. I did not test the remote-secondmate read path throughfm-on.shlive because it needs an ssh host; the unit suite covers it.Evidence: Live fm-place run: config guard, foreign-facts guard, host under real pressure
Source: Live fm-place run: config guard, foreign-facts guard, host under real pressure
Evidence: Live fm-place run: clear, captain, local-only, usage errors, JSON, kill switch
Source: Live fm-place run: clear, captain, local-only, usage errors, JSON, kill switch
Evidence: Live fm-place run: outcome, pending, review, stale and foreign facts, enforce refused
Source: Live fm-place run: outcome, pending, review, stale and foreign facts, enforce refused
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
bin/fm-test-run.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Review** - passed
✅ No issues found.
tests/fm-capacity.test.sh:472- tests/fm-capacity.test.sh (carried from PR feat(bin): publish lane capacity facts with beat pressure and keyed limits #6983) fails on this macOS host in test_captain_and_quota. The test removes its fake ioreg and expects captain presence 'unknown', but the host's real /usr/sbin/ioreg is still on PATH, so it reads 'idle'. This is host-dependent, comes from the unchanged feat(bin): publish lane capacity facts with beat pressure and keyed limits #6983 commits, and does not touch fm-place. Remote CI (Linux) is the real arbiter.bash tests/fm-capacity.test.sh: 'unreadable presence and quota must read unknown (expected unknown|unknown, got idle|unknown)'git merge-tree --write-tree origin/main HEAD(clean merge, HEAD sits directly on origin/main)git diff origin/main -- bin/fm-test-run.sh: tests/fm-place.test.sh 22000 sits before tests/fm-polytoken-harness.test.sh 21090, tests/fm-polytoken-signals-live-e2e.test.sh 103 and tests/fm-pr-check-security.test.shbash tests/fm-place.test.sh(all pass)bash tests/fm-capacity.test.sh(one host-dependent failure in the unchanged #6983 code)Disposable lab home frombin/fm-lab-home.sh create, with realbin/fm-capacity.sh --publishdocuments for main, sm-a and sm-b, thenbin/fm-place.shrun against it: clear/tie-break, room scoring, fallback, full, error, stale/future/missing facts, captain, pressure refusal, outcome, review, log mode 0600, enforce/off/absent config, bad numeric configLab torn down withrm -rf🔧 Fix applied.
1 info still open:
bash tests/fm-place.test.sh(passes)bash tests/fm-capacity.test.sh(passes, including test_captain_and_quota)git merge-tree --write-tree origin/main HEAD(clean, exit 0)bash tests/fm-test-run.test.sh(one failure,test_portable_serial_packing_budget_boundary, also fails on base 9d76aa8e)Live:bin/fm-lab-home.sh create,bin/fm-capacity.sh --publishandbin/fm-place.sh(advice,--captain,--json,outcome,review,FM_PLACE=off) against two lab homesLive adversarial: stale facts viaFM_PLACE_NOW, tampered factshomefield, invalid config values,mode: enforce, unknown home, unknown delivery✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.