Skip to content

fix: harden kanban sqlite writes - #33325

Closed
Oceanswave wants to merge 1 commit into
NousResearch:mainfrom
Oceanswave:fix/kanban-sqlite-write-hardening
Closed

fix: harden kanban sqlite writes#33325
Oceanswave wants to merge 1 commit into
NousResearch:mainfrom
Oceanswave:fix/kanban-sqlite-write-hardening

Conversation

@Oceanswave

@Oceanswave Oceanswave commented May 27, 2026

Copy link
Copy Markdown

Summary

  • add an explicit PRAGMA busy_timeout=30000 to every Kanban DB connection
  • annotate Kanban SQLite connections with the resolved board DB path
  • serialize same-process write transactions through a per-board Python RLock before BEGIN IMMEDIATE
  • keep the existing SQLite WAL/rollback-journal fallback as the cross-process authority

Tests

  • python -m pytest tests/hermes_cli/test_kanban_db.py::test_connect_sets_explicit_busy_timeout tests/hermes_cli/test_kanban_db.py::test_write_txn_uses_per_database_python_lock -q
  • python -m pytest tests/hermes_cli/test_kanban_db.py tests/hermes_cli/test_kanban_notify.py -q

Context

Follow-up hardening after a real Kanban board DB corruption/recovery incident. This does not replace SQLite's locking; it prevents local gateway/notifier/CLI threads from stampeding the same board DB and makes the cross-process busy wait explicit.

Fixes #32532
Refs #31158

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 27, 2026
@Oceanswave

Copy link
Copy Markdown
Author

Closing because the upstream database hardening changes have now landed, so this duplicate Kanban SQLite write-hardening PR is no longer needed.

@Oceanswave Oceanswave closed this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(kanban): add busy_timeout PRAGMA to prevent WAL corruption under concurrent writers

2 participants