fix(kanban): close decompose sqlite connections#29550
Closed
namrop wants to merge 1 commit into
Closed
Conversation
Ensure kanban_decompose closes SQLite connections after preserving sqlite3 transaction context-manager semantics. This prevents the gateway auto-decompose loop from leaking kanban DB file descriptors in long-lived processes.
Collaborator
3 tasks
Collaborator
|
Closing as already fixed on main — landed via commit |
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
hermes_cli.kanban_decomposeafter preserving sqlite3 transaction context-manager semanticssqlite3.Connection.__exit__Why
sqlite3.Connectioncontext managers commit/rollback but do not close the underlying connection. In a long-lived gateway process, the kanban auto-decompose loop can repeatedly open kanban DB handles and leak file descriptors until unrelated session/state writes fail withOSError: [Errno 24] Too many open files.Test Plan
with kb.connect() as conn:implementationPYTHONPATH=/tmp/hermes-kanban-fd-pr /Users/luisramirez/Code/hermes-agent-upstream-staged-2026-05-19/.venv/bin/python -m pytest tests/hermes_cli/test_kanban_decompose.py tests/hermes_cli/test_kanban_decompose_db.py -q -o addopts= --tb=short— 19 passedPYTHONPATH=/tmp/hermes-kanban-fd-pr /Users/luisramirez/Code/hermes-agent-upstream-staged-2026-05-19/.venv/bin/python -m py_compile hermes_cli/kanban_decompose.py