insipx/db integrity 7 browser sdk - #4039
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @insipx's task —— View job Code Review CompleteReview Date: August 25, 2026, 14:14 UTC SummaryThis PR successfully exposes database integrity check functionality ( Code Quality ✅Strengths:
Patterns followed correctly:
Potential Issues 🔍No critical issues found. Minor observations:
Performance Considerations ✅Well-designed for performance:
Security Concerns ✅No security issues identified:
Test Coverage ✅Comprehensive test coverage:
Note: Opfs tests are currently skipped (line 7: RecommendationsOptional improvements (not blocking):
ConclusionThis PR is ready to merge. The implementation is clean, follows established patterns, has good test coverage, and introduces no security or performance concerns. The changes successfully expose database integrity checking functionality to browser SDK users in a safe, efficient manner. |
Stacked on #4038. Browser-sdk exposure:
Client.dbIntegrityCheck(level?)plumbed through the client worker RPC (action union + worker switch + WorkerClient), andOpfs.checkDatabaseIntegrity(path, level?)via the OPFS worker (the SAH pool lives in a worker context — a main-thread call would open a second pool). Types re-exported from the package barrel. Verified with real headless-chromium vitest runs against the local backend (client + by-path cases); notetest/Opfs.test.tsisdescribe.skipupstream, so its new case rides along skipped in CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01V1AXHNsnQmHW174i5rRUEb
Note
Add database integrity check methods to browser SDK
ClientandOpfsClient.dbIntegrityCheck(level?)andOpfs.checkDatabaseIntegrity(path, level?)that run read-only checks against the underlying database and return anIntegrityCheckOutcome"client.dbIntegrityCheck"and"opfs.checkDatabaseIntegrity"in client.ts and opfs.ts, and extends theClientActionandOpfsActionunions accordinglyIntegrityCheckOutcomeandIntegrityCheckLeveltypes from@xmtp/wasm-bindingsin index.tsFullintegrity levels forClientandOpfsMacroscope summarized 17532ba.