fix(tools): clarify kanban_complete phantom-card retry guidance - #23072
Closed
konsisumer wants to merge 1 commit into
Closed
fix(tools): clarify kanban_complete phantom-card retry guidance#23072konsisumer wants to merge 1 commit into
konsisumer wants to merge 1 commit into
Conversation
When kanban_complete rejects a created_cards list as hallucinated, the
task is intentionally left in-flight (the gate runs before the write
txn) so the worker can retry with a corrected list or pass
created_cards=[] to skip the check. The retry path already worked, but
the previous error wording read like a terminal failure and workers
were observed abandoning the run instead of trying again.
Spell out the recovery path explicitly in the tool_error response
("Your task is still in-flight ... Retry kanban_complete with ...") and
add regression coverage at both the kernel and tool layers so the
retry contract — and the wording the worker depends on to discover
it — is pinned.
Fixes NousResearch#22923
Contributor
|
Salvage merged via PR #23453 (rebase) — your fix shipped on Clean fix shape — kernel behavior already correct, just messaging legibility for the worker model. The literal-phrase regression tests are exactly the right shape for a fix-by-rewording change since a future reword can silently break worker self-recovery without the rewording being obviously wrong on its own. Thanks @konsisumer — two clean focused PRs in two days. |
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.
Clarify the kanban_complete tool_error returned on a hallucinated-card rejection so the worker can recognize the run is still recoverable, and pin the retry contract with regression tests at both the kernel and tool layers.
What changed and why
tools/kanban_tools.py: rewrote theHallucinatedCardsErrortool_error message to explicitly state "Your task is still in-flight (no state change). Retry kanban_complete with ... created_cards=[] to skip the card-claim check entirely." The kernel already left the task runnable after a phantom rejection, but the previous wording read like a terminal failure, so workers were observed abandoning the run and tripping the failure breaker rather than retrying.tests/hermes_cli/test_kanban_core_functionality.py: newtest_complete_can_retry_after_phantom_rejectionexercises both retry shapes at the kernel level —created_cards=[](escape hatch) and a corrected list — and asserts both the audit and the eventualcompletedevent land.tests/tools/test_kanban_tools.py: three new tool-level tests pin (a) the literal phrasing the worker depends on to discover the retry path, (b) successful retry viacreated_cards=[], and (c) successful retry via a corrected list.No behavior change in the kernel — the fix is the messaging plus the regression tests that make a future reword of the recovery cues fail CI.
How to test
pytest tests/tools/test_kanban_tools.py tests/hermes_cli/test_kanban_core_functionality.py -q --timeout=60(the three new tool-level tests + the new kernel-level test all pass; pre-existing 246-test kanban suite stays green).What platforms tested on
Fixes #22923