feat(node-sdk): expose dbIntegrityCheck and checkDatabaseIntegrity - #4028
feat(node-sdk): expose dbIntegrityCheck and checkDatabaseIntegrity#4028insipx wants to merge 1 commit into
Conversation
|
Claude finished @insipx's task —— View job PR Review - 2026-08-27 15:47 UTC
SummaryThis PR cleanly exposes the database integrity check functionality in the Node SDK layer. The implementation is straightforward and follows existing patterns in the codebase. Code Quality: ✅ GoodClient.ts (lines 325-342)
index.ts (lines 79, 118)
Test Coverage:
|
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, isolated Node SDK API-surface addition that forwards to already-existing integrity-check bindings only when explicitly invoked. Existing behavior, stored data, and production configuration remain unchanged. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
e121360 to
8e88dbd
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4028 +/- ##
==========================================
- Coverage 86.00% 85.91% -0.09%
==========================================
Files 417 420 +3
Lines 68165 68829 +664
==========================================
+ Hits 58622 59137 +515
- Misses 9543 9692 +149 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…and URI delimiters in paths The salt sidecar's contents were interpolated into a PRAGMA executed before query_only=ON; a corrupted or tampered sidecar could inject writable SQL. Salt is now validated as exactly 32 hex chars before interpolation. The file: URI open now percent-encodes '%', '?', '#' so paths containing URI delimiters open the same file that was validated. Addresses Macroscope review feedback on #4028. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
check_database_integrity read the salt sidecar before any existence check, so a deleted or mistyped encrypted-DB path returned the misleading SaltMissing instead of the documented missing-database Failed result. Addresses Macroscope review feedback on #4028. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
e3cd796 to
2c58fbf
Compare
2c58fbf to
69745ac
Compare
69745ac to
82a6613
Compare
ffcd028 to
d2e32a6
Compare
d2e32a6 to
324f9cf
Compare
38ad1e4 to
aff1d1c
Compare
19fd1a9 to
a355b22
Compare
a355b22 to
7bfc39c
Compare
7bfc39c to
7178f35
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7178f35 to
f4a43d0
Compare
Top of the DB-integrity-check stack (on #4032). Re-exports the node bindings' integrity API through
@xmtp/node-sdk:Client.dbIntegrityCheck(level?)and the package-levelcheckDatabaseIntegrity/IntegrityCheckLevel/IntegrityCheckOutcome. Typecheck + eslint clean.See #4029 for the feature overview and testing summary.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V1AXHNsnQmHW174i5rRUEb
Note
Expose
dbIntegrityCheckonClientand re-exportcheckDatabaseIntegrityfrom Node SDK indexClient.dbIntegrityCheck(level?)in Client.ts that delegates to the underlyingNodeClientinstance.checkDatabaseIntegrity,IntegrityCheckLevel, andIntegrityCheckOutcomefrom@xmtp/node-bindingsin index.ts.Client.dbIntegrityCheckthrowsClientNotInitializedErrorif called before the client is initialized.Macroscope summarized f4a43d0.