test(kanban): preserve non-zero exit for delegated-child refusals - #70667
Conversation
e5bc232 to
6fcd4b7
Compare
|
@teknium1 Could you please review the current test-only regression coverage for this Kanban CLI bug? The production fix is now on upstream PR #70667 Test evidence on the current PR head:
The PR is currently test-only and awaits the fork workflow/CI gate. |
8746434 to
53d6cf2
Compare
4373670 to
d9bbf56
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for preserving process-boundary coverage after the production behavior landed.
Problems
tests/hermes_cli/test_kanban_cli_exit_status.py:30invokessubprocess.run()without a timeout. A CLI startup or dispatch regression can therefore hang this test worker indefinitely. The existing Kanban CLI helper setstimeout=30attests/hermes_cli/test_kanban_boards.py:300-306.
Suggested changes
- Add a finite timeout (for example,
timeout=30) to_run_hermes().
Current main already returns 1 from the Kanban delegated-child guard (hermes_cli/kanban.py:980-987) and forwards non-zero handler returns to the process exit code (hermes_cli/main.py:12406-12414). This test remains valuable because it exercises that complete CLI boundary.
Automated hermes-sweeper review.
| env["HERMES_DELEGATED_CHILD_CONTEXT"] = "1" | ||
| else: | ||
| env.pop("HERMES_DELEGATED_CHILD_CONTEXT", None) | ||
| return subprocess.run( |
There was a problem hiding this comment.
Please add a finite timeout (for example, timeout=30) here. The comparable Kanban CLI subprocess helper uses one at tests/hermes_cli/test_kanban_boards.py:300-306; without it, a startup or dispatch regression can hang the test worker indefinitely.
d9bbf56 to
133e48c
Compare
|
Review follow-up on exact head |
e915fa7 to
2bd7d95
Compare
73362d9 to
7f8bcfc
Compare
What does this PR do?
Add regression coverage for the Kanban CLI process boundary so a delegated-child refusal remains a non-zero process exit instead of being interpreted as successful automation.
Observed behavior and root cause
The production fix for propagating non-zero command-handler results is already on upstream
main. The remaining contribution is test coverage at the subprocess boundary: the CLI test must observe a refused delegated-child operation as a failure, not merely inspect an in-process return value.Without this regression coverage, an automation caller could treat a rejected Kanban mutation as success even though the user-facing command had refused the operation.
Changes Made
tests/hermes_cli/test_kanban_cli_exit_status.pyfor delegated-child refusal exit status.Related Issue
No standalone issue. The production behavior is already present on upstream
main; this PR preserves the missing regression contract.How to Test
Current exact-head verification
Published head:
7a22b9036f3aab34833e8fba5d025883750517a4Rebased base:
8911e2e0edf750b104edbdc106d63d6cdac88524The repository's canonical isolated test wrapper was run from a clean checkout of that exact head:
This covers the delegated-child Kanban CLI process-exit regression. The candidate checkout remained clean after the run. The full repository suite was not run and is not claimed as passing.
Checklist
Code
test(scope):)pytest tests/ -qand all tests pass — focused canonical coverage was run insteadDocumentation & Housekeeping
cli-config.yaml.exampleis unaffectedCONTRIBUTING.mdandAGENTS.mdare unaffectedProvenance
2416fee97f9c2d8950ffa674148841b2595b73c0mainatde0abc0617794a8c4ae661d2f67f4b23d4ab51fevadelma-agent/hermes-agent