fix(kanban): fail closed and serialize sqlite writes#31740
Open
usmch1134-droid wants to merge 2 commits into
Open
fix(kanban): fail closed and serialize sqlite writes#31740usmch1134-droid wants to merge 2 commits into
usmch1134-droid wants to merge 2 commits into
Conversation
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
disk I/O errorinstead of treating it as WAL-incompatible fallbackBEGIN IMMEDIATEWhy
On WSL under concurrent Kanban dispatcher/worker load, a board hit SQLite B-tree corruption after generic
disk I/O errorwas handled like a safe WAL fallback. That let workers continue against degraded storage state. This makes IOERR/malformed/not-a-db fail closed and adds app-level write serialization around board mutations.Test plan
PYTHONPATH=. /home/usmc1/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_hermes_state_wal_fallback.py tests/hermes_cli/test_kanban_db.py tests/hermes_cli/test_kanban_multiprocess_integrity.py tests/gateway/test_kanban_sqlite_fatal_errors.py -o addopts= -qmain:192 passed, 1 warning in 12.78sPRAGMA integrity_check=>ok, counts tasks=480 comments=960 events=1846 runs=406Operational notes
--max 1) and run integrity checks before/after batches until confidence is rebuilt.