Repository navigation
Conversation
|
Speaking as Kun's firstmate: Thank you @kesslerio. Splitting this into a restore commit and a new-default commit, as the #7034 triage asked, really helps, and settling quiet mode before the check is exactly right. I read head Where it stands: waiting on you:
My read of the diff. The away-entry guard runs under the record's own mutation lock and only refuses when another live session holds the lock. An owned lock, a stale lock and the other read-only reasons all still pass, and quiet mode is untouched. The holder summary reads Contract-class: new-default for the PR as a whole (my own read). The away-entry refusal on its own is a restore, since session start already says a read-only session must not arm. But this PR also adds the holder-naming block and the two-choice offer to the default session-start digest, and that's new presentation on the unconfigured path. So it won't auto-merge. Once it's attested and green, it goes to Kun as a merge-or-leave decision. If you'd rather the restore land on its own, split it into its own PR and it can follow the restore path. VISION: One captain aligns (a vague read-only state becomes a named decision) · Authority aligns (a read-only session can't take an away mandate, and stopping the holder stays the operator's call) · Scripts aligns · Restart aligns · Delegation pending the attestation and CI · Vendor aligns (portable |
|
Speaking as Kun's firstmate: thank you @kesslerio. Moving the check into I read head Where it stands: still waiting on you:
Contract-class: new-default (my own read, unchanged). The away-entry refusal is a restore. The holder-naming block and two-choice offer on the default session-start digest are new presentation on the unconfigured path. So once it's attested and green, this goes to Kun as a merge-or-leave decision rather than auto-merging. VISION.md: unchanged from my 02:18Z note; Authority aligns more strongly now that every writer is guarded. No security concerns. |
bb25e8e to
e712a87
Compare
|
Speaking as Kun's firstmate: thank you @kesslerio. Re-raising through no-mistakes was the missing piece, and the attestation now binds head Where it stands: waiting on you. Three things:
Contract-class: new-default (my own read, unchanged). On its own, the away-entry refusal is a restore. The holder-naming block and the two-choice offer in the default session-start digest are new presentation on the unconfigured path. VISION.md: One captain aligns · Authority aligns, but only once the check-then-write window is closed or explained, because "a read-only session must not record an away mandate" is the authority promise this PR keeps · Scripts aligns · Restart aligns · Delegation pending the digest live evidence · Vendor aligns · Scope aligns. No security concerns. Once those are settled and CI is green, this goes to Kun as a merge-or-leave decision, not back to you. |
[Medium impact] The PR appears safe to merge; no actionable new issue was established. Reviews (3) · Last reviewed commit: "no-mistakes(document): Dedupe away-entry..." · Reviewed by Greptile |
|
Addressed the Greptile P2 on quiet-mode wording in 6cd97830.
Verification: Separate note: the base branch moved (main split |
|
Round on the three open items. Attested head: 1. The check-then-write window is closed, not narrowedYou were right that the record's mutation lock was the wrong boundary: it excludes other record writers, not That makes the verdict authoritative rather than merely fresh. The path gained one owner: Lock ordering stays acyclic. The record lock is taken first and the boundary second, and the only two boundary holders ( Regression test ( So the test fails on the old behavior and passes on the new one, rather than asserting that a helper exists. Not changed, deliberately: an ownerless session that sees no proven live holder can still enter, which 2. PID reuse in holder namingAgreed, and it is a documented limit rather than an oversight. 3. The R6 telemetry pin: 5 is the accurate count
4. Live validation of the read-only startup digestDriven end to end with
That closes the gap: 6 of 6 live scenarios now have a passing run. Local verification
Four suites have one failing case each on this host, and I reproduced every one byte-identically at the pre-change head
Serial 4 State of this headThe attestation binds |
|
Speaking as Kun's firstmate: thank you @kesslerio, this round answers all three points from my 10-24 note. The away entry now holds I read head Contract-class: new-default, unchanged. The away-entry refusal on its own is a restore. The holder-naming block and the two-choice offer in the default session-start digest are new on the unconfigured path. VISION: One captain aligns (a vague read-only state becomes a named decision) · Authority aligns (a live foreign holder now refuses the away write atomically, and stopping it stays the operator's call) · Scripts aligns · Restart aligns · Delegation aligns (live evidence now covers 6 of 6 scenarios) · Vendor aligns (portable Next step: this now waits on Kun's merge-or-leave decision, not on you. If he says merge, we resolve the conflict, run the full suite on the merged head and land it. |
The lint telemetry assertion pinned the source-directive count of bin/fm-afk-launch.sh at five, so the away entry's new session-lock source broke it for a reason that says nothing about the telemetry. Derive the expectation from the file with the counter's own predicate, and keep the assertion non-vacuous. Two fixtures recorded the away posture from outside the session that holds the fleet lock, which the record writer now refuses on purpose: the return suite hand-copied the record writer without its new session-lock library, and the supervision-host latch case needs the lock-owning session to record its own mandate. Copy the dependency, and stage the entry inside that session.
A read-only session must not record an away mandate it cannot carry out, but the record's mutation lock only excludes other record writers. An entry could inspect a free fleet lock and then write the record after bin/fm-lock.sh published state/.lock, so the invariant held only by luck. The check and the write it authorizes now run while the entry holds state/.lock.acquire, the boundary bin/fm-lock.sh publishes state/.lock under. bin/fm-session-lock-lib.sh owns that path, so a reader can never serialize on a different file than the publisher writes under. The regression test drives the window itself: with the boundary held and the lock still free, an entry must neither write nor return, and it must refuse by name once the acquisition completes. Removing the hold makes it record the mandate, which is the bug.
The away-authority docs and the entry contract said quiet mode spawns nothing. That is only the ready-supervision path: where attended supervision is unavailable, a quiet entry records its mode and the quiet daemon starts. Say both, keeping the read-only exception that a quiet entry never takes the fleet-lock check. Addresses the Greptile P2 on kunchenguid#7624.
6cd9783 to
db865c8
Compare
|
Speaking as Kun's firstmate: thank you @kesslerio for bringing this up to date with main. The branch no longer conflicts. I read head
There are no workflow, network or credential changes. The no-mistakes attestation binds this head with every step completed, the required check passes, and so do the coverage guard and repo invariants. Greptile is 5/5, and its thread is resolved. One small thing, waiting on you: the re-raise dropped the Optional, and not blocking: your pipeline's document step noticed that Contract-class: new-default (my own read, unchanged). The away-entry refusal on its own is a restore, but the holder-naming block and the two-choice offer in the default session-start digest are new on the unconfigured path. VISION: every rule aligns. After the Closes line is back, the next steps are ours. We run the full suite once main's CI is green again (an unrelated upstream break is holding every PR right now), and then this goes to Kun as a merge-or-leave decision. |
What Changed
fm-afk-launch.sh enternow refuses to write an away record when the session is read-only, i.e. inspection proves another live session holds the fleet lock, naming that holder's pid, live process start time, and age; quiet entries are settled first and never take the check, and stopping the holder is never automatic.bin/fm-afk-contract.sh), which holds the fleet lock's acquisition boundary (state/.lock.acquire) across the check and the write, so a concurrent acquisition cannot overtake the verdict;bin/fm-session-lock-lib.shnow owns that boundary path and the may-record/holder-naming helpers, andbin/fm-lock.shreads the path from it.bin/fm-session-start.shnames the live lock holder in its read-only digest and offers the two choices (stop that session yourself, or keep this one read-only), with matching updates in the afk skill anddocs/configuration.md,docs/architecture.md,docs/scripts.md.Risk Assessment
✅ Low: The change is bounded, serializes away-entry authorization against lock acquisition, and preserves the explicitly accepted ownership and quiet-mode rules; no material defects were substantiated.
Testing
Drove the real product end-to-end in throwaway marked lab homes and through the changed paths' behavior suites. A live foreign session-shaped process recorded in
state/.lockmakesbin/fm-afk-launch.sh enter --words ...and a directbin/fm-afk-contract.sh enterrefuse with the holder's pid, live process start time, and age, leaving no away record; the same holder leaves the quiet entry free to record quiet mode; a dead pid instate/.lockdoes not block the away entry; a standing away record keeps its own mode and its away write is refused under the holder. The acquisition-boundary serialization and the fail-closed holder-summary cases were driven by the suite tests that execute the real contract script against a synthetic acquisition actor and a stubbed holder summary, and the read-only session-start digest (realbin/fm-session-start.shwith a synthetic process table) names the live holder and offers both choices while naming nothing for this session's own lock. Two failures in suites I ran are host-bound and pre-existing: the pty reparent-to-pid-1 e2e infm-session-lock-ancestry.test.shand the Windows-tagged supervision-host case infm-supervision-host-park.test.sh; both reproduce from the base-commit tree, so they are not attributable to this change. One observed edge worth knowing, though consistent with the entry-wide refusal the docs describe: a no-words refresh (readback) of a standing away record is also refused while a foreign live holder holds the lock; the record is untouched and its mode unchanged. No UI surface exists for this CLI change, so the reviewer-visible artifacts are CLI transcripts and test logs.fm-afk-launch.sh enter --words) is refused while another live session holds the fleet lock, the refusal names that holder's pid, live process start time and age, an…another live firstmate session holds the lock (pid 2507554, started Mon Nov 9 20:00:56 2026, age 00:01) ..., rc=1,record present: no; afk-launch-test.log `ok - ente…recorded mode: quiet,recorded words: quiet down); afk-launch-test.log `ok - enter: quiet mode…bin/fm-afk-contract.sh enter --words 'bypass the launcher'prints the holder refusal, rc=1,record present: no; afk-launch-test.log `ok - enter: the record wr…state/.lock= 999999 after the holder exited,enter --words 'merge it when green'rc=0, record present,recorded mode: away; afk-launch-test.log `ok - enter: a sta…ok - away write: an entry started on a free lock waits for the acquisition in flight instead of writing the mandateand `ok - away write: the entry refuses once the serialized ac…ok - away write: a held lock is refused even when holder details cannot be producedwith the message `another live firstmate session holds the lock (pid win:123, started unknown;…ok - a read-only session names the live lock holder with its pid, start time, and age, and offers the two choices(test_read_only_session_names_the_live_lock_holder; asserts…ok - a read-only session does not name its own live lock as another session's holder(test_read_only_session_does_not_name_its_own_lock_as_another_session)ok - enter: a quiet-mode caller on a home holding an away record still writes an away mandate, so the live lock holder refuses that write too; live-afk-refresh-transcript.log sho…Evidence: Live CLI transcript: away refusal, quiet entry with the same live holder, direct record-writer refusal, stale-lock allow (marked disposable lab homes)
Source: Live CLI transcript: away refusal, quiet entry with the same live holder, direct record-writer refusal, stale-lock allow (marked disposable lab homes)
Evidence: Live CLI transcript: no-words and quiet refreshes over a standing away record under a foreign live holder (record untouched, mode away)
Source: Live CLI transcript: no-words and quiet refreshes over a standing away record under a foreign live holder (record untouched, mode away)
Evidence: fm-afk-launch.test.sh: fleet-lock refusal, quiet exception, serialization, and fail-closed holder-summary units pass
Source: fm-afk-launch.test.sh: fleet-lock refusal, quiet exception, serialization, and fail-closed holder-summary units pass
Evidence: fm-session-start.test.sh: read-only digest names the live holder with pid/start/age and offers the two choices
Source: fm-session-start.test.sh: read-only digest names the live holder with pid/start/age and offers the two choices
Evidence: fm-supervision-host-park.test.sh on the change: the ported enter_away_in_session fixture test passes; one Windows-tagged test fails
Source: fm-supervision-host-park.test.sh on the change: the ported enter_away_in_session fixture test passes; one Windows-tagged test fails
Evidence: Same supervision-host-park suite from the base-commit tree: the identical Windows-tagged failure, so it pre-exists this change
Source: Same supervision-host-park suite from the base-commit tree: the identical Windows-tagged failure, so it pre-exists this change
Evidence: fm-session-lock-ancestry.test.sh: pre-existing pid-1 pty-reparent e2e failure at base
Source: fm-session-lock-ancestry.test.sh: pre-existing pid-1 pty-reparent e2e failure at base
Evidence: fm-afk-contract.test.sh and fm-afk-return.test.sh: away/quiet record schema and return-brief regressions pass
Source: fm-afk-contract.test.sh and fm-afk-return.test.sh: away/quiet record schema and return-brief regressions pass
Evidence: fm-session-lock ps-denied and Windows-consumer suites pass
Source: fm-session-lock ps-denied and Windows-consumer suites pass
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.
fm-afk-launch.sh enter --words) is refused while another live session holds the fleet lock, the refusal names that holder's pid, live process start time and age, an…another live firstmate session holds the lock (pid 2507554, started Mon Nov 9 20:00:56 2026, age 00:01) ..., rc=1,record present: no; afk-launch-test.log `ok - ente…recorded mode: quiet,recorded words: quiet down); afk-launch-test.log `ok - enter: quiet mode…bin/fm-afk-contract.sh enter --words 'bypass the launcher'prints the holder refusal, rc=1,record present: no; afk-launch-test.log `ok - enter: the record wr…state/.lock= 999999 after the holder exited,enter --words 'merge it when green'rc=0, record present,recorded mode: away; afk-launch-test.log `ok - enter: a sta…ok - away write: an entry started on a free lock waits for the acquisition in flight instead of writing the mandateand `ok - away write: the entry refuses once the serialized ac…ok - away write: a held lock is refused even when holder details cannot be producedwith the message `another live firstmate session holds the lock (pid win:123, started unknown;…ok - a read-only session names the live lock holder with its pid, start time, and age, and offers the two choices(test_read_only_session_names_the_live_lock_holder; asserts…ok - a read-only session does not name its own live lock as another session's holder(test_read_only_session_does_not_name_its_own_lock_as_another_session)ok - enter: a quiet-mode caller on a home holding an away record still writes an away mandate, so the live lock holder refuses that write too; live-afk-refresh-transcript.log sho…bash tests/fm-afk-launch.test.sh(exit 0; unit_away_entry_refuses_while_another_live_session_holds_the_fleet_lock, unit_away_entry_serializes_against_lock_acquisition, unit_away_guard_refuses_when_holder_summary_fails, plus herdr/tmux terminal-topology e2e)bash tests/fm-afk-contract.test.sh(exit 0)bash tests/fm-afk-return.test.sh(exit 0)FM_TEST_BASE_PATH=/run/current-system/sw/bin:/usr/bin:/bin bash tests/fm-session-start.test.sh(exit 0; test_read_only_session_names_the_live_lock_holder, test_read_only_session_does_not_name_its_own_lock_as_another_session)bash tests/fm-supervision-host-park.test.sh(19/20 ok; the ported enter_away_in_session fixture test passes; test_tagged_lock_holder_reaches_the_engine_whole fails, and fails identically when the same suite runs from the base-commit tree)bash tests/fm-session-lock-ancestry.test.sh,tests/fm-session-lock-ps-denied.test.sh,tests/fm-session-lock-windows-consumers.test.sh(ps-denied and windows-consumers exit 0; ancestry fails only at its pid-1 reparent e2e, identical on the base-commit tree)Manual live drive/tmp/fm-live-afk-entry.sh: marked lab homes + a live foreign session-shaped holder, runningbin/fm-afk-launch.sh enterandbin/fm-afk-contract.sh enterfor away refusal, quiet entry, direct-writer refusal, and stale-lock allowManual live drive/tmp/fm-live-afk-refresh.sh: no-words and quiet refreshes over a standing away record while a foreign holder holds the lock (record unchanged, mode stays away)bin/fm-startup-network.sh:552- The new acquisition-boundary section in fm-session-lock-lib.sh calls fm_session_lock_claim_path 'the one owner of the path', and this script already sources that library, but it still hardcodes$STATE/.lock.acquirehere, at line 557, and at line 589 for its startup-network lease. The same path therefore has a second definition that can drift from the owner and silently break the boundary the away-entry check now relies on. Converting those three uses tofm_session_lock_claim_pathis a behavior-preserving follow-up; I did not make it here because this rebase is scoped to patch-equivalent preservation and the edit is executable code, not documentation.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.