Skip to content

Tell a refused inline apart from an absent owner - #791

Merged
SimonCropp merged 1 commit into
mainfrom
fix-refused-inline-is-not-no-owner
Aug 22, 2026
Merged

Tell a refused inline apart from an absent owner#791
SimonCropp merged 1 commit into
mainfrom
fix-refused-inline-is-not-no-owner

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

TrySendAsync collapsed an error reply and a refused connection into the same
false, and AddInlineAsync read that as "nobody owns the queue" and launched a
viewer. But an owner that answered is still there and still holds the port, so
the launched viewer cannot bind it - and AddInlineAsync returned Queued anyway,
as soon as stdin was written.

So a snapshot the owner declined - an older owner that does not understand the
payload, or a handler that threw - was reported to the caller as queued while
being held by nothing at all. Nothing was staged either, because staging is what
NoViewerFound is for. The snapshot simply vanished, and the test that produced
it went on reporting a failure with nowhere to review it.

SendAsync returns three outcomes instead of two: NoOwner, Accepted, Refused.
TrySendAsync stays as it was, as a wrapper, so PendingFiles and the rest are
untouched. AddInlineAsync launches a viewer only on NoOwner, and reports
NoViewerFound on a refusal - which is accurate from the caller's side, since in
both cases the snapshot is pending nowhere and staging is the right answer.

The rest of that item - RunInline ignoring response.Ok, and persisting through
InlineStaging on a forward failure - is in DiffEngineViewer and not touched
here.

TrySendAsync collapsed an error reply and a refused connection into the same
false, and AddInlineAsync read that as "nobody owns the queue" and launched a
viewer. But an owner that answered is still there and still holds the port, so
the launched viewer cannot bind it - and AddInlineAsync returned Queued anyway,
as soon as stdin was written.

So a snapshot the owner declined - an older owner that does not understand the
payload, or a handler that threw - was reported to the caller as queued while
being held by nothing at all. Nothing was staged either, because staging is what
NoViewerFound is for. The snapshot simply vanished, and the test that produced
it went on reporting a failure with nowhere to review it.

SendAsync returns three outcomes instead of two: NoOwner, Accepted, Refused.
TrySendAsync stays as it was, as a wrapper, so PendingFiles and the rest are
untouched. AddInlineAsync launches a viewer only on NoOwner, and reports
NoViewerFound on a refusal - which is accurate from the caller's side, since in
both cases the snapshot is pending nowhere and staging is the right answer.

The rest of that item - RunInline ignoring response.Ok, and persisting through
InlineStaging on a forward failure - is in DiffEngineViewer and not touched
here.
@SimonCropp
SimonCropp merged commit 6389d5e into main Aug 22, 2026
9 checks passed
@SimonCropp
SimonCropp deleted the fix-refused-inline-is-not-no-owner branch August 22, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant