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:
gsxdsm
2026-03-31 15:47:12 -07:00
parent a6f99f90bb
commit 12e90ae8fb
4 changed files with 164 additions and 8 deletions

View 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