chore(dpp): remove orphaned JSON schemas and dead wasm-dpp tests#3470
chore(dpp): remove orphaned JSON schemas and dead wasm-dpp tests#3470
Conversation
… of 6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
identityCreate.json and identityUpdate.json are not referenced anywhere in the codebase; validation is handled entirely by Rust code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validation for these state transitions moved entirely to Rust. identity.json is retained as it is still referenced in test fixtures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both test suites were describe.skip and fully covered by Rust tests in rs-drive-abci and rs-dpp. identity.json had no other references. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
💤 Files with no reviewable changes (15)
📝 WalkthroughWalkthroughRemoved 15 JSON Schema definition files and 2 test suites totaling approximately 1,214 lines. The deleted schemas validated data contract, document, identity, and associated state transition objects across the rs-dpp package. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
⏳ Review in progress (commit cb57e99) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
I verified the PR against the source at d7333f9e9599b7c4eb54be3e92ea825b082112a3. The change is deletion-only: it removes packages/rs-dpp/src/schema/identity/v0/identity.json plus two describe.skip wasm tests that were the only consumers of that file, while the active Rust schema implementation in packages/rs-dpp/src/schema/identity/v0/identity.rs remains intact. I did not find any runtime regressions, broken references, or consensus-critical issues in this diff.
Reviewed commit: d7333f9
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3.1-dev #3470 +/- ##
=========================================
Coverage 84.83% 84.83%
=========================================
Files 2476 2476
Lines 267733 267733
=========================================
Hits 227123 227123
Misses 40610 40610
🚀 New features to boost your workflow:
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
I re-reviewed this PR at 0d0a8cd4 against the checked-out tree. The change remains a pure deletion of 13 unused JSON schema files plus 2 skipped wasm-dpp tests, and the live schema loading path in packages/rs-dpp/src/schema/mod.rs still references only the retained document transition schemas. I did not find any correctness, security, consensus, or test-coverage regressions caused by these deletions.
Reviewed commit: 0d0a8cd
Issue being fixed or feature implemented
rs-dppcontained JSON schema files for identity, data contract, and document state transitions that were never loaded by any code — validation for these transitions moved entirely to native Rust. These orphaned files were misleading (e.g.identityUpdate.jsondeclaredaddPublicKeys.maxItems: 10while Rust enforces 6) and would inevitably drift further from the actual implementation. This was causing confusion when updating docs also.What was done?
packages/rs-dpp/src/schema/:identity.json,publicKey.json, allstateTransition/files including asset lock proofsdataContractCreate.json,dataContractUpdate.jsondocumentBase.jsonwasm-dppintegration test files that only existed to referenceidentity.json:validatePublicKeysState.spec.jsvalidateIdentityUpdateTransitionStateFactory.spec.jsThe four document transition schemas loaded via
include_str!inschema/mod.rs(base.json,create.json,replace.json,documentsBatch.json) are retained as they are actively used.How Has This Been Tested?
The deleted JS tests were
describe.skipand covered by existing Rust tests inrs-drive-abci:test_identity_update_duplicate_key_ids_to_disabletest_identity_update_wrong_revisiontest_identity_update_disabling_nonexistent_keytest_identity_update_too_many_keys_to_disableupdate_identities_tests.rsNo new tests added — this is pure deletion of dead code.
Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit