fix(kanban): retry corrupt-board dispatch after quarantine (salvage #33263)#33412
Merged
Conversation
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-attribute |
1 |
First entries
tests/hermes_cli/test_kanban_core_functionality.py:3736: [unresolved-attribute] unresolved-attribute: Attribute `f_back` is not defined on `None` in union `FrameType | None`
✅ Fixed issues: none
Unchanged: 5006 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
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
Salvage of #33263 by @donovan-yohan onto current
main.Changes the gateway-embedded Kanban dispatcher's corrupt-board cache from indefinite suppression to a 5-minute quarantine. After the quarantine expires, the dispatcher retries the same board even when the DB file fingerprint hasn't changed, while still avoiding per-tick retry/log/backup spam. Also catches
KanbanDbCorruptError(aRuntimeError) in addition to the rawsqlite3.DatabaseErrorcorrupt-board path.This is a recovery-layer mitigation, scoped to making the gateway un-stick itself instead of staying wedged on a single board fingerprint until restart. It is not a fix for whatever is actually corrupting the DB.
Closes #33263. Related: #32543, #32593.
Changes
gateway/run.py:disabled_corrupt_boardsnow stores(fingerprint, monotonic_at)instead of just the fingerprint; tick retries afterCORRUPT_BOARD_RETRY_AFTER_SECONDS = 300elapsed even on unchanged fingerprint._is_corrupt_board_db_errornow recognisesKanbanDbCorruptError. Added a separateexcept Exceptionbranch that re-routes corrupt-guard raises through the same quarantine path.tests/hermes_cli/test_kanban_core_functionality.py: parametrised the existing disable-without-traceback test oversqlite3.DatabaseErrorandKanbanDbCorruptError. Addedtest_gateway_dispatcher_retries_corrupt_board_after_quarantine.scripts/release.py: AUTHOR_MAP entry for @donovan-yohan.Validation
scripts/run_tests.sh tests/hermes_cli/test_kanban_core_functionality.py— 167/167 passing.pytest tests/hermes_cli/test_kanban_core_functionality.py -k "gateway_dispatcher_disables_corrupt_board_without_traceback or gateway_dispatcher_retries_corrupt_board_after_quarantine"— 3 passing (parametrize × 2 + new test).Note on the wider cluster
This PR addresses the recovery dimension only. Open separately:
_backup_corrupt_dbis unconditional on every_guard_existing_db_is_healthyfailure): fix: suppress repeated corrupt kanban backups #33319, fix: harden kanban corrupt board quarantine #32094.