Repository navigation
Conversation
|
Speaking as Kun's firstmate: Thanks @kesslerio. This is careful work: the no-mistakes review rounds clearly hardened the locking, adoption and confirmed-stop paths, and the live admission transcripts are good evidence. I read the tip against main contract-class: new-default (my own read of the diff, not the PR's framing):
VISION.md, rule by rule:
State: CI run 38991109830 was cancelled again, with What would move this forward:
Kun keeps the final merge call on any capacity guard. After this is opt-in, CI is green and the attestation matches, I'll take it from there. |
|
Speaking as Kun's firstmate: Thanks for the follow-up rounds, @kesslerio. Some things improved. The no-mistakes attestation now binds the head ( I re-read the tip against main
When 1–3 are addressed, please re-raise through |
28825e6 to
03f0eee
Compare
|
@kunchenguid - re-review of the hardened tip, please. Since your last comment (at Your four structural points stand as you left them: the default cap and the Sol pattern still ship in |
223fd35 to
ef41b8a
Compare
|
Speaking as Kun's firstmate: Thank you @kesslerio. This is a real rework, and it reads much closer to what #7429 asked for. I re-read the new tip
This is still waiting on you for two things:
Live validation is 10/11. The untested scenario is fine to leave as a stated gap if it's still blocked at the hook-trust boundary. Once both are cleared and CI is green, this goes to Kun for the merge call. As said before, Kun keeps the final call on any capacity guard. Nothing else is needed from you after that. |
5b84df9 to
0165daa
Compare
|
Speaking as Kun's firstmate: Thank you @kesslerio. The re-raise worked. "PR must be raised via no-mistakes" passes on Where it stands:
Once that's settled and CI is green, this goes to Kun for the merge call. Kun keeps the final word on any capacity guard. Nothing else is needed from you after that. |
|
@kunchenguid — the four structural points are addressed and the branch is published at Point 1 — still new-default, now off unless declared. Point 2 — the close-return change no longer touches every task. Point 3 — how this composes with #6238 is written into the body: the fleet seat ledger is authoritative for a model in a declared pool, this guard defers instead of double-counting, a model declared in both is refused, and this PR lands first, after which #6238 must make the fleet seat ledger the single authority. The cross-check itself is deliberately not implemented here, because it needs #6238's pool-declaration key to be stable. Point 4 — the CI-shard work is its own PR, #7587. This branch's diff against main touches no workflow file, no CI on The live admission, spawn and shared-home evidence was re-run under the new contract rather than relabelled — the old transcripts exercised a shipped default, so they no longer stood. Two decisions that are yours.
The authenticated-worker lifecycle scenario is still untested: the earlier attempt stopped at "Hooks need review" (Codex) and at workspace trust (Claude), and continuing needs a trust decision that persists outside the permitted workspace. |
|
Speaking as Kun's firstmate: thanks @kesslerio for the detailed write-up. The head is still This is still waiting on you, for the same one thing:
Until then this stays On your two decisions (the best-effort prior-incarnation window, and a malformed declaration refusing every guarded dispatch): those are fair questions for Kun. They'll go to him together with the merge call once the line above is settled and CI is green. I'm not deciding them here. CI: the re-run of |
0165daa to
d0e99bc
Compare
|
Speaking as Kun's firstmate: thank you @kesslerio. The remote-secondmate model line is settled. I re-read the new head
This is waiting on you, for one CI fix. Once Lint is green, this goes to Kun with your two open questions (the best-effort prior-incarnation window, and a malformed declaration refusing every guarded dispatch). He keeps the final word on capacity guards, so it won't auto-merge. After that fix, nothing more is needed from you. |
d0e99bc to
d515458
Compare
|
Speaking as Kun's firstmate: thank you @kesslerio. The Lint 2 fix looks right. I re-read the new head
This is waiting on you, for one thing: live evidence. The re-raise on this head reports live validation as 0 of 4 scenarios ("no isolated authenticated Sol endpoint/session was established"). The earlier head reported 4 of 6. When you get a chance, could you drive the ceiling live in a disposable lab home and post the transcripts here? The four scenarios in the body are the right ones: admission below the ceiling, refusal at the ceiling naming the active sessions, stale/dead sessions not counting, and a non-Sol model not being blocked. Re-raising with Once live evidence is in and CI is green, this goes to Kun together with your two open questions (the best-effort prior-incarnation window, and a malformed declaration refusing every guarded dispatch), as promised. I'm not deciding those here. |
d515458 to
650bb98
Compare
[Medium impact] The PR appears safe to merge; the numbered previous finding is fixed and no new actionable issues were established. Reviews (14) · Last reviewed commit: "no-mistakes(document): Document Sol stat..." · Reviewed by Greptile |
This comment has been minimized.
This comment has been minimized.
|
Speaking as Kun's firstmate: thank you @kesslerio. The re-raise on I re-read the tip against main This is waiting on you, for two review findings Greptile raised on this head:
Please push through Contract-class (my own read): opt-in, unchanged. VISION: unchanged from 10-22. All seven rules align, with Spine now backed by 4 of 4 live scenarios. |
…nsupported capacity claims
A remote runtime switch promotes its new reservation to pid 0 before delivery, and a switch the host refuses before the control plane starts left that reservation behind. Reconcile only drops a row for a dead or missing remote, so the still-live uncapped worker kept the slot and later capped dispatches were refused against capacity nothing was using. The host now proves the phase: fm-remote-secondmate-control.sh relaunch prints relaunch_refused_before_control=<id> on any exit before the fm-control call, which is the window in which nothing was started, stopped, or replaced. The parent releases the reservation it created only on that proof and only when the route held no capped occupancy before the switch, so a worker that already owns a slot keeps it, and a transport or control failure keeps the claim because a replacement may be running. Regression coverage drives all four outcomes: a confirmed pre-control refusal releases the new reservation, and an unproven failure, an uncertain delivery, and a proof naming another task each keep it.
…erification counts
…mantics A capped launch walked the whole launch line through `/bin/sh -c`, so the ceiling changed how a command was parsed rather than only whether it was admitted. An uncapped launch is a line the pane shell sources, so a raw launch command that relied on that shell - process substitution, arrays, a here-string - started uncapped and failed capped, which is a launch regression, not an admission decision. The handoff now takes the pane shell's own report of itself (`$0`, expanded by the shell that sources the staged line) and execs the launch line unchanged under it, so an uncapped and a capped launch run the same bytes with the same interpreter. An unusable report falls back to $SHELL and then /bin/sh, which still runs every Firstmate-generated launch line, and the reservation still transfers to the worker's own process. Regression coverage spawns one raw command carrying process substitution twice, once under a declared ceiling and once with the guard inert: both staged lines carry the same command bytes, both drive the worker with the same argv, and the capped one runs under a pane-shell stand-in that names itself as the interpreter, so a substituted shell fails the test even where /bin/sh happens to be bash. A second case proves the unresolvable-report fallback still runs the line.
…on from Sol capacity accounting
…ompatible $0 The staged capped launch carried a literal `"$0"` for the pane shell to expand, but fish has no `$0`: fish 4.x expands it away and leaves the handoff without an identity, so a capped launch in a fish pane fell back to $SHELL or /bin/sh and reinterpreted the pane's command under an interpreter that cannot parse it. The staged line now names no shell expression of its own, so every supported pane shell parses it unchanged. run-launch reads the sourcing shell from the process tree instead, where the parent's executable name is the same shell identity `$0` gave POSIX panes, and the explicit report remains as the operator and test seam. A fish pane now runs the identical command the uncapped launch would have run, and the reservation still transfers to that shell's process. Regression: the staged file is sourced by real fish with a fish-only payload, capped against an uncapped control, comparing worker argv, the interpreter that ran it and the transferred reservation. Without fish the handoff is checked for tokens fish cannot parse and the live case reports a skip.
… ceiling admission
…Orca absence, Zellij panes
…lacement path in bin/fm-sol-cap-lib.sh gave up on its row invalidation whenever the admission lock stayed busy past the brief wait, so a live replacement could sit behind a -1/dead-pid row that the count reads as claiming no slot, letting a later capped dispatch run above the declared ceiling. The invalidation is now durable instead of dropped: when the brief attempt fails, the dispatch still continues unrefused and writes a per-task pending marker (atomic tmp+mv, no registry rewrite outside the boundary) into the task's state directory, naming the row it invalidates; the next admission applies and clears pending markers under the admission lock, before counting, in every local state directory it walks (fm_sol_cap_active_count), so no later admission can count above the ceiling. The live-occupancy guard is preserved at both points: a row holding live occupancy is never superseded at write time or at apply time, and a row that changed since the marker was recorded (a newer incarnation or its stop marker) is left alone and the marker cleared. Unreadable markers or a registry that cannot be rewritten fail the count loudly, consistent with the module's existing stance, leaving the marker for the next admission. Sibling paths checked: covered replacement (unchanged, under lock), reuse (keeps its row by recorded decision), another task's concurrent admitted row (supersede only rewrites the matching id, verified by test), multi-home counts (each counted state dir applies its own markers), and teardown/ownership predicates (a -1 row still owns no occupancy, unchanged). Added three regressions in tests/fm-sol-cap.test.sh driving real processes: the test holds the admission lock in a live process while a fresh CLI process performs the uncapped replacement (asserting the dispatch continues, the prior row is untouched, and the marker lands, then that the next admission supersedes it), a sibling test asserting another admitted claim's row survives the sequence, and a test asserting a capped dispatch is refused at the ceiling afterward. Updated the bin/fm-sol-cap-lib.sh header and the docs/configuration.md superseded-row bullet. Verified: bash tests/fm-sol-cap.test.sh (42 ok, only the pre-existing fish-absent skip), tests/fm-remote-secondmate-relaunch.test.sh, tests/fm-sol-cap-rex.test.sh, tests/fm-gotmp.test.sh, and bin/fm-lint.sh (pinned ShellCheck 0.11.0 plus workflow actionlint) all pass
… admission regressions
The lock-hold case wrote its holder pid from BASHPID, which stock macOS Bash 3.2 does not define. Under the suite's `set -u` the holder exited before creating `held`, so the case failed on a supported shell. The pid now comes from fm_current_pid, the portable owner of that probe, and the holder unsets BASHPID so every host exercises the Bash 3.2 path rather than only macOS. The case also asserts the recorded holder is a live process other than the test shell, so it still proves a real holder rather than any live pid.
…umentation claims
When a spawn uses a valid redirected config while the home's normal sol-cap declaration is malformed, admission succeeds but run-launch dropped FM_CONFIG_OVERRIDE, reading the malformed declaration and failing before worker launch. Passing FM_CONFIG_OVERRIDE into the handoff ensures admission and launch read the same declaration. Added regression coverage verifying redirected config launches and promotes cleanly, and malformed redirected declarations fail admission without leaving a reservation.
95e3ba1 to
7701a29
Compare
|
Speaking as Kun's firstmate: thanks @kesslerio, both asks from my last note are done. On One item is waiting on you before we run the full suite. Your own no-mistakes Review step left an open warning on this head, and your Risk Assessment rates it Medium. At Optional, while you're in there: the Document step notes that the provisional hint for I'll mention one edge to Kun, and you don't need to change it: on a home with no ceiling declared, |
What Changed
bin/fm-sol-cap-lib.sh, which owns admission, counting, and claim reconciliation for a captain-declaredconfig/sol-capceiling on concurrent covered-model sessions: inert when undeclared, refusing at the ceiling instead of queueing, with a per-homestate/sol-sessions.tsvregistry counted across local homes.bin/fm-spawn.sh(local and remote secondmate launches),bin/fm-teardown.sh, andbin/fm-remote-secondmate-relaunch.sh, so occupancy is reserved before launch, reconciled from the endpoint-reported model, matched per home's own declaration, and released only after a confirmed endpoint close or retirement.fm_backend_kill_confirmedwith per-backend absence proofs (tmux, herdr, zellij, cmux, orca, paseo, rex, t3code, tern, hc) while ordinary teardown keeps the unchanged best-effort close, and adds covering tests plus documentation for the ceiling, the confirmed-close contract, and the superseded-row rules.Risk Assessment
Testing
Live-validated the change with a disposable marked lab home plus a registered secondmate lab home, driving the real bin/fm-spawn.sh and bin/fm-sol-cap-lib.sh entrypoints. A worker admitted through the product into the secondmate's own state root made a primary-home dispatch refuse at max=1, naming that session and its separate state root and creating no task record; stopping it freed the slot. With a separate state override and a redirected config, admission claimed the slot and the spawn's staged handoff (which carries both overrides) was executed in a real tmux pane on the lab's private socket, promoting the reservation onto a live worker while the config inferred from the state path was malformed. Adversarially, a malformed effective declaration refused loudly with no reservation, and a permissive declaration sitting at the state path's inferred config was never consulted (the second dispatch still refused at max=1) while switching the effective config to that permissive file admitted, proving the trap reachable. The three focused suites covering this feature also pass. No UI surface exists in this change, so no visual artifact applies; the evidence is transcripts, the staged handoff, the real-pane capture, and the resulting registry row.
Evidence: Live Sol-ceiling driver transcript (S1-S4, all checks passing)
Source: Live Sol-ceiling driver transcript (S1-S4, all checks passing)
Evidence: Live validation driver script (all scenarios, disposable lab homes)
Source: Live validation driver script (all scenarios, disposable lab homes)
Evidence: Cross-root ceiling refusal naming the secondmate session and its state root
Source: Cross-root ceiling refusal naming the secondmate session and its state root
error: Sol ceiling reached: 1 concurrent capped session(s) already active and this ceiling is 1 (declared in config/sol-cap); the dispatch of task task-one (codex, gpt-6.1-sol) was refused. Active sessions: sm-task (gpt-6.1-sol, age 3s) in <lab>/sm/state.Evidence: Real tmux pane running the staged capped handoff (promotion + worker reachable)
Source: Real tmux pane running the staged capped handoff (promotion + worker reachable)
. '/tmp/fm-task-two+.../launch.s...sh' live worker reachable, argv: probe-ranEvidence: Staged capped handoff carrying the resolved config and state overrides
Source: Staged capped handoff carrying the resolved config and state overrides
Evidence: State-override registry after the launch (reservation promoted to the live worker pid)
Source: State-override registry after the launch (reservation promoted to the live worker pid)
task-two gpt-6.1-sol <start> <worker-pid>Evidence: Combined refusals: cross-root, effective-config, malformed declaration, inferred-config-ignored
Source: Combined refusals: cross-root, effective-config, malformed declaration, inferred-config-ignored
Evidence: tests/fm-sol-cap.test.sh transcript (49 ok)
Source: tests/fm-sol-cap.test.sh transcript (49 ok)
Evidence: tests/fm-sol-cap-rex.test.sh transcript
Source: tests/fm-sol-cap-rex.test.sh transcript
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-sol-cap-lib.sh:830- The public refuse-claim CLI can ignore existing occupancy when given a redirected config directory. With FM_HOME=H, H/config/sol-cap absent, C/sol-cap declaring max=1, and a live covered claim in H/state, invoke refuse-claim with C and H/state without FM_CONFIG_OVERRIDE. Admission loads C, but counting resolves H/config, excludes the existing claim, and incorrectly returns 'claimed'. Bind the supplied config directory to the supplied state directory throughout admission. Related sites: bin/fm-sol-cap-lib.sh:98 (configuration resolution), :407 (adoption), :551 (row classification), and :1289 (CLI forwards explicit directories without establishing their association).✅ **Test** - passed
✅ No issues found.
bash ~/.no-mistakes/evidence/01M725HG5Q50ECNGF4V37CVFN8/live-sol-cap-driver.sh(S1 cross-root ceiling, S2 separate state + redirected config launch in a real tmux pane, S3 malformed effective declaration, S4 inferred-config trap) withFM_LIVE_ROOT=<run worktree>bin/fm-lab-home.sh create/tmux-dirminted and tore down the disposable lab homes and private tmux socketbin/fm-spawn.sh task-one ...refused atmax=1because a live covered worker occupied the registered secondmate home'sstate(S1)bin/fm-sol-cap-lib.sh refuse-claim+runminted the live secondmate occupancy and the S4 first occupant (real product, no hand-written registry rows)bin/fm-spawn.sh task-two ...withFM_STATE_OVERRIDE+FM_CONFIG_OVERRIDE, then the staged handoff executed in a realtmuxpane on the lab socket (S2)bash tests/fm-sol-cap.test.sh(49 ok)bash tests/fm-sol-cap-rex.test.shbash tests/fm-remote-secondmate-relaunch.test.sh(9 ok)docs/fm-test-portable-shards.md:31- The recorded provisional serial hint fortests/fm-sol-cap.test.sh(25000 ms) is now far below a fresh sample:bin/fm-test-run.sh --json tests/fm-sol-cap.test.shmeasuredduration_ms=165766on this Linux host after this branch's later commits added the lock-contention and refusal tests. The other two values in that sentence still match their suites (fm-backend-close 543 ms, fm-sol-cap-rex 930 ms). Refreshing this needs the hint table inbin/fm-test-run.sh(executable configuration outside this phase) together with this evidence line, so I left both untouched rather than desynchronizing the doc from the table.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.