Repository navigation
fix: let the Stop auto-arm recover an unowned home; alert on wedged away daemon - #4955
marcospaterson wants to merge 3 commits into
Conversation
…wedge alarm at away entry
9f403bd to
7a9dd59
Compare
|
Speaking as Kun's firstmate: waiting-author (contract-class: new-default). Preferred over sibling #4943 for #4927. Tip check ( Does it close #4927? Yes (invariant). Author body correctly rejects the issue's same-group-suppression guess (parallel Stop hooks) and names the real tip bug: arm inert on absent/malformed lock. The stated invariant — home with in-flight work and no live watcher recovers within one turn end — is what the new integrated test asserts. GitHub Contract-class: new-default (mixed; new-default wins). The lock-claim + guard wait half is restore of the existing Stop auto-arm recovery path. Bundled away-entry VISION.md (each rule)
Checks: MERGEABLE / UNSTABLE. Attestation MISSING (no Overlap: Prefer this over #4943 (same author; #4943 lacks the lock-claim wait that the regression needs under load). Open #4026 (CONFLICTING) takes a different approach ( Security FYI: none material — reuses existing No Firstmate escalation yet (attestation/CI not green). Author: please raise via no-mistakes so attestation matches HEAD, then CI can finish. |
… 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 #4928 (scoped).
Change
bin/fm-lock.sh, so a home with in-flight work and no live watcher recovers within one turn end. The guard grants the arm a bounded extra wait (FM_CLAUDE_AUTOARM_LOCK_CLAIM_WAIT_MS, default 2000) when the lock is unowned, because the claim precedes the generation claim. The guard is not made fail-open. Ownership order is documented indocs/turnend-guard.md.docs/wedge-alarm.md).Maintainer verification
test_hook_claude_mode_home_with_no_watcher_and_no_lock_self_heals_in_one_turn_endruns the real guard and real arm together on a home with no lock and no watcher; it fails on the pre-fix arm.fm-lock.shalone takes ~0.4s against the 800ms wait; after the lock-claim allowance it passed 6/6 under 6 CPU-burner processes.tests/fm-turnend-guard.test.shandtests/fm-claude-stop-autoarm.test.shpass;bin/fm-lint.sh(ShellCheck 0.11.0) andbin/fm-doc-audience-check.shpass.tests/fm-afk-launch.test.shpasses except the herdr e2e case, which cannot prepare a lab session on this machine (herdr unavailable).