fix(stow): bound secondmate receipt waits - #2136
Open
4mb1t10n wants to merge 9 commits into
Open
Conversation
…ascade env -i delegate
This was referenced Aug 12, 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.
Intent
Bound
/stow's foreground wait for live secondmate receipts so one slow or missing reply cannot make the command take many minutes, while keeping late and delivery-unknown replies durable.Closes #2095
Decisions
kindparser as required corrections to the new helper's stated safety and durability contracts, not as scope expansion.Reproduction
Before the fix, I exercised the live-secondmate path in a scratch
FM_HOMEwith a fake secondmate endpoint that accepted the marked stow request but never produced its correlated completion receipt. An outer watchdog expired with status 124 while the pending-reply record remainedawaiting_report, demonstrating that the existing per-secondmate wait could hold/stowindefinitely in practice.The regression test failed before the implementation because the bounded fleet delegate did not exist (status 127 instead of the expected bounded pending status 3). It passes after the fix: the helper dispatches every live secondmate first, applies one shared foreground deadline, returns pending within that bound, and leaves the late-reply record durable. Additional cases cover an immediate correlated receipt and ambiguous remote delivery, which must retain its
delivery_unknownrecord.Validation
tests/fm-stow-cascade.test.sh— 9 tests passedbin/fm-lint.sh— passed with pinned ShellCheck 0.11.0bin/fm-doc-audience-check.sh— passedtests/fm-test-run.test.sh— passedThe no-mistakes push gate hit the documented read-only
origin403, so the validated branch was pushed to the4mb1t10nfork as required.Pipeline
Updates from git push no-mistakes