fix(bin): accept legacy meta files without endpoint_task_id= in teardown validation - #4
Merged
marcusvpn1 merged 2 commits intoAug 2, 2026
Conversation
… in teardown validation fm_backend_validate_task_endpoint required an exact endpoint_task_id= match for herdr, zellij, orca, and cmux backends, refusing teardown forever for older tasks that predate that field. The tmux backend never had this check, relying instead on window naming convention. Change the per-backend binding check from a strict match to only refuse when endpoint_task_id= is present AND mismatches the task id. Legacy meta files with no endpoint_task_id= field now pass through, while genuine cross-task binding mismatches are still caught by the existing top-level guard.
…requirement claim
marcusvpn1
force-pushed
the
fm/fm-fm-teardown-refuses-legacy-herdr-tasks-m-4b
branch
from
August 2, 2026 11:58
bca6b25 to
9ac48ec
Compare
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
Fix fm_backend_validate_task_endpoint to accept legacy herdr, zellij, orca, and cmux meta files that lack the endpoint_task_id= field, so older tasks that predate that field can be torn down instead of being refused forever. The tmux backend never had this check, relying instead on window naming convention. The fix changes the per-backend binding check from requiring an exact match to only refusing when endpoint_task_id= is present AND mismatches the task id, while the existing top-level guard still catches genuine cross-task binding mismatches.
What Changed
fm_backend_validate_task_endpointinbin/fm-backend.shnow treats the per-backendendpoint_task_id=check for herdr, zellij, orca, and cmux as refuse-only-on-mismatch rather than requiring an exact match, so legacy meta files predating that field pass through instead of being refused forever; the existing top-level guard still catches genuine cross-task binding mismatches.tests/fm-teardown-endpoint-safety.test.shwith legacy-binding cases (herdr, zellij, orca, cmux meta files missingendpoint_task_id=) to cover the new behavior.docs/configuration.mdto correct the stale claim that opaque non-tmux endpoints require a recordedendpoint_task_id=binding, describing the actual refuse-only-on-mismatch behavior.Risk Assessment
✅ Low: The change is a well-scoped, mechanical loosening of four identical binding checks, fully matches the stated intent (legacy meta without endpoint_task_id= now passes, mismatches still refused via the pre-existing top-level guard), and is covered by new tests for each backend; the only issue found is harmless redundant/dead code.
Testing
Ran
tests/fm-teardown-endpoint-safety.test.sh, the shell test suite covering fm_backend_validate_task_endpoint; all 5 assertions passed, including the newly added legacy-meta-file cases for herdr, zellij, orca, and cmux backends (missing endpoint_task_id= now validates and correctly selects backend/target) and the pre-existing mismatch-refusal case, confirming both required behaviors from the intent are satisfied with no regressions and a clean working tree.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
.agents/skills/afk/SKILL.md- branch carries 45 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (171 file(s)) into the PR:Push main to origin, or rebase your branch onto origin/main, before gating.
bin/fm-backend.sh:455- Per-backend binding checks for herdr, zellij, orca, and cmux (bin/fm-backend.sh:455, 474, 490, 513) now duplicate the top-level guard at bin/fm-backend.sh:439-442, which already refuses unconditionally on binding mismatch before the case statement runs. These per-backend blocks are unreachable dead code post-fix; safe to remove as a follow-up simplification, not a functional risk.✅ **Test** - passed
✅ No issues found.
bash tests/fm-teardown-endpoint-safety.test.sh— all 5 test cases pass, including 'cleanup identity: valid and legacy tmux, Herdr, Zellij, Orca, and cmux records validate while every empty backend target refuses', which was extended in this commit with new legacy-binding assertions for herdr-legacy, zellij-legacy, orca-legacy, and cmux-legacy meta files (no endpoint_task_id= field)Manual code inspection of bin/fm-backend.sh:439-514 confirming the top-level guard (line 439-441) still refuses any meta file where endpoint_task_id= is present and mismatches the task id, before backend-specific dispatch, satisfying the 'existing top-level guard still catches genuine cross-task binding mismatches' requirement✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.