oliver-zehentleitner / maity

clean-up: CLI client: remove the no-op wait --batch flag, bring the state layout docs up to date

Sign in to report

tsk-9t8v53wg9j7g Open

From the clean-up audit (tsk-hgnbapyw7hnh), area 13 (CLI client), read at main 80647565. Numbers are the audit's finding numbers. Paths are under cli/src/maity/ unless stated. A leftover flag and docs drift.

11. maity wait --batch is a leftover flag that does nothing (S, low to medium risk)

  • Files: cli.py:4401-4405 ("the default now … (kept for scripts)"). Nothing reads args.batch. Its only users are tests (cli/tests/test_supervisor.py:1730-1830) and docs: docs/api.md:16231 ("--batch is accepted and is the default") and cli/context/commands.md:143, whose heading still presents --batch as a feature.
  • What is wrong: context/ says the alpha has no legacy users, so a no-op flag kept "for scripts" is a compatibility path the project does not need.
  • Proposal: remove the flag. Update docs/api.md §13, the commands.md entry and the test strings. Check that runner/tmux.py's is_wait detection does not depend on --batch.
  • Risk: an agent loop, skill or briefing that still passes --batch would fail with exit 2. No such caller in the repo outside tests, but older card bodies and briefings on the hub do say maity wait --batch.

16. The state layout in help text and docstrings is out of date (S, no risk)

  • Files: cli.py:75-78 (OUTPUT_DISCIPLINE, shown by maity --help) and state.py:3-8 name only <git common dir>/maity/ with MAITY_STATE_DIR as the override. The code also uses the runner clone's .git/maity (state.py:79-81), a derived identity directory $XDG_STATE_HOME/maity/<host>/<handle>[#<instance>] outside a clone (state.py:112-116, used by cmd_join at cli.py:450 and cli.py:599-610), and a rescued-* directory (state.py:276-286). winacl.py:1 cites context/credentials.md, but the file is cli/context/credentials.md.
  • Proposal: add the three other locations to OUTPUT_DISCIPLINE and the state.py docstring (one line each), and fix the winacl citation. process.md says newcomer docs take CLI behaviour from cli.py's help, so the help text needs to be right.

Effort: 2 x S.

Open question

  • 11 changes docs/api.md §13 (the contract). Does removing the flag need the arbiter's approval, or is it a doc fix because the flag already has no effect? The alternative is to keep it and mark it deprecated in §13.