Skip to content

fix(bin): collect follow-up results from remote work homes - #3503

Merged
kunchenguid merged 10 commits into
mainfrom
fm/fm-public-followup-emit-remote-home-r1
Sep 2, 2026
Merged

kunchenguid merged 10 commits into
mainfrom
fm/fm-public-followup-emit-remote-home-r1

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Fix a fundamental gap in firstmate's public-followup EMIT path: a worker in a REMOTE secondmate home could not deliver its typed terminal-result event to the MAIN (owning) home, so a promised public follow-up sat unresolved until firstmate hand-emitted it.

SYMPTOM (reproduced twice, 2026-09-01): fmdev-f1's actionable-update fix (#3268, merged 2026-08-29) never produced a consumable event in the main home; and sshhip-h7 ran the exact fm-public-followup-emit.sh command from its brief for pf-sshhip-purchase-screentime-hint-r1 after merging sshhip #396, yet the main home's 'consume' found nothing and 'deliver' still said the loop was waiting on its bound work.

ROOT CAUSE: 'fm-public-followup.sh brief' printed an emit command carrying '--home

' plus this checkout's own script path. When the bound work lives in a REMOTE secondmate home on ANOTHER HOST, neither path exists there (the mini's firstmate root is ~/fm-homes/firstmate, not the main home's path), so the typed event was written nowhere the main home reads, and the promise stayed open.

WHAT WAS BUILT (accepted requirements, all of which must hold):

  1. The remote-home typed event must reach the MAIN home's typed terminal-result inbox through the EXISTING remote transport - the same fm-on.sh route that already carries work to that secondmate - OR the brief must print a ROUTE-AWARE emit command for a remote work home. Chosen approach: both halves. 'brief' is now route-aware and, for a remote work home, prints that route's OWN code root and home with a new '--stage-in' flag; the worker stages the typed event in its own home's public-followup outbox. The owning home then COLLECTS staged results over the same SSH route via a new bin/fm-public-followup-collect.sh, because the fm-on.sh transport only runs outbound (main -> secondmate), so collection must be a pull; a worker on the other machine has no path back. 'consume' collects first, then reconciles a collected event identically to a local one.
  2. The LOCAL-home path stays BYTE-IDENTICAL: a local work home's brief still prints '--home ' and this checkout's emit script, its closing paragraph still says the home above owns the reply, and the event still lands directly in this home's typed terminal-result inbox. This is asserted behaviorally.
  3. FAIL LOUDLY when the transport cannot deliver - never silently write to a nonexistent path and never drop the event. An unreachable or refusing route is named by obligation id and route id in consume's output with retained-for-reconciliation wording, and consume exits non-zero rather than reporting an empty inbox. Collection is NON-DESTRUCTIVE until the result is durably held by the owning home, so a dropped connection cannot lose a terminal result; retiring the staged copy is best effort by design, and a retained copy is only ever collected again and dropped as a duplicate. '--stage-in' also refuses a path that is not a firstmate home rather than swallowing the result, and refuses being combined with '--home' rather than resolving the ambiguity by argument order.
  4. HERMETIC BEHAVIORAL REGRESSION stubbing the remote transport at its seam, matching how the existing remote cases already fake fm-on.sh/ssh - no live remote home, nothing blocking. Added cases: a typed terminal result emitted in a remote work home reaches the owning home and consume prints the loop ready; an unreachable remote work home fails loudly instead of reporting an empty inbox; a duplicate report from a remote work home stays a no-op (no second public reply, promise unchanged); a local work home's emit path is unchanged; and staging refuses an ambiguous destination and a path that is not a firstmate home.
  5. ALIGNED with the retire-side fix fix(bin): retire public follow-ups in remote homes #3479 (fm-public-followup-retire-remote-home-r1, merged as ee58e39), which fixed the RETIRE/CLEAR side of the SAME root-cause family. This change REUSES the remote-route resolution helpers that landed with it (public_followup_route_is_remote, secondmate_registry_field) rather than introducing a second remote-home-transport abstraction, and is rebased onto current main. Scope is deliberately kept to the EMIT/brief path; the retire/clear side is NOT folded in, and one existing remote case notes that outward delivery from the work home is the retire side's concern.

