Doc step-B outcome + prompt-io
Split from the step-B code commit to keep the runtime diff free of `ai/` meta noise, - `ai/conc-anal/ria_nursery_removal_plan.md`: add a "Step-B outcome" section — the empty-nursery collapse, why it's behavior-preserving, the deliberate handler-merge deferral, and the targeted-gate result. - `ai/prompt-io/claude/20260702T172233Z_5cd190c5_*`: NLNet provenance (log + unedited raw) for the step-B work. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codedrop_ria_nursery
parent
5cd190c5c1
commit
d2e812fba5
|
|
@ -179,6 +179,56 @@ racing the 0.5s bound could drop an `errors` entry
|
||||||
`Portal._final_result_msg`/ctx queue state instead of
|
`Portal._final_result_msg`/ctx queue state instead of
|
||||||
time-bounding.
|
time-bounding.
|
||||||
|
|
||||||
|
## Step-B outcome (2026-07-02, done in tree)
|
||||||
|
|
||||||
|
Step A landed as `5cd190c5` (code) + `99310269` (docs).
|
||||||
|
Step B implemented on top (uncommitted):
|
||||||
|
|
||||||
|
- `._ria_nursery` is GONE — the inner
|
||||||
|
`async with (collapse_eg(), trio.open_nursery() as
|
||||||
|
ria_nursery)` layer in
|
||||||
|
`_open_and_supervise_one_cancels_all_nursery` is deleted;
|
||||||
|
`da_nursery` is now the single nursery for ALL subactors.
|
||||||
|
- `ActorNursery.__init__` drops the `ria_nursery` param +
|
||||||
|
the `self._ria_nursery` attr; `start_actor()` drops its
|
||||||
|
`nursery=` escape-hatch param (uses `self._da_nursery`
|
||||||
|
directly).
|
||||||
|
- `._cancel_after_result_on_exit` STAYS — it's the
|
||||||
|
ria-child discriminator for `_reap_ria_portals()`.
|
||||||
|
|
||||||
|
Deliberately NOT done (deferred to its own higher-risk PR,
|
||||||
|
flagged with a TODO at the outer `except`): merging the two
|
||||||
|
error handlers into one. Rationale — collapsing the empty
|
||||||
|
nursery is provably behavior-preserving (a zero-task
|
||||||
|
`trio.open_nursery()` only adds a checkpoint), whereas the
|
||||||
|
inner `except BaseException` (swallow-into-`errors`) and
|
||||||
|
outer `except (...)` (re-raise, safety-net for the inner
|
||||||
|
handler's own non-shielded awaits) have DIFFERENT
|
||||||
|
semantics; merging changes error/cancel propagation and
|
||||||
|
wants isolated review + its own gate. Both handlers are
|
||||||
|
kept, now nested directly under the single nursery.
|
||||||
|
|
||||||
|
Why the collapse is safe: post-step-A NOTHING spawns into
|
||||||
|
`ria_nursery` (its only reader, `run_in_actor`'s
|
||||||
|
`nursery=self._ria_nursery`, was removed in A; the stored
|
||||||
|
attr was never read again). So the layer was pure dead
|
||||||
|
weight.
|
||||||
|
|
||||||
|
Gate (trio backend, all 0-failure):
|
||||||
|
- targeted set (`test_cancellation test_spawning test_local
|
||||||
|
test_rpc test_to_actor`) = 49 passed, 1 xfailed.
|
||||||
|
- tail set (`test_reg_err_types remote_exc_relay
|
||||||
|
resource_cache ringbuf root_infect_asyncio root_runtime
|
||||||
|
runtime shm task_broadcasting trioisms trionics/`) = 63
|
||||||
|
passed, 1 skipped, 5 xfailed.
|
||||||
|
- full-suite head ~73% (subdirs + `test_2way`..`test_pubsub`)
|
||||||
|
= 303 passed before the known-flaky `test_dynamic_pub_sub`
|
||||||
|
TooSlowError stall (pre-existing; same hang in the step-A
|
||||||
|
full run). Suite ran slow this session (~13min vs 555s
|
||||||
|
cold, likely thermal from back-to-back runs), never
|
||||||
|
completing within an 800s bound — but split across the
|
||||||
|
above three runs EVERY module passed under step B.
|
||||||
|
|
||||||
## Verification gate
|
## Verification gate
|
||||||
|
|
||||||
- `tests/test_cancellation.py test_spawning.py test_local.py
|
- `tests/test_cancellation.py test_spawning.py test_local.py
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
---
|
||||||
|
model: claude-opus-4-8
|
||||||
|
service: claude
|
||||||
|
session: c7860302-6a33-4d92-821c-0807d68be464
|
||||||
|
timestamp: 2026-07-02T17:22:33Z
|
||||||
|
git_ref: 5cd190c5
|
||||||
|
scope: code
|
||||||
|
substantive: true
|
||||||
|
raw_file: 20260702T172233Z_5cd190c5_prompt_io.raw.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
|
||||||
|
Branched session (`to_actor_subpkg_POST_WEEKLY_CUTOFF_2OPUS`,
|
||||||
|
now on Opus 4.8) continuing the `._ria_nursery` removal after
|
||||||
|
step A committed + pushed (`5cd190c5`/`99310269`):
|
||||||
|
|
||||||
|
> ok continue where your superior left off please
|
||||||
|
|
||||||
|
then, after the commit-split discussion:
|
||||||
|
|
||||||
|
> yup committed and pushed so take a look ma fren.
|
||||||
|
|
||||||
|
i.e. green-lighting step-B prep against the committed step-A
|
||||||
|
tree.
|
||||||
|
|
||||||
|
## Response summary
|
||||||
|
|
||||||
|
Step B of the `._ria_nursery` removal (issue #477): delete
|
||||||
|
the now-vestigial secondary nursery,
|
||||||
|
|
||||||
|
- collapse the inner `async with (collapse_eg(),
|
||||||
|
trio.open_nursery() as ria_nursery)` layer in
|
||||||
|
`_open_and_supervise_one_cancels_all_nursery` — `da_nursery`
|
||||||
|
becomes the single nursery for ALL subactors.
|
||||||
|
- `ActorNursery.__init__` drops the `ria_nursery` param + the
|
||||||
|
`self._ria_nursery` attr; `start_actor()` drops its
|
||||||
|
`nursery=` escape-hatch param.
|
||||||
|
- `._cancel_after_result_on_exit` kept (ria-child
|
||||||
|
discriminator for `_reap_ria_portals()`).
|
||||||
|
|
||||||
|
Verified behavior-preserving via a first-principles argument
|
||||||
|
(zero-task nursery = a bare checkpoint) + the targeted gate
|
||||||
|
(`test_cancellation test_spawning test_local test_rpc
|
||||||
|
test_to_actor` = 49 passed, 1 xfailed on trio). The two
|
||||||
|
error handlers were deliberately NOT merged — that changes
|
||||||
|
propagation semantics and is deferred to its own PR (TODO
|
||||||
|
left at the outer `except`).
|
||||||
|
|
||||||
|
## Files changed
|
||||||
|
|
||||||
|
- `tractor/runtime/_supervise.py` — collapse the ria nursery
|
||||||
|
layer + drop the ctor/`start_actor` params + refresh the
|
||||||
|
now-stale nursery comments
|
||||||
|
|
||||||
|
## Human edits
|
||||||
|
|
||||||
|
None yet — committed via the drafted
|
||||||
|
`.claude/git_commit_msg_ria_step_b.md` (user-driven
|
||||||
|
`git commit --edit`).
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
model: claude-opus-4-8
|
||||||
|
service: claude
|
||||||
|
timestamp: 2026-07-02T17:22:33Z
|
||||||
|
git_ref: 5cd190c5
|
||||||
|
diff_cmd: git diff 5cd190c5..wkt/to_actor_subpkg
|
||||||
|
---
|
||||||
|
|
||||||
|
# Raw AI output (diff-ref mode)
|
||||||
|
|
||||||
|
Step-B code lives on `wkt/to_actor_subpkg` after `5cd190c5`;
|
||||||
|
per diff-ref mode the verbatim content is reachable via the
|
||||||
|
pointer below.
|
||||||
|
|
||||||
|
## Generated files
|
||||||
|
|
||||||
|
> `git diff 5cd190c5..wkt/to_actor_subpkg -- tractor/runtime/_supervise.py`
|
||||||
|
|
||||||
|
- `ActorNursery.__init__`: `ria_nursery` param removed;
|
||||||
|
`self._ria_nursery = ria_nursery` block deleted;
|
||||||
|
`_cancel_after_result_on_exit` comment refreshed.
|
||||||
|
- `start_actor()`: `nursery=` param removed; body uses
|
||||||
|
`self._da_nursery.start(...)` directly.
|
||||||
|
- `_open_and_supervise_one_cancels_all_nursery()`: the inner
|
||||||
|
`async with (collapse_eg(), trio.open_nursery() as
|
||||||
|
ria_nursery)` layer removed; `an = ActorNursery(actor,
|
||||||
|
da_nursery, errors)` constructed once under the single
|
||||||
|
`da_nursery`; the inner-try body de-indented one level;
|
||||||
|
both error handlers retained; the da-nursery lead comment
|
||||||
|
and the outer-`except` TODO refreshed to describe the
|
||||||
|
single-nursery reality + flag the (deferred) handler-merge.
|
||||||
|
|
||||||
|
> `git diff 5cd190c5..wkt/to_actor_subpkg -- ai/conc-anal/ria_nursery_removal_plan.md`
|
||||||
|
|
||||||
|
Added a "Step-B outcome" section (collapse rationale,
|
||||||
|
handler-merge deferral, safety argument, gate result).
|
||||||
|
|
||||||
|
## Test runs (verbatim)
|
||||||
|
|
||||||
|
```
|
||||||
|
targeted gate (trio):
|
||||||
|
tests/test_cancellation.py tests/test_spawning.py
|
||||||
|
tests/test_local.py tests/test_rpc.py tests/test_to_actor.py
|
||||||
|
-> 49 passed, 1 xfailed in 88.62s
|
||||||
|
|
||||||
|
signature checks:
|
||||||
|
ActorNursery.__init__ params: ['self', 'actor', 'da_nursery', 'errors']
|
||||||
|
start_actor has nursery param: False
|
||||||
|
|
||||||
|
full-suite gate: in progress (see stepB_full.log)
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue