fix(KB-610): fix race condition in allocateId and ensure config row exists
- Fix race condition in allocateId and ensure config row exists for reliable settings save - Add comprehensive settings save tests in store.test.ts and SettingsModal.test.tsx - Add changeset documenting the settings save fix - Remove backup functionality from core and CLI (backup.ts, backup.test.ts, backup command) - Update AGENTS.md to remove obsolete backup documentation
This commit is contained in:
10
.changeset/fix-settings-save.md
Normal file
10
.changeset/fix-settings-save.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@dustinbyrne/kb": patch
|
||||
---
|
||||
|
||||
Fix settings save failure by resolving race condition in parallel task creation and ensuring config row exists in SQLite.
|
||||
|
||||
- Fixed race condition in `allocateId()` where parallel task creation could cause `config.json` to have stale `nextId` values by wrapping the config sync in `withConfigLock()`
|
||||
- Changed `writeConfig()` to use `INSERT OR REPLACE` instead of `UPDATE` to ensure the config row is created if missing
|
||||
- Added error handling tests for settings save failures
|
||||
- Added integration tests for SQLite settings persistence
|
||||
Reference in New Issue
Block a user