tractor/ai
Gud Boi db8dc0e27c Notify unfinished `Context` owners on IPC EOF
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`))
2026-10-30 13:13:37 -04:00
..
conc-anal Restore high-fanout startup cancellation stress 2026-08-26 17:00:44 -04:00
prompt-io Notify unfinished `Context` owners on IPC EOF 2026-10-30 13:13:37 -04:00
tooling-todos Add `logspec` leaf-mod Route B follow-up doc 2026-06-17 15:47:07 -04:00
tpt-backends Model bindspaces as scoped capabilities 2026-09-01 15:47:26 -04:00