cli + runner: small leftovers: /proc stat parsed twice, unused and test-only re-exports in codexd and watch, _state_dir_line pass-through
tsk-86z6tacfrvvt Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: debt and small copies.
What is wrong
/proc/<pid>/statis parsed twice inmaity.runner, each slicing after the last)and indexing on its own:cli/src/maity/runner/codexd.py:134-137(state, start ticks) andloop.py:250-257(state, pgrp).cli/runner/src/maity_runner/codexd.py:18re-exportsSTOP_TIMEOUT, which nothing reads;:19-21re-exportUPDATER_ARGV,UPDATER_DIR,UPDATER_PIDonly forcli/tests/test_codex_daemon.py(719, 748, 750, 818-837), which already imports the defining module asagents_codexd(:35).cli/runner/src/maity_runner/watch.py:71WIRE_FORMAThas no reader.cli/src/maity/cli.py:2936-2938_state_dir_lineonly forwards tostate.state_dir_line; both forms are used side by side (cli.py:714,:729).
Proposal
- One
/procstat helper returning the fields from field 3 on; delete the unused names and point the test at the defining module; callstate.state_dir_linedirectly.
Effort / risk: S. None.