tractor/ai/prompt-io/claude/20260702T222544Z_9201a2ed_p...

2.2 KiB
Raw Blame History

Prompt

Continuing on branch drop_ria_nursery after step B (9201a2ed). User green-lit the deferred error-handler merge:

yes, i checked us out on a new branch for the ria-tn removal; work off the new wkt branch drop_ria_nursery.

and (re the migration) “nope, later well do this”, plus:

do ensure the test suite is green in the current state and those going forward ya?

and the standing reminder: no commits without a human ack.

Response summary

Step B2 of the ._ria_nursery removal (issue #477): merge the two nested error handlers in _open_and_supervise_one_cancels_all_nursery into one, now that the 2ndary nursery (whose __aexit__ the outer handler originally guarded) is gone.

Trace-driven justification (see ai/conc-anal/ria_nursery_removal_plan.md Step-B2 section): the old inner handler records errors[uid] as its FIRST action, so errors is always non-empty by the time control could reach the outer handler — making the outer handlers raise DEAD (always superseded by the finallys raise-from-errors). Collapsing to a single except BaseException as _scope_err + the existing finally is therefore behavior-preserving.

  • removed the outer try + the except (Exception, BaseExceptionGroup, trio.Cancelled) handler; de-indented the inner handler one level.
  • dropped the now-unused outer_err/inner_err locals (single _scope_err).
  • net ~30 lines lighter.

Gated hard: baseline (pre-B2 tip) = 300 passed + 1 load-induced TooSlowError flake (passes 6/6 in isolation); B2 error/cancel gate (test_cancellation remote_exc_relay inter_peer_cancellation advanced_faults oob_cancellation to_actor spawning local rpc) = 71 passed, 1 xfailed; B2 full-suite run following.

Files changed

  • tractor/runtime/_supervise.py — collapse the two handlers into one; drop outer_err/inner_err

Human edits

None yet — committed via the drafted .claude/git_commit_msg_ria_b2.md (user-driven git commit --edit).