Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(db): make WAL setup concurrency-safe across packages - #206

Merged
codeaholicguy merged 4 commits into
mainfrom
feature-db-wal-concurrency
Aug 31, 2026
Merged

codeaholicguy merged 4 commits into
mainfrom
feature-db-wal-concurrency

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Summary

  • arm SQLite's 5s busy handler when opening memory, agent-manager, and task-manager connections
  • skip the WAL mode transition when the database is already in WAL mode
  • retry the idempotent pragma sequence once after a 50ms backoff on SQLITE_BUSY
  • add memory regression coverage for concurrent fresh opens, already-WAL and readonly opens, and retry behavior

Validation

  • npm run build
  • npm test
  • npm run lint
  • npm run test:e2e
  • targeted TDD regression proof: 5 passing with fix, 3 failing without fix, 5 passing after restore

Notes

  • no schema/data migration or pragma policy changes
  • full memory coverage tests pass, but the command retains the existing package-wide branch threshold failure (67.54% vs 75%); connection.ts reports 95.34% statements and 88.46% branches

Risks

  • low: synchronous connection bootstrap may add one bounded 50ms delay only after SQLITE_BUSY

@codeaholicguy
codeaholicguy merged commit 0f2d731 into main Aug 31, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-db-wal-concurrency branch August 31, 2026 02:16
codeaholicguy added a commit that referenced this pull request Aug 31, 2026
The 0.57.0 release publish hit npm 403 for @ai-devkit/memory: the WAL concurrency fix (#206) changed packages/memory and task-manager, but the release commit only bumped cli and agent-manager, so npm publish tried to overwrite the already-published 0.16.0. Bump both changed packages so publish workflows can ship the fix.
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