fix(kanban): fail-closed result atomicity (Issue #146) - #2
Conversation
- Require canonical worker result on kanban completion - Fail closed on missing/invalid/null result - Atomic write of result + result_sha256 - Tests: 11 pass, 0 fail
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
unresolved-import |
1 |
unsupported-operator |
1 |
unresolved-reference |
1 |
invalid-argument-type |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3017: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/hermes_cli/test_issue146_fail_closed.py:18: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/hermes_cli/test_kanban_db.py:1174: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["\"ok\":true"]` and `str | None`
tests/stress/test_atypical_scenarios.py:338: [unresolved-reference] unresolved-reference: Name `_valid_result` used when not defined
hermes_cli/kanban_db.py:4209: [invalid-argument-type] invalid-argument-type: Argument to function `len` is incorrect: Expected `Sized`, found `str | None`
✅ Fixed issues (1):
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
Unchanged: 6093 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
|
@中央调度台 GOVERNANCE_CORRECTION actual_state: correction: boundary: |
faf4bb5 to
d50edc5
Compare
- Add _valid_result() helper to all test files returning JSON {"ok":true,"test":true}
- Add result=_valid_result() to all complete_task calls in tests
- Add --result to CLI run_slash calls in tests
- Fix test assertions to match new result-as-summary behavior
- Add result param to create_swarm root completion in kanban_swarm.py
- Install python-dotenv for CLI subprocess tests in CI
d50edc5 to
654e978
Compare
Add _valid_result() helper and pass result= to all complete_task calls in test_kanban_notify.py and test_kanban_notifier.py.
Add _valid_result() helper. Pass result= to all complete_task calls missing it. 17 calls in test_kanban_db.py + 3 in test_kanban_lifecycle_hooks.py.
…notify/db/block_kinds/redaction - test_kanban_tools.py: add _valid_result(), fix 9 _handle_complete calls missing result - test_kanban_notify.py: fix assertion (completed->done) for new event format - test_kanban_db.py: 38 fixes from earlier session - test_kanban_block_kinds.py: add _valid_result(), replace bare result="done" - test_kanban_redaction.py: add _valid_result(), fix 3 _handle_complete calls - test_atypical_scenarios.py: replace result="done" with _valid_result()
Audit hold — do not promoteThis remains a draft infrastructure subcomponent under |
…UTHOR_MAP - Move created_cards phantom check (Gate 1) before result validation so workers get actionable phantom-ID errors instead of 'result must not be None'. Regression from fail-closed NousResearch#146 changes. - Skip result validation for manual CLI/dashboard completions (expected_run_id is None), fixing parent-child cascade and 13 dashboard plugin tests. - Add root@vmi3274155.contaboserver.net to AUTHOR_MAP as ttiger-afk. - Remove duplicate result validation block (copy-paste error). Fixes: Check contributors, test_kanban_tools.py (2), test_kanban_cli.py (1), test_kanban_dashboard_plugin.py (13) — all 17 CI failures.
…cted_run_id test_issue146_fail_closed.py calls complete_task directly after claim_task without passing expected_run_id. Check task status=running as a secondary signal that this is a worker completion requiring strict result validation. This fixes the 7 regression failures in Slice 7/8.
…board tests - Check task status=running as secondary worker-completion signal when expected_run_id is None (covers test_issue146_fail_closed.py) - Update 4 dashboard plugin tests to pass valid JSON results: test_patch_status_done_with_summary_and_metadata test_patch_status_done_without_summary_still_works test_task_detail_includes_runs test_event_dict_includes_run_id Fixes remaining Slice 7/8 (7 tests) + Slice 8/8 (4 tests → 0)
|
Governance audit 2026-06-30: This clears the previous writer-side CI blocker, but this PR must remain draft/unmerged until runtime-side NousResearch#154 acceptance, NousResearch#150 recovery, real Gateway probes, and SG same-SHA verification pass. No merge/deploy/canary release. |
Writer fix for NousResearch#146/NousResearch#154. Requires canonical worker result on kanban completion. Fail-closed on missing/invalid/null result. Attribution: Tiger AI Bot Fleet.