Repository navigation
Conversation
|
keenvc
added a commit
to keenvc/firstmate
that referenced
this pull request
Sep 29, 2026
…wner (adopt kunchenguid#5993) (#7) * Fix reassigned teardown slot collisions (cherry picked from commit 115333b) * no-mistakes(document): Document claim-first pool-slot teardown behavior (cherry picked from commit dcbe51a) * no-mistakes(document): Confirm teardown documentation reflects slot ownership behavior (cherry picked from commit bdcedcf) * fix(teardown): avoid presentation-lock races after claim-first slot cleanup Reassigned-slot teardown with a dead Herdr husk no longer takes the shared presentation session lock, restoring the pre-5993 contention profile for stale records while keeping live-slot protection intact. Herdr presentation recovery spawns now wait up to 120s for that lock and release it on abort so concurrent cross-home recovery cannot fail the 5s try loop after a legitimate holder. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: QIanGua <[email protected]> Co-authored-by: Cursor <[email protected]>
This was referenced Sep 30, 2026
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The captain asked whether a Cursor model can be used to carry out a task, and approved running one real task end to end on that runtime; the concrete task chosen for that run is the recorded cleanup deadlock below.
What must be true when this is done: cleaning up a finished task no longer deadlocks when its recorded pool slot is also named by another task's record. Whichever record no longer owns the slot must still be able to complete its own cleanup, while the slot's current owner and its copy, processes, and claim are left completely untouched. A record that genuinely still owns its slot keeps refusing exactly as it does today.
Observed 2026-09-14 in this home, in its own terms: a new scout was handed a Treehouse pool slot that two earlier tasks still record as their own worktree (both finished, one held for a captain review, neither torn down). Cleanup then deadlocks - bin/fm-teardown.sh's exclusivity scan refuses symmetrically, because each record sees the other naming the same live path, and the slot-owner claim only short-circuits when the OTHER record is unreachable. Tearing down the older record is separately refused (captain-held work is retained, and its unlanded branch work refuses without --force), while clearing worktree= strands the record because endpoint validation rejects an empty worktree unconditionally. Net effect: a finished worker's cleanup is blocked until the older held task is resolved.
The same collision exists live in this home today on two slot paths: two finished records and two held records share one worktree path per pair, and no cleanup of the finished records has been possible since.
What Changed
Risk Assessment
✅ Low: The claim-first check lets a non-owner record complete cleanup without touching the claimed slot, while an owner facing a conflicting record still refuses teardown.
Testing
The focused teardown test file passed on both runs. Its CLI fixture showed the stale task completing cleanup without --force while the claimant’s record, process, claim, and unlanded checkout remained untouched; the worktree contains only the intentional test change. This phase did not exercise a live Cursor runtime.
Evidence: Slot-collision cleanup transcript
Source: Slot-collision cleanup transcript
Teardown completed without --force. The stale record was removed; the claimant’s record, live process, unlanded checkout, and slot claim remained intact. Treehouse return was not invoked.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_TEARDOWN_EVIDENCE_FILE=~/.no-mistakes/evidence/01M3KF59BQ46H9FSGDNDX4FWR4/slot-collision-cleanup.txt bash tests/fm-teardown-endpoint-safety.test.sh(run twice, including after the final test assertions)Inspected the saved teardown transcript and finalgit status --short.✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.