Conversation
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 branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A card linked under an unfinished parent is demoted
ready -> todobylink_taskswith no trace: no event, no operator signal. The card then sits intodo(or, on releases before #106550, after apromote --forcethat claimed success, getsclaim_rejected parents_not_doneat claim time) and the only evidence is buried intask_events. Reported in #110996 as the delegation shape "spawn a support card for the task I am blocked on" producing a silent deadlock.Root cause:
link_tasks(hermes_cli/kanban_db.py) runs the demotion as a bareUPDATE— thelinkedevent says an edge was added, nothing says the child's status was gated. The claim-time re-check inclaim_taskis deliberate ("never ready -> running with an undone parent, whichever writer set 'ready'") and is not changed here.Fix — make the gate observable at every surface, without changing any routing decision:
link_tasksnow returns whether it demoted areadychild, and records adependency_waitevent ({"reason": "parent_not_done", "demoted": true, "parent": <id>}) on the child when the demotion fires, so the board's event stream explains the flip totodo.hermes kanban linkprints a note naming the blocking parent and pointing athermes kanban unlinkwhen the link gated the child.kanban_linkorchestrator tool reportsgated: true(+gated_by) in its success payload instead of a bare ok.kanban_linkrow in the orchestrator tools table now documents the gate.boolreturn oflink_taskskeeps the existing call sites (CLI,kanban_linktool, dashboard plugin API, tests) working unchanged — the dashboard plugin ignores the return value, which is safe: its UI has its own link diagnostics.Testing
On a fresh
mainclone (v0.21.3,345cd2b):RED verified: with the three source files reverted to
main(tests kept), the two new db-layer tests and the CLI test fail (gatedmissing / nodependency_waitevent / no warning), then pass with the fix.ruff checkclean on all touched files; new lines verified untouched byruff format --diff.Fixes #110996