tractor/tests/devx
Gud Boi d60245777e Add per-actor `setproctitle` via `devx._proctitle`
New `tractor.devx._proctitle` mod sets each
sub-actor's `argv[0]` (and kernel `comm`) to
`tractor[<aid.reprol()>]` — e.g.
`tractor[doggy@1027301b]` — so `ps`/`top`/`htop`
and `acli.pytree`/reaper tooling can identify
actors at a glance without parsing full cmdlines.

Deats,
- `set_actor_proctitle()` wraps the `setproctitle`
  pkg with `ImportError` guard; optional at runtime
  but listed in `pyproject.toml` so default installs
  benefit.
- called early in `_child._actor_child_main()` after
  `Actor` construction, before `_trio_main()` entry.
- tests in `tests/devx/test_proctitle.py`: format
  unit test, `/proc/{cmdline,comm}` integration
  test, negative detection test.

Resolves #457

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-05-08 00:04:48 -04:00
..
__init__.py Officially test proto-ed `stackscope` integration 2025-03-27 13:24:25 -04:00
conftest.py Harden `test_debugger` for forkserver spawners 2026-05-04 19:21:49 -04:00
test_debugger.py Harden `test_debugger` for forkserver spawners 2026-05-04 19:21:49 -04:00
test_pause_from_non_trio.py Update `sync_bp` + tighten `test_pause_from_sync` 2026-04-30 20:54:50 -04:00
test_proctitle.py Add per-actor `setproctitle` via `devx._proctitle` 2026-05-08 00:04:48 -04:00
test_tooling.py Adjust `test_shield_pause` for capsys backends 2026-05-01 19:08:55 -04:00