Skip to content

fix(bin): keep a resolved captain hold closed when the mate restates it - #315

Merged
sKeLe100 merged 2 commits into
mainfrom
fm/resolve-key-hold-reopen
Nov 23, 2026
Merged

sKeLe100 merged 2 commits into
mainfrom
fm/resolve-key-hold-reopen

Conversation

@sKeLe100

@sKeLe100 sKeLe100 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

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

  • Added status_captain_hold_reopens_closed in bin/fm-classify-lib.sh. It identifies a needs-decision line with a captain-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. After fm-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.
  • Updated the comment in bin/fm-captain-hold.sh and docs/secondmate-parent-channel.md. Added tests/fm-captain-hold-resolved-no-reopen.test.sh and extended tests/fm-remote-reply.test.sh to 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.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Restated captain hold whose key the parent already resolved or deferred stays closed (parent-channel append and remote mirror ingest, run through the real scripts in the test harness) ✅ pass live tests/fm-captain-hold-resolved-no-reopen.test.sh: 3 ok lines; tests/fm-remote-reply.test.sh: ALL TESTS PASSED
Adversarial: a new-key re-hold and an ordinary or unresolved key still open normally ✅ pass live tests/fm-captain-hold-resolved-no-reopen.test.sh: 'a new occurrence of a captain hold still opens' and 'unresolved restatements and ordinary keys behave as before' both ok

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.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Restated captain hold whose key the parent already resolved or deferred stays closed (parent-channel append and remote mirror ingest, run through the real scripts in the test harness) ✅ pass live tests/fm-captain-hold-resolved-no-reopen.test.sh: 3 ok lines; tests/fm-remote-reply.test.sh: ALL TESTS PASSED
Adversarial: a new-key re-hold and an ordinary or unresolved key still open normally ✅ pass live tests/fm-captain-hold-resolved-no-reopen.test.sh: 'a new occurrence of a captain hold still opens' and 'unresolved restatements and ordinary keys behave as before' both ok
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idle
  • bash tests/fm-captain-hold-resolved-no-reopen.test.sh
  • bash tests/fm-remote-reply.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

sKeLe100 and others added 2 commits November 22, 2026 17:24
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
sKeLe100 force-pushed the fm/resolve-key-hold-reopen branch from 818f2ec to d742dad Compare November 22, 2026 23:15
@sKeLe100
sKeLe100 merged commit 397c859 into main Nov 23, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant