Repository navigation
fix: let the Stop auto-arm claim an unowned session lock; verify the wedge alarm at away entry - #4943
marcospaterson wants to merge 1 commit into
Conversation
…wedge alarm at away entry
|
Speaking as Kun's firstmate: waiting-author (contract-class: new-default). Prefer sibling #4955 for the same #4927 fix. Tip check ( Does it close #4927? Would, if preferred — same lock-claim restore invariant. Body correctly says it only covers the entry half of #4928; leave #4928 open. We are not landing this while #4955 is open and strictly stronger. Contract-class: new-default — same mix as #4955 (restore lock-claim + new default-on away-entry verify). Cannot auto-merge. VISION.md (each rule) — same verdicts as #4955 (aligns on peace-of-mind / restart / scripts / spine / fleet / scope; tension on Authority for the new away-start refusal). Checks: MERGEABLE / UNSTABLE. Attestation MISSING. First-time fork CI: workflow-approved. If #4955 merges, this will be closed-overlap with a thank-you naming #4955 — please do not keep both open after one lands. Security FYI: none material. No Firstmate escalation. Help #4955 (rebase/attest there) rather than advancing this duplicate. |
… work is spent Refs kunchenguid#4018 Limits, stated as limits: - It closes nothing. Every forge call is a read, including in the opt-in --sweep mode: no issue is closed, labelled, or commented on, and no backlog is read or written. It is the evidence half of the claim problem, not the loop closure the triage also leaves open. - A fix that cites the issue number nowhere - no PR body, branch, or title, no commit message, and no --symbol the caller supplies - stays invisible to every check. bin/fm-issue-claim.sh runs five read-only checks per issue and prints an inspectable verdict (open, claimed, partially-covered, fixed-on-main, or unknown): timeline cross-references, maintainer triage stamps (OWNER, MEMBER, or COLLABORATOR only; the existing-pr target PR is read for its current state), the complete open-PR corpus fetched by paginated REST and checked against the search API total, the issue author's fork branches (resolved to the PR each heads), and main history since the issue opened (commit messages citing the issue, plus optional caller --symbol pickaxe searches). Issue numbers match only as whole numbers, so 4018 never matches 40181, and a foreign owner/repo#N is not a citation. A failed or rate-limited read, a short or unverified corpus, or a history ref that cannot be searched yields unknown or an explicit disclosure, never open. One corpus is shared across every issue in a run and can be saved and reused across runs with its completeness verdict and age. --sweep is opt-in and report-only: one disposition line per issue (close-candidate, leave-open, no-action, undetermined) with link candidates, judged only from durable evidence and never from titles, branches, PR checks, reviews, or mergeability. An issue with a live PR stamped existing-pr is always leave-open, and merged evidence with incomplete coverage is undetermined rather than a close candidate. Live proof against kunchenguid/firstmate, 2026-09-23, history ref origin/main@9296f9b9, open-PR corpus 1261/1261: - kunchenguid#4927 claimed, reproduced: PR kunchenguid#4943 and PR kunchenguid#4955 (timeline, corpus, fork, and the maintainer existing-pr stamp on kunchenguid#4955), plus kunchenguid#4026 named by the earlier stamp and still open. - kunchenguid#3370 fixed-on-main, reproduced: commit baede47 (kunchenguid#4656), found only by the history check with --symbol 3370:rerecord_device, issue still open. - kunchenguid#4412 partially-covered, reproduced: PR kunchenguid#4775 merged (landed as 9bc051f) and PR kunchenguid#4832 open. - kunchenguid#4466 open, reproduced, with every check complete. - Reporter's cases in one --sweep: kunchenguid#3966 claimed by PR kunchenguid#3977 and kunchenguid#3942 claimed by PR kunchenguid#3978 (leave-open); kunchenguid#3928 (PR kunchenguid#3946) and kunchenguid#3926 (PR kunchenguid#3944) show fixed-on-main and have since been closed on the forge (no-action).
Fixes #4927. Addresses the entry half of #4928.
The problem
A home whose watcher has exited cannot recover on its own. The turn-end guard reports
TURN WOULD END BLINDevery turn, the auto-arm runs but does nothing, and the operator is pushed into the manual arm loop the supervision instructions explicitly forbid.Observed on a live home with in-flight work over several hours:
state/.claude-autoarm-epochstayed frozen at one record across many turn ends while the guard fired each time, and the arm wrapper run by hand succeeded immediately every time.The cause, which is not what the issue first guessed
The issue speculated that the guard's blocking exit prevented the second same-group Stop hook from running. That is wrong, and worth correcting for anyone reading #4927: on Claude 2.1.278 both same-group Stop hooks run in parallel, verified while investigating. The auto-arm does run.
The real cause is that the arm exits early when the session lock is absent or malformed, so it runs, claims nothing, and returns without arming, while the guard keeps blocking on the resulting absence of a watcher.
The change
Verification
Note for reviewers
This was found while the fix's own home was losing supervision, so the manual arm workaround was in use throughout. The guard itself is unchanged and still blocks a genuinely blind stop; only the arm's lock handling changed.