DELIBERATE DECISIONS a reviewer reading only the diff would not know:

  • Staging + pull was chosen over having the remote worker push to the main home because the established route transport only runs main -> secondmate; a push would have required inventing a reverse path.
  • On the staging side the relay-consent and registration gates deliberately do NOT run, because the registration and the relay consent both live on the other machine; the COLLECTING home re-validates every field against its own registration and tasks-axi before accepting an event, so the authority stays where it always was. A staged event is never posted, never read as a public reply, and never consumed by the staging home's own reconciliation.
  • fm-on.sh returns ssh's status unchanged, so exit 255 is treated as the established 'delivered but completion unknown' status this codebase already reconciles, distinct from a route that refused.
  • Route root/home values are printed into a command line the worker runs verbatim, so they are constrained to a conservative path charset rather than trusted from the record; a remote route with no usable root/home in data/secondmates.md makes 'brief' refuse with a pointer at that record instead of emitting an unusable command.
  • One unusable staged file (oversized or unreadable JSON) is reported on stderr and left in place rather than blocking every other staged result.

CONSTRAINTS the user set: this edits firstmate SHARED, TRACKED material (bin/), so firstmate-coding-guidelines applies and bin/fm-timeout-lib.sh stays the single owner of bounded execution. Bash must stay bash-3.2-safe (macOS default). Tests must be behavioral and must never assert on implementation source text. Every commit carries NO co-author trailer.

What Changed

  • Generate route-aware worker briefs that stage typed terminal results in remote secondmate homes while preserving direct local-home emission.
  • Add non-destructive remote outbox collection before reconciliation, with durable handoff, duplicate safety, route validation, and loud failures for unreachable or unsafe routes.
  • Document the remote collection flow and add hermetic behavioral coverage for remote delivery, failure, replay, staging validation, and unchanged local behavior.

Risk Assessment

✅ Low: The change is well-bounded, preserves the local path, fails loudly on genuine remote collection failures, and the follow-up fixes align collection with open registrations only.

Testing

Inspected the change, ran the focused public-followup suite and individual remote regressions, fixed two outdated test arrangements, then demonstrated the route-aware brief, Bash 3.2 staging, successful pull collection, staged-copy retirement, and fail-loud unreachable-route behavior in a reviewer-visible CLI transcript; all final targeted checks succeeded.

Evidence: Remote public-followup end-to-end and unreachable-route CLI transcript

Source: Remote public-followup end-to-end and unreachable-route CLI transcript

=== Remote worker brief (end-user surface) ===
When this work reaches its promised terminal outcome, report it as typed data
(never as a sentence for someone to parse) by running exactly:

  /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-public-followup.ODCTky/remote-root/bin/fm-public-followup-emit.sh \
    --stage-in /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-public-followup.ODCTky/evidence-remote-remote-mini-default \
    --obligation pf-evidence \
    --relation rel-code \
    --source-home secondmate:mini-default \
    --work-id work-evidence \
    --generation 1 \
    --outcome report-ready \
    --deliverable report_path=<value> \
    --outcome-text '<one bounded public-safe sentence>'

Do not post anything publicly yourself and do not look for the public thread:
the home that owes that reply is on another machine and owns it. Leave the
result exactly where the command above puts it; that home collects it over the
same route it reaches you on, and nothing here needs a path back to it.

=== Worker runs the printed route-aware command ===
$   /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-public-followup.ODCTky/remote-root/bin/fm-public-followup-emit.sh \
    --stage-in /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-public-followup.ODCTky/evidence-remote-remote-mini-default \
    --obligation pf-evidence \
    --relation rel-code \
    --source-home secondmate:mini-default \
    --work-id work-evidence \
    --generation 1 \
    --outcome report-ready \
    --deliverable report_path=data/work-evidence/report.md \
    --outcome-text 'The remote lane finished its investigation.'
6192d0b6dae35f16c598c13b5ac698ab7735818ae07734b2a45d5e9a0494da6b
staged outbox entries before collection: 1

=== Owning home runs consume ===
ready pf-evidence req-evidence discord
owning-loop state: ready
staged outbox entries after collection: 0

