tractor/tractor/_testing
Gud Boi 88cc68edd3 Fix `add_log_level()` re-registration value drift
The bound `StackLevelAdapter.<name>` emit method captured its
level via a `_level: int = value` default-arg at bind time, so
a later `add_log_level(name, <new-value>)` re-registration left
the method emitting at the *stale* original level. Read
`CUSTOM_LEVELS[name_up]` at call time instead — the method binds
once but always tracks the current registered value.

Also,
- correct the `add_log_level()` docstring's "Idempotent" note
  to describe the call-time value lookup (was the misleading
  "no-op-ish refresh (won't clobber an already-bound method)").
- sync stale `_reap.py` doc/comment markers `tractor[` ->
  `_subactor[` to match the actual `_proctitle._def_prefix`
  proc-title prefix (doc-only drift; the code markers already
  referenced `_proctitle._def_prefix`).

Review: PR #467 (copilot-pull-request-reviewer)
https://github.com/goodboy/tractor/pull/467#pullrequestreview-4562945515

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-24 18:03:28 -04:00
..
__init__.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
_reap.py Fix `add_log_level()` re-registration value drift 2026-06-24 18:03:28 -04:00
addr.py Fix `_testing.addr.get_rando_addr` cross-process collisions 2026-06-17 17:39:44 -04:00
fault_simulation.py Start a new `._testing.fault_simulation` 2025-03-24 14:04:51 -04:00
pytest.py Add autouse fixture to reset `_runtime_vars` per-test 2026-06-17 17:39:44 -04:00
samples.py General improvements 2025-07-08 12:57:28 -04:00
trace.py Filter `_find_tractor_strays` by ppid disposition 2026-06-17 17:39:44 -04:00