Revert advanced-fault UDS edge case handling

Namely the workaround expected exc branches added in ef7ed7a for the UDS
parametrization. With the new boxing of the underlying CREs as
tpt-closed, we can expect the same exc outcomes as in the TCP cases.

Also this tweaks some error report logging content used while debugging
this,
- properly `repr()` the `TransportClosed.src_exc`-type from
  the maybe emit in `.report_n_maybe_raise()`.
- remove the redudant `chan.raddr` from the "closed abruptly"
  header in the tpt-closed handler of `._rpc.process_messages()`,
  the `Channel.__repr__()` now contains it by default.
ns_aware
Gud Boi 2026-03-13 12:08:36 -04:00
parent 4f333dee05
commit 4092db60b2
3 changed files with 3 additions and 11 deletions

View File

@ -146,9 +146,6 @@ def test_ipc_channel_break_during_stream(
# a user sending ctl-c by raising a KBI.
if pre_aclose_msgstream:
expect_final_exc = KeyboardInterrupt
if tpt_proto == 'uds':
expect_final_exc = TransportClosed
expect_final_cause = trio.BrokenResourceError
# XXX OLD XXX
# if child calls `MsgStream.aclose()` then expect EoC.
@ -169,10 +166,6 @@ def test_ipc_channel_break_during_stream(
if pre_aclose_msgstream:
expect_final_exc = KeyboardInterrupt
if tpt_proto == 'uds':
expect_final_exc = TransportClosed
expect_final_cause = trio.BrokenResourceError
# NOTE when the parent IPC side dies (even if the child does as well
# but the child fails BEFORE the parent) we always expect the
# IPC layer to raise a closed-resource, NEVER do we expect

View File

@ -982,6 +982,7 @@ class TransportClosed(Exception):
'''
__tracebackhide__: bool = hide_tb
message: str = message or self.message
# when a cause is set, slap it onto the log emission.
if cause := self.src_exc:
cause_tb_str: str = ''.join(
@ -989,7 +990,7 @@ class TransportClosed(Exception):
)
message += (
f'{cause_tb_str}\n' # tb
f' {cause}\n' # exc repr
f'{cause!r}\n' # exc repr
)
getattr(

View File

@ -1313,12 +1313,10 @@ async def process_messages(
f'peer IPC channel closed abruptly?\n'
f'\n'
f'<=x[\n'
f' {chan}\n'
f' |_{chan.raddr}\n\n'
f'{chan}\n'
)
+
tc.message
)
# transport **WAS** disconnected