Save the proposed transport-fault handling for discovered peers.
`process_messages()` reports EOF then exits, leaving parent ctx
owners blocked until another send detects the loss. Wake unfinished
owners on that exact channel with `TransportClosed`, including
owners paused at application checkpoints unrelated to IPC.
This scope-cancellation policy remains provisional pending the
transport contract discussion. Saving the impl and regression cases
on this branch does not settle that policy or imply acceptance.
Deats,
- Match `Context.chan` by identity and notify all unfinished parent
ctxs on the failed connection, leaving other channels alone.
- Preserve received outcomes and record buffered `Return` receipt
using the `Unresolved` sentinel before EOF can replace success.
- Keep local transport loss distinct from a remote cancellation
request: do not invent `Context._canceller` provenance.
- Preserve the original disconnect cause through owner cancellation
and unwinding in `Context._maybe_raise_remote_err()`.
Also,
- Exercise two owners sharing a discovered sibling channel, blocked
in stream receive or an application `Event`, plus a healthy peer
that continues to echo after fault handling.
- Synchronize EOF injection after startup and task quiescence.
Cover drained and buffered final results without timing sleeps.
- Regress cause preservation directly with a connection-reset cause
and a distinct owner-unwinding exception.
- Carry the staged structured session provenance unchanged. Its
broader cancellation observations do not expand this boundary;
the root-owned `cancel_soon()` fix remains outside this save.
Exact-tree project tests remain pending in the commit plan. Earlier
session results in the provenance log are not passes for this tree.
Prompt-IO: ai/prompt-io/opencode/20260916_ib_disconnect_cleanup.md
(this patch was generated in some part by `opencode`
using `gpt-6-astra` (`openai`))