Repository navigation
[teardown] fix: allow stale task cleanup when a pool slot has a new owner (adopt #5993) - #7
Merged
Merged
Conversation
(cherry picked from commit 115333b)
(cherry picked from commit dcbe51a)
…wnership behavior (cherry picked from commit bdcedcf)
…leanup 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 <cursoragent@cursor.com>
keenvc
force-pushed
the
fm/fm-adopt-5993-shared-slot-cleanup
branch
from
September 28, 2026 23:50
5e231b1 to
4aa15a3
Compare
keenvc
marked this pull request as ready for review
September 29, 2026 00:08
This was referenced Sep 30, 2026
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.
Adopts kunchenguid#5993 (cherry-picked with
-xfrom upstream commits by QIanGua).Contract review
Claim-first ordering lets a terminal record whose pool slot is owned by another task finish its own cleanup without touching the claimant's copy, processes, or
.fm-slot-ownermarker. Records that still own their slot keep the exclusivity refusal unchanged (covered bytests/fm-teardown-endpoint-safety.test.sh).Tests
bash tests/fm-teardown-endpoint-safety.test.sh— pass on this branch (forkmainbase)bash bin/fm-lint.sh— passLive before/after (methodology)
Same command both times:
FM_HOME=/home/azureuser/firstmate bin/fm-teardown.sh a11y-5717-review(no--force), on terminal taska11y-5717-reviewwhose recorded worktree/home/azureuser/.treehouse/v10-bfb443/76/v10is also recorded by done taskv12-nic1419-review, with slot claimtask=v12-nic1419-review.Before (pre-fix code on this worktree):
teardown_exit=1, refusal: shared worktree withv12-nic1419-review; owner meta, claim, and checkout HEADcb94a64329left in place.After (this branch):
teardown_exit=0, reassignment warning,teardown a11y-5717-review complete; stale.metaremoved; owner meta unchanged (cmpvs snapshot); slot claim unchanged; owner checkout HEAD stillcb94a64329.