tractor/tests/devx
Gud Boi 5d041effe6 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

(cherry picked from commit d60245777e)
2026-06-09 23:53:14 -04:00
..
__init__.py Officially test proto-ed `stackscope` integration 2025-03-27 13:24:25 -04:00
conftest.py Allow per-call `start_method`/`loglevel` overrides 2026-06-09 23:07:06 -04:00
test_debugger.py Strip ANSI + accept `_create(...)` in devx tests 2026-06-09 22:54:57 -04:00
test_pause_from_non_trio.py Import-or-skip `.devx.` tests requiring `greenback` 2026-06-09 23:05:19 -04:00
test_proctitle.py Add per-actor `setproctitle` via `devx._proctitle` 2026-06-09 23:53:14 -04:00
test_tooling.py Fix `SIGUSR1` tree-dump ordering in `_stackscope` 2026-06-09 23:24:18 -04:00