fix(dpp): compile wasm-dpp2 after propertyAgreement and expose it on reference metadata - #4514
fix(dpp): compile wasm-dpp2 after propertyAgreement and expose it on reference metadata#4514QuantumExplorer wants to merge 1 commit into
Conversation
…rence metadata PR #4450 (refersTo reference metadata) and PR #4505 (propertyAgreement on permanentDocument references) were developed in parallel and merged without a rebase between them: #4450's exhaustive destructure of DocumentPropertyReferenceTarget::PermanentDocument does not mention the propertyAgreement field #4505 added, so v4.2-dev fails E0027 in wasm-dpp2 (and everything downstream: wasm-sdk, js-evo-sdk). Rather than ignoring the field, surface it: a permanentDocument reference object now carries propertyAgreement as a plain { referring: referenced } record when the declaration has one, absent otherwise — matching the schema's own omission and the absent-field convention of the other optional target fields. TS custom section, specs (presence + absence) and the js-evo-sdk README updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesThe change adds optional Property agreement references
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR adds an optional propertyAgreement field to permanent-document reference metadata while preserving omission when no agreement exists. The change is localized and tested, with no actionable merge-blocking risk remaining beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 — actively reviewing now (commit 1e70b04) |
Issue being fixed or feature implemented
v4.2-devdoes not compile right now. #4450 (refersTo reference metadata) and #4505 (propertyAgreementon permanentDocument references) were developed in parallel and merged without a rebase between them: #4450's exhaustive destructure ofDocumentPropertyReferenceTarget::PermanentDocumentdoesn't mention theproperty_agreementfield #4505 added, so wasm-dpp2 failsE0027— and wasm-sdk / js-evo-sdk with it. No CI ran on the combination before the merge.What was done?
Rather than papering over the field with
.., surface it — the metadata accessor exists to report what a contract declares, andpropertyAgreementis now part of that:reference_to_jsdestructuresproperty_agreementand, when non-empty, emits it as a plain{ referring: referenced }object on thepermanentDocumentreference. Absent — not{}-valued — when the declaration carries none, matching the schema's own omission and the absent-field convention of the other optional target fields.dist/dpp.d.ts; the compressed d.ts never carries these types, unchanged).parentNoteIdnow declares an agreement; two new specs pin presence (deep-equal) and absence (not.have.property). 1157 wasm-dpp2 specs pass.How Has This Been Tested?
cargo check -p wasm-dpp2 -p wasm-sdk --all-targets(fails E0027 onv4.2-dev, passes here)cargo clippy -p wasm-dpp2 -p wasm-sdk --all-features --all-targets -- -D warningscleancargo test -p wasm-sdk --target wasm32-unknown-unknown) — 6 passed; this lane is not run by CI, and it is where feat: expose protocol v14 ranked queries and document references to JavaScript #4450-style breaks hideyarn workspace @dashevo/wasm-dpp2 build+test— 1157 passing; lint 0 errors (1 pre-existing warning in an unrelated spec)Breaking Changes
None — additive JS metadata field; no consensus surface touched.
Checklist:
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation