fix(kanban): close sqlite connections in specify helpers#28803
Closed
worlldz wants to merge 2 commits into
Closed
Conversation
fe5e0f4 to
19291bf
Compare
This was referenced May 20, 2026
23 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.
Fixes #28802
hermes_cli.kanban_specifycurrently useswith kb.connect() as conn:in helper paths likelist_triage_ids()andspecify_task().For
sqlite3.Connection, that pattern does not close the connection on exit. It only manages transaction scope, so repeated helper calls leak file descriptors in long-lived processes.This patch switches those helper paths to explicit closing and adds regression coverage for sqlite-like connections whose context manager does not call
close().Validation:
uv run --extra dev pytest tests/hermes_cli/test_kanban_specify.py -q -k 'closes_connection or test_list_triage_ids'Result:
3 passed in 8.46sLive repro before fix:
{'base': 5, 'after': 52, 'delta': 47}Live repro after fix:
{'base': 5, 'after': 5, 'delta': 0}