Repository navigation
fix(turso): stop dispose closeAll from racing sibling idle handlers - #447
Merged
Merged
Conversation
Reference-count plugin instances so only the last dispose closes the shared Turso pool, and revalidate cached DB handles like SkillsManager (#443).
2 of 6 tasks
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
closeAll()while sibling sessions are still alive (refcount viaretainPluginTurso/releasePluginTurso).UserPromptManager,UserProfileManager, andAISessionManagerthe same waySkillsManageralready does after SkillsManager keeps a stale Turso handle after boot-time closeConnection -> 'The database connection is not open' in registerDbSkills #412.logimport inconnection-manager.tsso typecheck/pre-commit can pass on currentmain.Test plan
bun test tests/plugin-turso-refcount.test.ts tests/turso-connection-lifecycle.test.ts tests/skills-manager.test.tsbun run typecheckIdle processing error: database connection is not openChecklist
main(do not open PRs from commits already onmain)bun testpasses (targeted suite for this change)bun run typecheckpasses (or N/A)bun run checkpasses (format + lint + typecheck; or N/A)