=== Owning home consumes while route is unreachable ===
unreached pf-unreachable: the work home mini-default never answered, so its terminal result stays retained there for reconciliation
consume exit: 1
owning-loop state: pending-work

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 2 issues found → auto-fixed (8) ✅
  • 🚨 bin/fm-public-followup.sh:362 - Required criterion 3 says an unreachable/refusing remote route must be named and consume must exit non-zero, while criterion 1 requires a route-aware brief. The new if ! public_followup_route_is_remote ... --home fallback conflates a local route with a missing or unreadable route. Concrete sequence: register/brief a remote obligation, stage its result, then remove or corrupt its secondmates.md record; collection skips it at line 500 and consume exits successfully with an empty inbox. If the record is unavailable before brief, lines 362-364 recreate the original bug by printing this machine's --home path. Also, paths containing .. or // pass lines 368-372 but are later refused by fm-on.sh. Use a route resolution boundary that distinguishes local, valid remote, and unresolved/invalid remote states, and fail loudly for the latter. Because this corrects explicit route behavior required by the author, the remedy needs user review.
  • 🚨 bin/fm-public-followup-emit.sh:207 - Required criterion 3 says --stage-in "refuses a path that is not a firstmate home." The added check accepts any ordinary directory containing a real state/ subdirectory. For example, /tmp/unrelated/state passes and the event is successfully written into /tmp/unrelated/state/public-followup/outbox, where the owning route will never collect it. Validate the established Firstmate/secondmate identity markers—ideally matching .fm-secondmate-home to --source-home—rather than treating state/ alone as proof. This contradicts an explicit acceptance requirement, so the behavioral remedy requires user review.

🔧 Fix: Fail loudly on unresolved routes and invalid staging homes
2 errors still open:

  • 🚨 bin/fm-public-followup.sh:355 - Any current remote record with the same secondmate id is accepted without proving it is the route used when the obligation was registered. Concrete sequence: register and brief against remote route A, let the worker stage its result in A, then reassign that id to route B; consume drains B, receives nothing, and exits 0 while the result remains indefinitely in A. This violates the required same-route delivery and fail-loud invariant. The earliest durable boundary is registration/route resolution: retain enough route identity to detect reassignment before briefing or collecting. Because that remedy adds durable registration state, it requires authorization.
  • 🚨 bin/fm-public-followup-collect.sh:79 - An existing but unreadable or unsafe outbox is treated like an empty one. For example, if state/public-followup/outbox loses search/read permission, the glob yields no readable files, drain exits 0, and owning consume reports no failure although a staged result may remain there. Distinguish an absent outbox from an existing invalid/unreadable outbox and return non-zero for the latter so the owning obligation is reported as unreached.

🔧 Fix: Fail collection when remote outbox is unreadable
1 error still open:

  • 🚨 bin/fm-public-followup.sh:355 - Remote resolution trusts any current record with the same secondmate id, without proving it is the route used when the obligation was registered. If work stages its result on route A and that id is reassigned to route B before consume, collection drains B, finds nothing, exits successfully, and leaves the result stranded on A. This violates the required same-route, fail-loud delivery invariant. Persisting and checking the registered remote route identity adds durable registration state, so the remedy requires authorization.

🔧 Fix: Surface reassigned remote routes during empty collection
2 errors still open:

  • 🚨 bin/fm-public-followup.sh:559 - Every reachable remote obligation still in pending-work is reported as reassigned whenever its worker has not staged a result yet. A normal sequence—register remote work, then run consume before completion—now prints a false retained-result claim and exits non-zero, contradicting the command's silent-empty behavior. This heuristic also misses the claimed reassignment case when obligation_json is unavailable because delivery becomes empty. Distinguishing reassignment from an ordinarily empty route requires durable route identity, which the authorized fix explicitly forbids; revert this heuristic and ask the user to choose between accepting that limitation or authorizing durable identity state.
  • 🚨 bin/fm-public-followup.sh:514 - A missing, unreadable, or corrupt work_home field makes the new collector silently continue. If a result is staged remotely and the owning registration becomes unreadable or loses that field, consume finds no local event and exits 0 while the result remains stranded. Validate each registration before selecting its route and report the obligation as unreached with a non-zero result when its route-bearing registration is invalid.

🔧 Fix: Fail remote collection on invalid registrations
2 errors still open:

  • 🚨 bin/fm-public-followup.sh:566 - A normal unfinished remote obligation is reported as reassigned whenever consume reaches its valid route before the worker stages a result: delivery is pending-work, the remote payload and local inbox are empty, so consume prints a false retained-result claim and exits non-zero. Empty output cannot distinguish ordinary pending work from reassignment without the durable route identity that was explicitly forbidden. Revert this pipeline-added heuristic and ask the user to choose between accepting the documented reassignment limitation or authorizing durable identity state.
  • 🚨 bin/fm-public-followup.sh:510 - The loop skips symlinked or otherwise non-regular registration entries before the new registration validation runs. If a valid remote result is staged and its local registration is replaced by a symlink, the registration presence gate remains active, collection silently skips it, and consume exits 0 with the result stranded remotely. Report such named registry entries as invalid and return non-zero instead of continuing silently.

🔧 Fix: Reject unsafe registration entries during remote collection
1 error still open:

  • 🚨 bin/fm-public-followup.sh:570 - A normal unfinished remote obligation is reported as reassigned whenever consume runs before the worker stages a result: delivery is pending-work, the reachable route returns an empty payload, and no local event exists, so consume falsely claims a retained result and exits non-zero. Empty output cannot distinguish this ordinary state from reassignment without the durable route identity explicitly forbidden by the authorized remedy. Revert the pipeline-added empty-response heuristic and ask whether to accept the documented rare reassignment limitation or authorize route identity state.

🔧 Fix: Restore healthy empty remote collection behavior
1 error still open:

  • 🚨 bin/fm-public-followup.sh:537 - Collection contacts the remote route for every retained remote registration, including obligations whose terminal event is already accepted or whose loop is state=delivered. Concrete sequence: collect and deliver a remote result, retain the delivered registration as required, then run consume while that secondmate is offline; consume falsely reports an unreached retained result and exits non-zero even though no result remains to deliver. Restrict remote collection to obligations still awaiting their terminal work event; because this changes user-visible collection semantics and may require consulting tasks-axi state, confirm the intended selection boundary.

🔧 Fix: Skip remote collection for delivered registrations
1 error still open:

  • 🚨 bin/fm-public-followup.sh:523 - The required delivered-state skip occurs only after full registration validation. A retained record with state=delivered but a missing or invalid relation/work field fails at line 516, prints unreached, and makes consume non-zero despite owing no result. This contradicts the criterion that an already-delivered registration must not produce a false unreached line. Read the existing loop state and skip delivered records before route-bearing validation; authorization is required because this is an intent-conformance finding.

🔧 Fix: Skip delivered registrations before route validation
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-public-followup.test.sh — initial runs exposed stale test assumptions; final focused-suite rerun completed successfully
  • FM_TEST_ONLY=&lt;remote regression&gt; bash tests/fm-public-followup.test.sh for remote delivery, offline delivered registrations, transport failure, unreadable outbox, invalid registration, route loss, empty collection, path safety, duplicate collection, staging refusal, and unchanged local delivery
  • End-to-end hermetic CLI exercise: generated a remote brief, ran its printed --stage-in command with macOS /bin/bash 3.2, collected into the owning home, and verified ready state plus staged-copy retirement
  • Hermetic unreachable-route exercise: ran consume against a fake unreachable SSH route and verified retained-for-reconciliation output, exit 1, and pending-work state
  • Inspected the target diff and final worktree status; removed the transient evidence driver
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

A public commitment whose work is bound to a REMOTE secondmate home could
never receive its typed terminal result. `fm-public-followup.sh brief`
printed an emit command carrying this home's own absolute path and this
checkout's own script path, neither of which exists on the machine the
worker runs on, so the worker had nothing it could write to that the
owning home would ever read - and `consume` kept finding nothing while
the promise stayed open.

