Repository navigation
fix(bin): keep a resolved captain hold closed when the mate restates it - #315
Merged
Merged
Conversation
A secondmate that restates a captain hold after the parent answered or deferred it (fm-send --resolve-key) republished needs-decision under the same captain-hold-<task>-<n> key, reopening a settled call in OPEN DECISIONS on every drain. The parent-channel writer and the remote reply mirror now skip a needs-decision whose structured captain-hold key the destination status log already closes; a genuine re-hold after a recorded answer carries the next occurrence key and still opens.
sKeLe100
force-pushed
the
fm/resolve-key-hold-reopen
branch
from
November 22, 2026 23:15
818f2ec to
d742dad
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
Captain's standing order for this session's gaps: "We should be filing any tasks in relation to the gaps mentioned this session as priority 0 on pc01 and within resources."
The gap: answering pc02-mate's captain-hold key (captain-hold-test-compute-private-repos-1) with fm-send --resolve-key was immediately followed by a fresh needs-decision line with the same key from the hold mirror, so a hold the captain already deferred keeps reappearing in OPEN DECISIONS on every drain. A deferred or already-answered captain hold should stay silent until it is actually due.
What Changed
status_captain_hold_reopens_closedinbin/fm-classify-lib.sh. It identifies aneeds-decisionline with acaptain-hold-<task>-<n>key that the status log already closes with a resolution or captain-held record. A re-hold after a recorded answer arrives under a new key, so it still opens.fm_parent_channel_append_once(bin/fm-parent-channel-lib.sh) and the remote reply ingest (bin/fm-procevent-remote-reply.sh) now skip such lines before appending. Afterfm-send --resolve-key, a restated hold no longer reappears in OPEN DECISIONS. The remote source line is still recorded as mirrored, so it does not return.bin/fm-captain-hold.shanddocs/secondmate-parent-channel.md. Addedtests/fm-captain-hold-resolved-no-reopen.test.shand extendedtests/fm-remote-reply.test.shto cover the local and remote routes.Risk Assessment
✅ Low: The change is a narrowly scoped append filter for already-closed captain-hold keys, applied consistently on both the local and remote paths, with behavioral tests covering closed, new-occurrence and unresolved cases.
Testing
The baseline changed-test command had already passed. I also ran the new no-reopen test and the remote-reply mirror test; both passed. They cover a restated hold staying closed, a genuinely new hold occurrence still opening, and unrelated keys and unresolved holds behaving as before. I did not drive a live Herdr or tmux lab; the tests run the real scripts against temporary files. The only background job left was my own wait loop, which I killed; nothing is still running.
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.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idlebash tests/fm-captain-hold-resolved-no-reopen.test.shbash tests/fm-remote-reply.test.sh✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.