Skip to content

Treat a recovery repost the remote already holds as delivered - #287

Merged
trillium merged 3 commits into
mainfrom
fm/pending-reply-recovery-false-block
Nov 4, 2026
Merged

trillium merged 3 commits into
mainfrom
fm/pending-reply-recovery-false-block

Conversation

@trillium

@trillium trillium commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

When the parent re-posts a "report required" nudge to a remote secondmate that already holds the original request, an ambiguous transport result (connection lost or over budget after the remote inbox already recorded the nudge) was treated as a failed delivery. That wrote a pending-reply-recovery-delivery-failed blocked line, which surfaces as a false needs-decision.

The nudge body is deterministic, so the remote enqueue already deduplicates an identical resend onto the same record. The recovery send now retries the identical fm-send once when it reports an unconfirmed result; the retry lands on the existing record and counts as delivered. A failure fm-send did not mark unconfirmed, or one that persists on the retry, behaves exactly as before.

I could not capture the original failing stderr (recovery discards it), so the unconfirmed-completion path is the identified cause rather than a proven one.

What a human sees

No new command or screen. A remote secondmate that received a steer but has not yet replied no longer gets a spurious blocked decision in its status when the follow-up nudge's transport result is ambiguous. A genuinely unreachable remote still writes the same blocked line.

flowchart LR
  subgraph Before
    A1[recovery nudge sent] --> B1[remote records it, link drops: unconfirmed] --> C1[marked failed] --> D1[false blocked decision]
  end
  subgraph After
    A2[recovery nudge sent] --> B2[unconfirmed] --> E2[identical retry dedups onto same record] --> F2[delivered, no blocked line]
    B2 -.link still down.-> G2[failed, blocked line as before]
  end
Loading

Test transcript (tests/fm-send-remote-delivery.test.sh):

ok - fm-send remote: a recovery repost the remote already holds is delivered, not a blocked decision
ok - fm-send remote: a genuine recovery transport failure still writes its blocked line

The first test fails without the retry. tests/fm-pending-reply.test.sh also passes.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d08a05b5-fb02-40d8-8491-198502ccbdc7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A remote steer can end with completion unknown (transport lost or over
budget) after the remote inbox already holds the record. The recovery
repost body is deterministic, so the remote enqueue deduplicates an
identical resend onto the same record. Retry the identical fm-send once
when it reports an unconfirmed result, so a repost the remote already
holds reads as delivered instead of writing a false
pending-reply-recovery-delivery-failed blocked line. A failure fm-send
did not mark unconfirmed, or one that persists on the retry, still
surfaces unchanged.
@trillium
trillium force-pushed the fm/pending-reply-recovery-false-block branch from ff0929d to e48479e Compare November 4, 2026 03:02
@trillium
trillium merged commit 68ed8bc into main Nov 4, 2026
25 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