The brief is now route-aware: for a remote work home it prints that
route's own code root and home with `--stage-in`, so the typed event is
staged in the home where the work actually runs, and the closing
paragraph names the owning home as the one on the other machine instead
of pointing at the path above it. The owning home collects those staged
results over the same SSH route it reaches that secondmate on, because
the transport only runs outbound: `consume` pulls them into its own
inbox and reconciles them exactly as it reconciles a local report.
Collection is non-destructive until the result is durably held, so a
dropped connection cannot lose a terminal result, and a route that could
not be reached is named in `consume`'s output with the promise left open
rather than reported as an empty inbox.

A local work home is untouched: the brief still prints `--home` with this
home and this checkout's script, and the event still lands directly in
this home's typed terminal-result inbox.

This is the emit-side counterpart of the retire/clear fix in #3479 and
reuses the remote-route resolution that landed with it. Reconciling a
loop bound to a remote route now reaches that route, so the existing
remote cases drive `consume` through the same faked transport their
other steps already use.
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defect identified.

The changed flow validates remote staging homes, retains remote copies until local durable publication, reports route failures, and feeds collected events through the existing authoritative reconciliation and duplicate-suppression path.

Reviews (1): Last reviewed commit: "no-mistakes(document): Document remote f..." | Re-trigger Greptile

@kunchenguid
kunchenguid merged commit 56b4c15 into main Sep 2, 2026
15 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-public-followup-emit-remote-home-r1 branch September 2, 2026 07:12
Marcos-Leyva added a commit to Marcos-Leyva/firstmate that referenced this pull request Sep 3, 2026
)

* fix: surface inbound Relay media to responding agents (kunchenguid#3442)

* fix: surface inbound Relay attachments to the responding agent

A Discord support thread's screenshots were never seen by the agent
handling the mention. The relay delivered them and the poll stashed
them: the reporter's images arrived on the `thread_starter` entry of
`in_reply_to_chain` while the mention's own media list was empty. The
gap was in the responder's playbook, which enumerated a fixed field
list (`request_id`, `text`, `in_reply_to`, `in_reply_to_chain`) and so
made every other field, attachments included, invisible.

Fix it where the gap is, in prose:

- Read the complete payload object rather than a fixed field list, so
  media and later relay fields are never skipped again.
- Fetch and view attached media with the agent's own tools, on the
  mention and on every chain entry, and call out the common shape where
  only the thread starter carries the screenshots.
- Restrict those fetches to known-good platform media hosts over https
  (Discord: cdn.discordapp.com, media.discordapp.net,
  images-ext-1.discordapp.net, images-ext-2.discordapp.net; X:
  pbs.twimg.com, video.twimg.com), report a blocked host instead of
  working around it, and treat everything fetched as untrusted public
  input on the same terms as the surrounding thread text.

The poll stays out of it and downloads nothing, so no third-party bytes
are pulled on the polling path.

The new test pins the contract the playbook depends on: a mention in the
incident's shape, with an empty top-level media list and screenshots on
the thread starter, must reach the inbox with the payload intact and its
media URLs unfetched.

* no-mistakes(review): Preserve media authority and enforce poll-only fetching

* no-mistakes(document): Clarify Relay attachment safety prose

* fix(bin): defer inactive reconciliation during startup (kunchenguid#3480)

* Defer inactive startup reconciliation

* no-mistakes(review): Queue deferred inactive reconciliation diagnostics durably

* no-mistakes(review): Require worker phases to cover startup requests

* no-mistakes(review): Make diagnostic wakes safely acknowledgeable

* no-mistakes(document): Document deferred startup phase coverage

* fix(bin): bound wake drain presentation lock waits (kunchenguid#3475)

* fix: bound status presentation lock waits

* no-mistakes(review): Distinguish malformed presentation locks from live contention

* no-mistakes(review): Bound no-ack drain queue lock acquisition

* no-mistakes(document): Document bounded presentation-lock drain behavior

* no-mistakes(lint): Annotate bounded lock output global

* no-mistakes(ci): Added deterministic regression coverage for successful bounded-lock acquisition after live contention, verifying helper-to-caller PID ownership handoff and caller release. Verified with bash syntax checks, git diff checks, and the full fm-wake-queue test suite

* fix(bin): retire public follow-ups in remote homes (kunchenguid#3479)

* fix(relay): close a public loop whose work lives in a remote secondmate home

A public-followup loop bound to a REMOTE secondmate could never be closed.
`clear_public_followup_link` (bin/fm-public-followup.sh:701) required an
absolute recorded `work_home_path` for a `secondmate:*` work home, but a remote
route has no local path on this machine, so registration records that field
empty (bin/fm-public-followup.sh:291). Every close ran that clear first, so
`retire` died with "could not clear the legacy X link ... retained for
reconciliation" forever, and `deliver` posted the public reply and then stranded
the loop at `posted`. `--force` never covered that step.

The clear now goes to the remote home over that route's SSH transport, running
`fm-x-followup.sh --clear <work-id>` through `bin/fm-on.sh`. The route is decided
from `data/secondmates.md` before any local path is consulted, so a same-named
local directory can never stand in for a remote home, and registrations already
on disk retire without needing a new field. `fm-on.sh` passes ssh's status
through, so 255 stays the established "delivered but completion unknown" result
this codebase already reconciles: the close is refused, the registration and the
remote link are left exactly as they were, and the message names the unknown
completion instead of claiming a definite failure.

Local secondmate and `main` work homes are untouched, and `--force` still
governs only the unresolved-obligation refusal.

Three regression cases drive a remote route end to end, faking only the ssh
binary at the FM_SSH_BIN seam and then running the real remote entrypoint
against a local checkout, so the clear that must reach the remote home actually
happens there.

* no-mistakes(review): Guard remote link clears by request identity

* no-mistakes(review): Fail guarded clears on unreadable remote state

* no-mistakes(review): Reject guarded clears on non-writable remote state

* no-mistakes(review): Allow no-link retirement in non-writable remote state

* no-mistakes(document): Correct public-followup verification guarantee count

* no-mistakes(ci): Fixed the guarded link-clear race by ensuring absence is decided under the metadata lock whenever publication is possible. Added a behavioral concurrency regression test. Verified with fm-x-mode and fm-public-followup suites, Bash syntax checks, diff checks, and bin/fm-lint.sh

* no-mistakes(ci): Fixed the guarded link-clear race by refusing an unlocked absence decision when a publisher already owns the metadata lock in a non-writable directory. Added a behavioral concurrency regression test. Verified with fm-x-mode, fm-public-followup, syntax/diff checks, and fm-lint

* no-mistakes(ci): Fixed the guarded-clear race by refusing all guarded clears when the metadata parent is non-writable, including apparent link absence. Added a behavioral regression with a publisher waiting to create the lock, updated remote-retirement expectations and verification docs. Passed fm-x-mode, fm-public-followup, fm-lint, documentation audience, Bash syntax, and diff checks

* fix(relay): bound the guarded remote link clear so it refuses instead of hanging

The guarded clear checks that the remote state directory is writable before
taking the metadata lock, but that check cannot close the window: the parent can
turn non-writable between the check and lock creation, and a lock held by a live
holder is indistinguishable from that at the acquire. `fm_lock_acquire_wait` is
an unbounded `while ! try; do sleep 0.1; done`, so either case retried forever
and `deliver` or `retire` wedged with nothing reported, instead of returning the
retained-for-reconciliation refusal the guard exists to produce. This path runs
unattended over the secondmate transport, where a wedge is worse than either
outcome the guard defines.

The guarded clear now acquires through `fm_lock_acquire_wait_bounded`
(FMX_LINK_CLEAR_LOCK_TIMEOUT, default 10 seconds) and refuses on timeout through
the existing failure path. Unguarded local callers keep the ordinary unbounded
wait, so local behavior is unchanged.

The bounded primitive's header no longer claims presentation-only scope, since
this is a second authorized caller; nothing else in the shared lock
infrastructure changed.

The regression holds the metadata lock with a genuinely live process while
leaving the state directory writable, so the refusal can only come from the
bound and never from the writability precondition. Against the unbounded wait it
does not terminate at all; with the bound it refuses, retains the registration,
writes no receipt, and leaves the remote link untouched.

* no-mistakes(review): Harden lock-timeout regression with independent deadline

* no-mistakes(review): Restore no-op guarded clears on read-only state

* no-mistakes(document): Clarify remote public-followup cleanup contract

* fix(bin): support process events under symlinked homes (