Skip to content

Quality pass: data persistence / storage#93

Merged
dhilgaertner merged 1 commit intomainfrom
feature/crow-68-quality-pass-persistence
Apr 6, 2026
Merged

Quality pass: data persistence / storage#93
dhilgaertner merged 1 commit intomainfrom
feature/crow-68-quality-pass-persistence

Conversation

@dhilgaertner
Copy link
Copy Markdown
Contributor

@dhilgaertner dhilgaertner commented Apr 5, 2026

Summary

  • Bug fix: SessionRepository.delete() now cascades to terminals (was leaking orphaned records)
  • Bug fix: JSONStore.mutate() holds the lock through disk write to prevent save-order race condition
  • Refactor: Extract duplicated rm-ai-idecrow migration into shared PersistenceSupport helper
  • Refactor: Add error logging to ConfigStore.loadConfig() decode failures (was silently swallowing)
  • Testing: 15 new tests across JSONStore, SessionRepository, and ConfigStore with make test target
  • Docs: Expanded doc comments on threading model, cascade behavior, and storage architecture

Closes #68

Test plan

  • make test — all 15 new CrowPersistence tests + 3 existing CrowCore tests pass
  • make build — full app build succeeds with no regressions
  • Manual: verify session delete cleans up terminal records in store.json
  • Manual: verify corrupt store.json creates .bak backup and recovers

🤖 Generated with Claude Code

@dhilgaertner dhilgaertner requested a review from dgershman as a code owner April 5, 2026 22:48
Fix bugs, improve code quality, add tests, and expand documentation
for the CrowPersistence layer.

Bug fixes:
- SessionRepository.delete() now cascades to terminals (was leaking records)
- JSONStore.mutate() holds lock through disk write (prevents save-order race)

Refactoring:
- Extract duplicated rm-ai-ide → crow migration into PersistenceSupport
- Add error logging to ConfigStore.loadConfig() decode failures

Testing (15 new tests):
- JSONStoreTests: empty creation, persistence, concurrency, corruption backup,
  file permissions, model round-trip
- SessionRepositoryTests: CRUD, delete cascade regression, filtering
- ConfigStoreTests: config round-trip, missing/corrupt files, permissions
- Add CrowPersistenceTests target and `make test`

Documentation:
- Expand doc comments on JSONStore, SessionRepository, ConfigStore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner force-pushed the feature/crow-68-quality-pass-persistence branch from 50a2d0c to 8c2bed5 Compare April 6, 2026 02:13
@dhilgaertner dhilgaertner merged commit d5652bc into main Apr 6, 2026
2 checks passed
@dhilgaertner dhilgaertner deleted the feature/crow-68-quality-pass-persistence branch April 6, 2026 02:15
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.

Quality Pass: Data Persistence / Storage

1 participant