Skip to content

feat(dpp)!: refersTo moderatedDocument, a reference that outlives a moderator's removal (PV14) - #5214

Merged
QuantumExplorer merged 3 commits into
v4.2-devfrom
claude/moderatable-tombstone-documents-7968a1
Sep 30, 2026
Merged

QuantumExplorer merged 3 commits into
v4.2-devfrom
claude/moderatable-tombstone-documents-7968a1

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

What this does: A document can point at another document with refersTo. Until now there were two kinds of pointer: permanentDocument, for documents that can never go away, and deletableDocument, for documents that might vanish at any time. This adds a third, moderatedDocument, for documents their author can not delete but the contract's moderators can take down, where every takedown leaves a record behind (who removed it, when, why, and a fingerprint of the document). A reply pointing at such a post stays valid after the post is removed: the pointer now leads to the removal record instead of to nothing.

Value: Apps like Yappr get a precise reference for posts that only moderators remove. Replies, likes and quotes of a removed post keep working and can still be edited, instead of being forced to drop or repoint their reference. Queries that join through such a reference (a feed that shows the quoted post, the posts I liked) now return each removed post with its proven removal record, so a client can show "removed by moderators for spam" rather than a silent gap.

Risks: Medium. It is a consensus change at protocol version 14 (unreleased on mainnet), edited in place. Registration now refuses a deletableDocument reference to a type whose documents only moderators remove on the record, a pairing that was accepted before; writes of a contract registered earlier with that pairing still go through. The join proofs gain one more component, so a join through a moderated reference carries a slightly larger proof. The proto change is additive (a new repeated field 4 on two messages).

Issue being fixed or feature implemented

A document type with canBeDeleted: false and moderatorAbilities.delete could only be referred to with deletableDocument, which assumes the target can vanish without a trace. Every replace of a referring document then had to repoint or clear the reference once a moderator removed the target, and joins reported a removed target as a bare missing id, although the contract holds a removal record for it that nothing ever deletes.

What was done?

A third, disjoint reference kind

Each document type now admits exactly one kind of document reference (DocumentTypeV2Getters::document_reference_kind, a DocumentReferenceKind):

Target type Kind it admits
nothing can remove its documents permanentDocument
canBeDeleted: false, no ttl, moderatorAbilities.delete keeping records (the default) moderatedDocument (new)
anything else (owner deletes, moderator deletes without a record, ttl) deletableDocument
"postId": {
  "type": "array", "byteArray": true, "minItems": 32, "maxItems": 32,
  "contentMediaType": "application/x.dash.dpp.identifier",
  "refersTo": { "type": "moderatedDocument", "documentType": "post" },
  "position": 0
}

Before: "type": "moderatedDocument" was refused by the meta-schema (10101), and a reply to such a post had to declare deletableDocument.
After: it parses to DocumentPropertyReferenceTarget::ModeratedDocument (appended to the enum). Registration refuses a moderatedDocument reference to any other kind of type with ReferencedDocumentTypeNotModeratedError (40143), and a deletableDocument reference to a moderated type with ReferencedDocumentTypeModeratedError (40144).

