fix: bind task custody and delivery to immutable revisions - #1901
Open
Vladykart wants to merge 6 commits into
Open
fix: bind task custody and delivery to immutable revisions#1901Vladykart wants to merge 6 commits into
Vladykart wants to merge 6 commits into
Conversation
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
Harden Firstmate's existing task lifecycle so one authoritative custody check prevents multiple tasks or delivery processes from owning the same isolated worktree while still allowing safe same-task recovery. Bind review, readiness, approval, PR registration, and merge operations to one exact immutable Git revision and refuse moved, missing, malformed, red, or mismatched heads rather than silently rebinding. Cover GitHub and GitLab PR monitoring, guarded local-only delivery, crash recovery, pooled-copy reuse, malformed durable records, and every supported runtime backend. Add executable public-interface regression coverage and authoritative operator and maintainer documentation. Validate and publish committed head 9bee9d0 from branch fm/fm-worktree-revision-binding-p1 as a green pull request, but do not merge it.
What Changed
Risk Assessment
✅ Low: The requested fix removes only the redundant forge lookup while preserving the single publication-bound validation and actionable failure diagnostic.
Testing
Startup baseline completed; focused automated regressions passed for authoritative custody, same-task recovery, malformed records, GitHub/GitLab monitoring, crash recovery, guarded local delivery, teardown, documentation, and tmux/Herdr/Zellij/Orca/cmux backends. The captured end-to-end CLI transcript demonstrates duplicate-custody and moved-head refusals followed by an exact freshly bound merge. No visual artifact was applicable because the changed end-user surfaces are shell CLIs, so reviewer-visible evidence is the direct CLI transcript.
Evidence: End-to-end local revision lifecycle CLI transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-pr-check.sh:69- The forge head is fetched twice consecutively before publication. This doubles API traffic and creates an unnecessary failure/rate-limit window where the first lookup succeeds but the identical second lookup aborts registration. Remove the first lookup block and retain one lookup at the publication boundary.🔧 Fix: Remove redundant forge head lookup
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bin/fm-session-start.shbash tests/fm-backend-orca.test.sh tests/fm-merge-local.test.sh tests/fm-pr-check-security.test.sh tests/fm-pr-merge.test.sh tests/fm-review-diff.test.sh tests/fm-spawn-dispatch-profile.test.sh tests/fm-spawn-worktree-settle.test.sh(executed sequentially)bash tests/fm-documentation-audiences.test.sh tests/fm-task-delivery.test.sh tests/fm-teardown.test.sh tests/fm-teardown-endpoint-safety.test.sh(executed sequentially)bash tests/fm-backend.test.sh tests/fm-backend-herdr.test.sh tests/fm-backend-zellij.test.sh tests/fm-backend-cmux.test.sh tests/fm-backend-tmux-smoke.test.sh(executed sequentially)Manual CLI lifecycle: prepare and review an immutable local revision; attempt conflicting second-task custody; move the branch; verify stale review and merge refusal; re-prepare, review, merge, and compare landed HEAD withready_head✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.