Skip to content

fix: prune commit bug and add store watcher tests#35

Merged
Oaklight merged 1 commit into
masterfrom
worktree-feat+33-store-watcher
Apr 8, 2026
Merged

fix: prune commit bug and add store watcher tests#35
Oaklight merged 1 commit into
masterfrom
worktree-feat+33-store-watcher

Conversation

@Oaklight
Copy link
Copy Markdown
Owner

@Oaklight Oaklight commented Apr 8, 2026

Summary

Follow-up to #34.

  • Fix _prune_locked() not committing when zero rows are deleted, which left an implicit write transaction open and blocked other SQLite connections to the same database
  • Add test_external_writer_with_store_watcher — simulates MCP server writing to shared db while SDK store watcher reads
  • Add test_handler_exception_does_not_block_others — verifies a failing handler doesn't prevent other handlers from receiving messages

Test plan

  • 14 store watcher tests pass (was 12)
  • Full suite: 406 passed
  • ruff check + ruff format clean

Python's sqlite3 module starts an implicit transaction on DELETE even
when zero rows match. Without an unconditional commit, the open write
transaction blocks other connections to the same database.

Also add tests for multi-connection store watcher and handler exception
isolation.
@Oaklight Oaklight force-pushed the worktree-feat+33-store-watcher branch from 3667ce9 to 07460fb Compare April 8, 2026 14:17
@Oaklight Oaklight merged commit aab67c9 into master Apr 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant