Skip to content

test(drive): track latest protocol version in grovedb structure snapshot - #5154

Open
PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
fix/structure-tests-latest-protocol
Open

PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
fix/structure-tests-latest-protocol

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

v4.3-dev has failed Rust workspace tests since #5043 (introduce protocol version 15) merged. Examples: run on e38241d52, and the same two failures on #5151.

FAIL drive structure::tests::should_match_committed_grovedb_structure_json
     packages/rs-drive/grovedb-structure.json is out of date.
FAIL drive structure::tests::should_record_a_contract_layer_with_its_documents_on_top
     left: "fixture contracts_with_documents@15"  right: "fixture contracts_with_documents@14"

The structure snapshot is generated at PlatformVersion::latest(), which is now 15. The committed JSON and one assertion still said 14.

What was done?

  • Regenerated packages/rs-drive/grovedb-structure.json with UPDATE_GROVEDB_STRUCTURE=1 cargo test -p drive --lib structure::tests. Only the origin labels (…@14 → …@15) and latest_protocol_version (14 → 15) change. PV15 lays out the same state as PV14, so there is no structural change.
  • should_record_a_contract_layer_with_its_documents_on_top now builds its expected origin from PlatformVersion::latest() instead of a hard-coded 14. That way the next protocol bump only needs the snapshot regenerated.

How Has This Been Tested?

  • cargo test -p drive --lib structure::tests: 11 passed. Both tests failed before the change.
  • rustfmt --check on the edited test file.

Breaking Changes

None. This changes only a test and its snapshot.

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

#5043 introduced PLATFORM_V15 and made it latest, but the committed
grovedb-structure.json and one structure test still expected protocol 14,
so `structure::tests` has failed on v4.3-dev since it merged:

- should_match_committed_grovedb_structure_json: regenerate the snapshot.
  Only the origin labels and latest_protocol_version change (14 -> 15);
  v15 has the same state structure as v14.
- should_record_a_contract_layer_with_its_documents_on_top: read the
  expected origin from PlatformVersion::latest() instead of a hard-coded
  14, so the next protocol bump does not break it again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: 7f4c3cbc-d0c5-490f-bdf5-c87c5d1b3f9d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 added this to the v4.3.0 milestone Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌳 GroveDB structure

This pull request changes the described GroveDB structure. Open it in the structure viewer: new nodes glow, removed ones stay as ghosts, and the tour walks through each change.

Changed (28 nodes)

  • root
  • tokens
  • tokens.distributions
  • tokens.distributions.perpetual.token
  • tokens.distributions.timed
  • identities.identity
  • identities.identity.contract_info.bound
  • identities.identity.key_references
  • identities.identity.key_references.authentication
  • saved_block_transactions
  • prefunded_balances
  • pools.epoch
  • shielded_balances.main_pool
  • contracts.contract
  • contracts.contract.other
  • withdrawals
  • group_actions.contract.group
  • group_actions.contract.group.active.action
  • group_actions.contract.group.closed.action
  • misc
  • votes
  • votes.contested_resource
  • votes.contested_resource.active_polls.contract.document_type
  • votes.contested_resource.active_polls.contract.document_type.indexes.value.contender
  • versions
  • contract_groups
  • contract_groups.groups.group
  • contract_groups.members.contract

Compared 67340ad824 with 85deb41343. Updated at 2026-09-28T19:27:44.111Z

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

thepastaclaw commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 85deb41) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

Verified the complete diff at head 85deb41: the assertion now follows the latest protocol version used by the generator and fixtures, and all 35 snapshot changes affect only version metadata, not tree structure. No in-scope defects were found; the edited file passes rustfmt and the diff passes whitespace checks, but Rust tests were not independently rerun during this verification.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: architecture-layering); reviewer 3: glm-5.3-flash (agent: phase1-reviewer, role: platform-versioning); reviewer 4: glm-5.3-flash (agent: phase1-reviewer, role: rust-quality); reviewer 5: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 6: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 8: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)

  • Triage: low by gpt-6-astra (effort low) — The diff is a small, contained test maintenance change that updates snapshot protocol-version labels and replaces a hard-coded expected version with PlatformVersion::latest(), without changing production logic or storage structure.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer, glm-5.3-flash — architecture-layering (completed, effort high); agent phase1-reviewer, glm-5.3-flash — platform-versioning (completed, effort high); agent phase1-reviewer, glm-5.3-flash — rust-quality (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 97% left, weekly 97% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 13% left, 5h 100% left)
  • Fresh verifier: gpt-6-astra — final-verifier; agent astra-verifier
  • Phase 2 reviewers: gpt-6-astra — general (completed, effort medium); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6-astra — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort medium); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

No review for 85deb413 yet, so PR Hygiene is asking once. If nothing arrives, the requirement is dropped for this commit and the pull request is labelled bot-review-skipped.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Sep 29, 2026
@github-actions github-actions Bot removed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. waiting-self-review Waiting for the author to post /self-reviewed labels Sep 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants