Skip to content

fix(turso): stop dispose closeAll from racing sibling idle handlers - #447

Merged
EyJunge1 merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/443-dispose-idle-race
Oct 27, 2026
Merged

EyJunge1 merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/443-dispose-idle-race

Conversation

@EyJunge1

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • bun test tests/plugin-turso-refcount.test.ts tests/turso-connection-lifecycle.test.ts tests/skills-manager.test.ts
  • bun run typecheck
  • Multi-session Desktop: close one session while another's idle/profile-learning runs — no Idle processing error: database connection is not open

Checklist

  • Branch is based on main (do not open PRs from commits already on main)
  • bun test passes (targeted suite for this change)
  • bun run typecheck passes (or N/A)
  • bun run check passes (format + lint + typecheck; or N/A)
  • Docs / README updated when behavior or contribution process changes

Reference-count plugin instances so only the last dispose closes the
shared Turso pool, and revalidate cached DB handles like SkillsManager
(#443).
@EyJunge1
EyJunge1 merged commit f4768cf into tickernelz:main Oct 27, 2026
1 of 6 checks passed
@EyJunge1 EyJunge1 mentioned this pull request Oct 27, 2026
2 of 6 tasks
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.

Dispose-time closeAll() races with a live instance idle handler -> "Idle processing error: TypeError: The database connection is not open"

1 participant