tractor/tractor
Tyler Goodlet 88b55d868f Always `Cancelled`-unmask ctx endpoint excs
To resolve the recently added and failing
`test_remote_exc_relay::test_unmasked_remote_exc`: never allow
`trio.Cancelled` to mask an underlying user-code exception, ever.

Our first real-world (runtime internal) use case for the new
`.trionics.maybe_raise_from_masking_exc()` such that the failing
test now passes with an properly relayed remote RTE unmasking B)

Details,
- flip the `Context._scope_nursery` to the default strict-eg behaviour
  and instead stack its outer scope with a `.trionics.collapse_eg()`.
- wrap the inner-most scope (after `msgops.maybe_limit_plds()`) with
  a `maybe_raise_from_masking_exc()` to ensure user-code errors are
  never masked by `trio.Cancelled`s.

Some err-reporting refinement,
- always capture any `scope_err` from the entire block for debug
  purposes; report it in the `finally` block's log.
- always capture any suppressed `maybe_re`, output from
  `ctx.maybe_raise()`, and `log.cancel()` report it.
2025-07-14 13:15:33 -04:00
..
_testing Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
devx Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-14 13:15:33 -04:00
experimental Add API-modernize-todo on `experimental._pubsub.fan_out_to_ctxs` 2025-07-08 18:05:05 -04:00
ipc Reapply `.devx.debug` mod-name change to ipc-server lost during rebase.. 2025-07-14 00:00:13 -04:00
msg Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
trionics Extend `._taskc.maybe_raise_from_masking_exc()` 2025-07-14 13:15:33 -04:00
__init__.py move tractor._ipc.py into tractor.ipc._chan.py 2025-07-08 12:57:28 -04:00
_addr.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_child.py Adjust `._child` instantiation of `Actor` to use newly named `uuid` arg 2025-07-08 12:57:28 -04:00
_clustering.py Clean up some imports in `._clustering` 2025-03-27 13:38:47 -04:00
_context.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
_discovery.py Fix now invalid `Actor._peers` ref.. 2025-07-09 23:09:41 -04:00
_entry.py Mv `.hide_runtime_frames()` -> `.devx._frame_stack` 2025-07-14 00:00:12 -04:00
_exceptions.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-14 13:15:33 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2025-03-20 19:50:31 -04:00
_portal.py Decouple actor-state from low-level ipc-server 2025-07-08 18:05:05 -04:00
_root.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-14 13:15:33 -04:00
_rpc.py Always `Cancelled`-unmask ctx endpoint excs 2025-07-14 13:15:33 -04:00
_runtime.py Use `nest_from_op()` in some runtime logs for actor-state-repring 2025-07-14 13:15:27 -04:00
_spawn.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
_state.py Add initial `repl_fixture` support B) 2025-07-14 00:00:12 -04:00
_streaming.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
_supervise.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-14 13:15:33 -04:00
log.py Fix ref-err on `logger` input to `get_console_log()` 2025-07-13 23:33:47 -04:00
to_asyncio.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-14 13:15:33 -04:00