It takes contractId, documentType and where, by id only: findBy, inList, and use as an anyOf/allOf operand are refused (a removal frees the post's unique index keys, so a key could come to find another document). A writer gate (where entry valued "$ownerId") may compare only the referenced $ownerId or $id (10231 otherwise), since a writer gate is checked on every replace and the record keeps nothing else.

Replace keeps the reference; it resolves to the removal record

The document must exist when the reference is written. A replace re-validates it exactly as a permanentDocument reference. When the value is the one the stored document held (decided from the stored value, so a reference inside an object or a list is kept too) and a moderator removed the target, the validator reads the removal record (billed) and the reference holds through it. A where pair asked about again compares the referenced $ownerId with the record's document owner and $id with the id; any other property refuses the replace with ReferencedDocumentRemovedError (40145).

Before (with deletableDocument, the only option):

moderator removes post P
author edits the body of their reply to P -> ReferencedEntityNotFoundError (40120): repoint or clear postId

After (with moderatedDocument):

moderator removes post P
author edits the body of their reply to P -> accepted, postId still P, resolving to P's removal record
new reply to P                            -> ReferencedEntityNotFoundError (40120): a new value must name a document in state
moderator restores P                      -> P is referred to as any live post again

Joins report removed documents with their proven records

Chained queries and composite by-id joins through a moderatedDocument property add one more component to the merged proof: the removal records of the joined ids, under [64, contract, 2, 16, <document type>] (query::moderated_join). A composite query builds one records component per referenced type. The component names every joined id, so a prover can pass neither a removed document off as missing without its record, nor a live one off as removed; GroveDB refuses a proof that withholds any of them.

Before (join off a deletableDocument property):

ChainedDocuments { outer_documents: [A, C], missing_outer_ids: [B] }

After (join off a moderatedDocument property):

ChainedDocuments { outer_documents: [A, C], missing_outer_ids: [],
                   removed_outer_documents: [{ document_id: B, document_owner_id, moderator_id, reason, removed_at, document_hash }] }

A joined id with neither a document nor a standing record is refused as a missing permanentDocument target is (corrupted state on the server, an invalid proof in the verifier).

Wire: repeated GetContractDocumentRemovalsResponse.ContractDocumentRemoval removed_outer_documents = 4 on ChainedDocuments, removed = 4 on a composite SubQueryResult; generated clients regenerated. rs-drive-proof-verifier and rs-sdk carry removed_outer_documents / sub_result_removals; wasm-sdk returns removedOuterDocuments / removed as JoinedDocumentRemoval objects with Identifier ids, like the joins' other ids.

Other surfaces

  • Errors 40143, 40144, 40145 (StateError discriminants 156-158), mapped in wasm-dpp and wasm-dpp2 (DocumentReferenceErrorCode).
  • wasm-dpp2 DocumentPropertyReference gains the moderatedDocument variant.
  • Book: References, Document References, Deletion, Contract Moderation, Error Codes; js-evo-sdk README; PV14 note 64.

In-place changes to shipped generations

  • validate_data_contract_references v0 and the document reference validation v0 (drive-abci) now compare kinds through document_reference_kind_mismatch. Before protocol version 14 no document type carries moderatorAbilities or ttl, so every type admits permanentDocument or deletableDocument exactly as documents_can_disappear answered before, and a moderatedDocument declaration does not parse; both errors are the same as before for those two kinds. The removal record read is reached only for a moderatedDocument reference, which only the protocol version 14 parser produces.
  • create_document_types_from_document_schemas v1 compares a lookup's kind with the type's instead of a permanent flag with deletability. Lookups (findBy) parse from protocol version 14 only, so the check stays inert before it.
  • Chained and composite queries: the records component and the new result fields appear only for a join off a moderatedDocument property, which exists from protocol version 14 only; every other join builds and verifies the same merged query as before.
  • Meta-schema v3 and parser generation 3 are protocol version 14 only, unreleased on mainnet.

How Has This Been Tested?

  • dpp: full lib (5129 before the review fixes), plus parser tests for the new kind, its refusals (findBy, inList, expressions, a writer gate the record can not answer), the kind classification, typed-array elements, the error discriminants.
  • drive: chained and composite e2e tests for a moderated join (records reported and proven on server and verifier, a target gone without a record refused on both, proofs withholding a record or the whole records component refused by GroveDB), plus the moderation suite (94 tests).
  • drive-abci: new moderated_document_reference tests (registration kinds, keep on replace, repoint and create refused on a removed target, restore, where pairs against the record, typed-array elements and a reference inside an object kept after a removal, and a reference from another contract whose writer gate is checked against the record under the posts contract; the last two were confirmed to fail without their fixes); the chained and composite query handlers return a removed post's record in removed_outer_documents / removed on the unproven wire and verify to it on the proven one; the reference, moderation, query, contract create/update and document batch suites (336 + 805 tests).
  • drive-proof-verifier (336), rs-sdk mock round trip with a removal record, wasm-dpp2 error code tests.
  • clippy clean on dpp, drive, drive-abci, drive-proof-verifier, dash-sdk, dash-platform-queries (all targets) and wasm-sdk, wasm-dpp2, wasm-dpp (wasm32).
  • JavaScript: wasm-dpp2 unit suite (1376 passing, with a new moderatedDocument block: the declaration's JS shape, and refusals of findBy, an expression operand and a writer gate the record can not answer) and wasm-sdk unit suite (455 passing) on fresh builds; the karma browser runs were not. wasm-sdk wasm-bindgen tests feed the chained and composite result conversions a verified result holding a removal record and check removedOuterDocuments / removed carry it with Identifier ids (8 wasm32 tests pass; the new ones fail if the ids go back to base58 strings).

Breaking Changes

Consensus, protocol version 14 (unreleased on mainnet):

  • refersTo: moderatedDocument is accepted, with the rules above.
  • Registration refuses a deletableDocument reference to a type whose documents only moderators remove on the record (40144); such a reference registered earlier stays writable.
  • A replace keeps a moderatedDocument reference whose target a moderator removed.

Wire (additive): new field 4 on GetDocumentsResponseV1.ChainedDocuments and on CompositeDocuments.SubQueryResult.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · abf2d00

  • Bots — coderabbitai ✓ · thepastaclaw not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed once the bots are done
  • Within your 5 open PRs — this one is beyond the limit; it waits until one merges
  • Build running
  • Approvals
    • files with no dedicated owner — you own it
    • js-wasm-sdk (packages/js-evo-sdk/README.md, packages/wasm-sdk/src/queries/chained_document.rs, packages/wasm-sdk/src/queries/composite_document.rs and 1 more) — shumkov
    • dpp — you own it
    • rs-drive-abci — you own it
    • rs-drive — you own it
    • rust-sdk (packages/rs-sdk/src/mock/requests.rs, packages/rs-sdk/tests/fetch/document_query_v0_v1.rs) — lklimek or shumkov

When every box is checked the PR Hygiene check passes and this can merge.

Summary by CodeRabbit

  • New Features
    • Added moderatedDocument references for documents removable only by moderators when removal records are retained.
    • Chained and composite queries now support moderated-document joins and report verified removal records separately from missing documents.
    • Query results in SDKs include removal details for moderated documents.
  • Bug Fixes
    • Validation now rejects incompatible reference types and invalid moderated-document targets, including references to removed documents when required properties cannot be verified.
    • Proof verification checks that moderated joins include valid removal records.

…oderator's removal (PV14)

A third kind of document reference, between permanentDocument and
deletableDocument and disjoint from both. It targets a document type
whose documents leave state only through a moderator's recorded
removal: canBeDeleted false, no ttl, and moderatorAbilities.delete
keeping removal records.

- The referenced document must exist when the reference is written.
  A replace keeps it as a permanent reference is kept; once a
  moderator removed the document, a value the stored document held
  resolves to its removal record, and a where entry asked about again
  is checked against the record's owner and id (40145 otherwise).
- Registration refuses a moderatedDocument reference to any other
  type (40143) and a deletableDocument reference to such a type
  (40144); the write-time check still lets the latter through for
  contracts registered earlier.
- Chained and composite joins through it prove the removal records of
  the joined ids beside their documents and report each removed
  document with its record (proto field 4 on ChainedDocuments and on a
  composite SubQueryResult, clients regenerated).
- Id form only: no findBy, inList or expression operand; a writer gate
  may compare only the referenced $ownerId or $id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added this to the v4.2.0 milestone Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: dashpay/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: de6af606-6371-4477-8bfd-91f8f25612eb

📥 Commits

Reviewing files that changed from the base of the PR and between 6e291b1 and abf2d00.

📒 Files selected for processing (66)
  • book/src/contract-keywords/deletion.md
  • book/src/contract-keywords/refers-to.md
  • book/src/data-model/contract-moderation.md
  • book/src/data-model/documents.md
  • book/src/error-handling/error-codes.md
  • packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js
  • packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js
  • packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js
  • packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h
  • packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m
  • packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py
  • packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts
  • packages/dapi-grpc/clients/platform/v0/web/platform_pb.js
  • packages/dapi-grpc/protos/platform/v0/platform.proto
  • packages/dash-platform-queries/src/documents/chained_document_query.rs
  • packages/dash-platform-queries/src/documents/composite_document_query.rs
  • packages/js-evo-sdk/README.md
  • packages/rs-dpp/schema/meta_schemas/document/v3/document-meta.json
  • packages/rs-dpp/src/data_contract/document_type/accessors/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/accessors/v2/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v1/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/common/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v3/list_element_reference_tests.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v3/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v3/moderator_abilities_tests.rs
  • packages/rs-dpp/src/data_contract/document_type/class_methods/try_from_schema/v3/typed_array_reference_tests.rs
  • packages/rs-dpp/src/data_contract/document_type/property/mod.rs
  • packages/rs-dpp/src/data_contract/document_type/v2/accessors.rs
  • packages/rs-dpp/src/errors/consensus/codes.rs
  • packages/rs-dpp/src/errors/consensus/state/document/mod.rs
  • packages/rs-dpp/src/errors/consensus/state/document/referenced_document_removed_error.rs
  • packages/rs-dpp/src/errors/consensus/state/document/referenced_document_type_moderated_error.rs
  • packages/rs-dpp/src/errors/consensus/state/document/referenced_document_type_not_moderated_error.rs
  • packages/rs-dpp/src/errors/consensus/state/state_error.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/document_reference_kind.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_reference_validation/v0/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/contract_user_moderation/tests.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/contract_user_moderation/tests/moderated_document_reference.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_common/data_contract_reference_validation/v0/mod.rs
  • packages/rs-drive-abci/src/query/contract_moderation_queries/contract_document_removals/v0/mod.rs
  • packages/rs-drive-abci/src/query/contract_moderation_queries/mod.rs
  • packages/rs-drive-abci/src/query/document_query/v1/dispatch/chained.rs
  • packages/rs-drive-abci/src/query/document_query/v1/dispatch/composite.rs
  • packages/rs-drive-abci/src/query/mod.rs
  • packages/rs-drive-proof-verifier/src/proof/chained_document.rs
  • packages/rs-drive-proof-verifier/src/proof/composite_document.rs
  • packages/rs-drive/src/drive/contract/insert/insert_contract/v0/tests/chained_query_e2e_tests.rs
  • packages/rs-drive/src/drive/contract/insert/insert_contract/v0/tests/composite_query_e2e_tests.rs
  • packages/rs-drive/src/query/chained_document_query/mod.rs
  • packages/rs-drive/src/query/composite_document_query/mod.rs
  • packages/rs-drive/src/query/mod.rs
  • packages/rs-drive/src/query/moderated_join.rs
  • packages/rs-drive/src/verify/chained_document/verify_chained_documents_proof/v0/mod.rs
  • packages/rs-drive/src/verify/composite_document/verify_composite_documents_proof/v0/mod.rs
  • packages/rs-platform-version/src/version/v14.rs
  • packages/rs-sdk/src/mock/requests.rs
  • packages/rs-sdk/tests/fetch/document_query_v0_v1.rs
  • packages/wasm-dpp/src/errors/consensus/consensus_error.rs
  • packages/wasm-dpp2/src/consensus_error.rs
  • packages/wasm-dpp2/src/data_contract/document_type_reference.rs
  • packages/wasm-dpp2/tests/unit/DocumentPropertyReference.spec.ts
  • packages/wasm-sdk/src/queries/chained_document.rs
  • packages/wasm-sdk/src/queries/composite_document.rs
  • packages/wasm-sdk/src/queries/contract_moderation.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds moderatedDocument references for document types removed only by moderators with retained records. Write validation and chained and composite queries use those records to check references and report proven removals. Protobuf responses and SDK result types expose the records.

Changes

Moderated document references

Layer / File(s) Summary
Reference kinds and schema rules
book/src/contract-keywords/*, book/src/data-model/*, packages/rs-dpp/..., packages/wasm-dpp2/...
Document reference targets now distinguish permanent, moderated, and deletable types. Schema parsing, target eligibility checks, error types, and reference documentation include moderatedDocument.
Write-time reference validation
packages/rs-drive-abci/src/execution/validation/..., packages/rs-dpp/src/errors/...
Registration and writes check the declared reference kind against the target type. On replacement, an existing moderated reference can be checked against an unrestored removal record. Tests cover retained references, new or changed values, agreement checks, restoration, and cross-contract references.
Chained and composite query execution
packages/rs-drive/src/query/..., packages/rs-drive/src/verify/..., packages/rs-drive-abci/src/query/..., packages/rs-drive/src/drive/.../tests/*
Query execution and proof verification include removal-record paths for moderated joins. Results report removed targets separately from missing IDs. Tests cover recorded removals and rejection of missing removal records in proofs.
Removal-record response contracts and clients
packages/dapi-grpc/protos/platform/v0/platform.proto, packages/dapi-grpc/clients/..., packages/rs-sdk/..., packages/wasm-sdk/...
Chained results add removedOuterDocuments; composite sub-results add removed. Protobuf clients, SDK conversions, mocks, and fetch tests carry these removal records.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant QueryClient
  participant DriveDocumentQuery
  participant ModeratedJoin
  participant ProofVerifier
  QueryClient->>DriveDocumentQuery: Request chained or composite query
  DriveDocumentQuery->>ModeratedJoin: Fetch removal records for missing joined IDs
  ModeratedJoin->>ProofVerifier: Supply removal paths and decoded records
  ProofVerifier->>QueryClient: Return verified results with removal records
Loading

Suggested reviewers: lklimek, shumkov

Merge Risk: ⚪ Minimal · up to abf2d

This change adds a moderated reference kind whose references can outlive a moderator's removal of the target document. Chained and composite queries now return proven removal records. No concrete defects were identified in validation, proofs, or client result shapes, so the change appears ready to merge.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to abf2d

This changes how references remain valid after moderation and how clients authenticate removal records. The inspected controls preserve identity checks and proof verification, but end-to-end recovery and mixed-version rollback behavior are not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new attackable surface is contract-authored reference declarations and untrusted query proofs carrying removal records. Its consequences extend from consensus write acceptance to client-visible moderation state; record queries are scoped to the derived contract, document type, and joined IDs.

Trust Boundaries and Controls

  • observed — Bootstrap query results are candidates, not authority. Both join verifiers reconstruct the merged query and verify its full proof; composite verification also checks that proven page and dependent-query derivations agree with bootstrap candidates. Removal records therefore enter results through verified paths rather than arbitrary response fields.
  • observed — The composite client adapter binds the verified database root to the quorum-signed proof before returning removal records. The inspected WASM conversion exposes verifier-produced records rather than independently trusting wire removal fields.

Resilience and Maintainability Implications

  • observed — Reference-expression failures truncate speculative consumed-document entries, and repeated typed-array IDs are deduplicated. These local safeguards contain validation side effects; they do not establish transaction-wide rollback or crash recovery.
🚥 Pre-merge checks | ✅ 4 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ❓ Inconclusive Docstring coverage is 72.26% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 155 functions across 44 files. (21 skippe… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the moderatedDocument reference type that survives moderator removal. The protocol version is also specified.
Full details: Docstring Coverage

Explanation

Docstring coverage is 72.26% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 155 functions across 44 files. (21 skipped: 9 unsupported, 6 too large, 6 over the file limit.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📖 Book Preview built successfully.

Download the preview from the workflow artifacts.
To view locally: download the artifact, unzip, and open index.html.

Updated at 2026-09-30T02:19:22.767Z

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 30, 2026
@thepastaclaw

thepastaclaw commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

🔍 Review in progress — actively reviewing now (commit abf2d00) · triage: critical

QuantumExplorer and others added 2 commits September 30, 2026 09:07
…ers and the JS surface

- A reply in another contract keeps its moderated reference to a post
  the posts contract's moderators removed, its writer gate checked
  against the record under the posts contract (fails if the record is
  read from the replying contract); registration refuses the
  deletableDocument form of the same reference (40144).
- The chained and composite query handlers return a removed post's
  record in `removed_outer_documents` and `removed`, as the removals
  query writes it, and the proven responses verify to the same record.
- wasm-dpp2 reports a moderatedDocument declaration with its
  contractId, documentType and where, and refuses findBy, an
  expression operand and a writer gate the record can not answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dentifier ids

The conversions behind getChainedDocuments and getCompositeDocuments
are fed a verified result holding a removal record directly (only a
proved fetch produces one), in wasm-bindgen tests like the ranked
query's: `removedOuterDocuments` and a sub-result's `removed` hold the
record, every identifier an `Identifier` object like the missing ids
beside it, none a base58 string. Run with
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner
cargo test -p wasm-sdk --target wasm32-unknown-unknown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@QuantumExplorer
QuantumExplorer merged commit db6f487 into v4.2-dev Sep 30, 2026
58 of 59 checks passed
@QuantumExplorer
QuantumExplorer deleted the claude/moderatable-tombstone-documents-7968a1 branch September 30, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants