fix(kanban): surface the link-time demotion of a ready child to todo

A ready child linked under an unfinished parent drops to todo with no
event and no operator signal; the only trace used to be claim_rejected
after a forced promote. Record a dependency_wait event when the demotion
fires, return the gate from link_tasks, warn in the CLI link command,
report gated in the kanban_link tool, and document the gate.
This commit is contained in:
Konstantin Khlopkov
2026-09-14 19:14:17 +03:00
committed by Teknium
parent fa915784cb
commit 35b1609fc3
6 changed files with 95 additions and 8 deletions
+9 -1
View File
@@ -695,8 +695,16 @@ def _cmd_diagnostics(args: argparse.Namespace) -> int:
def _cmd_link(args: argparse.Namespace) -> int:
with kbc.connect_closing() as conn:
kb.link_tasks(conn, args.parent_id, args.child_id)
gated = kb.link_tasks(conn, args.parent_id, args.child_id)
print(f"Linked {args.parent_id} -> {args.child_id}")
if gated:
print(
f"Note: {args.child_id} was ready and is now todo — parent "
f"{args.parent_id} is not done yet. The ready -> running claim "
f"re-checks parents, so the child only runs after the parent "
f"completes; use `hermes kanban unlink {args.parent_id} {args.child_id}` "
f"to run it now."
)
return 0