Commit Graph

10 Commits

Author SHA1 Message Date
teknium1 02005cfe20 fix(kanban): promote refuses undone parents instead of a false --force success
`hermes kanban promote --force <id>` printed `Promoted <id> -> ready` and
then the very next claim (a human `claim`, or the dispatcher tick seconds
later) demoted the task back to `todo` with `claim_rejected
{parents_not_done}` and returned None (#106195). The non-force refusal
even pointed operators at `--force` as the escape hatch.

The claim gate is deliberate: `claim_task` is the single enforcement point
("never ready -> running with an undone parent, whichever writer set
'ready'", cda20eec0c), and `complete_task`/`request_review` re-check the
same predicate, so a child let through by a forced claim could still never
finish. A promotion override therefore has no honest outcome; the
dependency edge is the real knob.

- drop `--force` from `promote` (parser, CLI handler, `promote_task`
  kwarg, the `forced` event field nothing read)
- the refusal message now states why the gate cannot be bypassed and names
  the working remedies: complete the parents or `hermes kanban unlink`
- two invariant tests: refusal on an undone parent leaves `todo` with no
  fake `ready`; the flag no longer parses

Salvage direction from #75354 by @vyacheslavk (diagnosis of the promote ->
claim gap); the consume-at-claim authorization there is not taken because
the same parent gate also blocks completion of the forced child.
2026-09-09 09:21:29 -07:00
Teknium ac07da2674 fix(kanban): enforce declared PR acceptance at completion boundary 2026-09-07 04:46:54 -07:00
Teknium e3ab65fe80 simplify(compat): kanban_db — drop 73 re-exports/aliases, repoint 794 callers 2026-09-03 13:48:14 -07:00
Teknium edfbd77443 refactor(kanban-cli): drop redundant parens on kwarg string concatenations; wrap to 100 cols (AST-identical) 2026-09-02 21:11:18 -07:00
Teknium ea6d0b625d refactor(kanban-cli): parser — drop explicit default=None on optional flags (argparse default; action dump identical) 2026-09-02 20:57:36 -07:00
Teknium 9ed22aac2e refactor(kanban-cli): reflow wrapped string literals to 100 cols (AST-identical; SQL/daemon text untouched) 2026-09-02 20:41:59 -07:00
Teknium 535003c68a refactor(kanban-cli): join implicit string fragments (AST-identical) 2026-09-02 20:37:51 -07:00
Teknium 91995e48a3 refactor(kanban-cli): parser spec tables as module data with shared arg constants (--help byte-identical) 2026-09-02 20:15:18 -07:00
Teknium 1c20028afd refactor(kanban-cli): split the subcommand spec list so no function exceeds 300 LOC 2026-09-02 16:40:44 -07:00
Teknium 5cc3651b3b refactor(kanban-cli): extract data-driven argparse tree to kanban_parser and output helpers to kanban_output 2026-09-02 16:25:20 -07:00