Skip to content

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

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

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

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Update: v4.3-dev was renamed to v5.1-dev. I merged v5.1-dev (218cb89f1) into this branch and regenerated the snapshot. The v5.0-dev merge added a contract_with_team_actions fixture still labelled @14. CI here won't compile until #5212 lands, because v5.1-dev itself doesn't build without it. With #5212 applied locally, structure::tests passes (11).

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

PR Hygiene · 999a9ae

  • Bots — coderabbitai skipped after the window · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Within your 5 open PRs — this one is beyond the limit; it waits until one merges
  • Build green
  • Approvals
    • rs-drive (packages/rs-drive/grovedb-structure.json, packages/rs-drive/src/structure/tests.rs) — QuantumExplorer or shumkov

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

#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: 7d146790-bb0c-4bfe-9de8-54022b32be7b

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

github-actions Bot commented Sep 28, 2026 •

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 (31 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
  • contracts.contract.other.team_actions
  • contracts.contract.other.team_actions.active.team_action
  • contracts.contract.other.team_actions.closed.team_action
  • 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
  • and 1 more

Compared 1ebcedb028 with 999a9ae29d. Updated at 2026-10-02T13:34:24.813Z

@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 999a9ae) · 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
PastaPastaPasta and others added 2 commits September 30, 2026 19:19
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The v5.0-dev merge into v5.1-dev added the contract_with_team_actions
fixture, recorded at protocol 14. Regenerate so its origin labels follow
the latest protocol version (15) like the rest of the snapshot.

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

@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.

Re-review — Final validation — Phase 1 + Phase 2

The PR correctly updates the committed GroveDB structure snapshot to protocol version 15 and makes the contract-layer assertion derive its expected origin from PlatformVersion::latest(). The snapshot changes are limited to protocol metadata and origin labels, with no structural or consensus changes. No in-scope defects remain after review.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

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

  • Triage: low by gpt-6.1-sol (effort low) — The diff is a small, self-contained test expectation update and regenerated structure snapshot with no production behavior, consensus, or storage-migration changes.
  • Phase 1 reviewers: glm-5.3-flash — general (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 98% left, weekly 73% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 13% left, 5h 100% left)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.
Out-of-scope follow-up suggestions (2)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Base branch cannot compile until the existing protocol-version dependency lands — The base branch's v15.rs imports DRIVE_ABCI_QUERY_VERSIONS_V3, but the corresponding v3 module is absent from the current source tree. This is pre-existing, explicitly documented in the PR description, and does not result from this PR.
    • Follow-up: Merge or apply the existing #5212 prerequisite before relying on CI results for this change.
  • Third copy of the fixture-origin format string; a shared helper would keep the convention in one place — NOT_ACTIONABLE: The two existing fixture-origin sites already use the same format, and the new assertion uses the authoritative latest protocol version consistently. Introducing a shared helper would be unrelated cleanup outside this narrowly scoped snapshot/test fix and would not improve correctness.
    • Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.

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

@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.

Re-review — Final validation — Phase 1 + Phase 2

The change correctly updates the committed GroveDB structure snapshot from protocol version 14 to 15 without altering any recorded tree shapes, and updates the contract fixture assertion to derive its version from PlatformVersion::latest(). The generated metadata matches the fixture and genesis origin formatters, so no in-scope correctness or maintainability issues were found. The Rust workspace test check was still in progress in the supplied CI snapshot.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

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

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained test expectation and generated snapshot update with no production behavior, consensus, storage migration, or other critical-surface changes.
  • Phase 1 reviewers: glm-5.3-flash — general (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 99% left, weekly 71% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 54% left, 5h 6% left)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@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.

Re-review — Final validation — Phase 1 + Phase 2

Verified the complete diff at head 999a9ae: the snapshot changes only 37 origin labels and the latest protocol version from 14 to 15, while the updated assertion matches the generator’s use of PlatformVersion::latest() and preserves the tree-shape checks. No in-scope defects were found. Validation was static only; the supplied exact-head CI snapshot reports successful Rust workspace tests, with PR Hygiene still pending.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

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

  • Triage: low by gpt-6.1-sol (effort low) — The diff is a small, contained test-only update that refreshes protocol-version labels in a snapshot and derives one expected label from PlatformVersion::latest(), without changing runtime behavior or storage structure.
  • Phase 1 reviewers: glm-5.3-flash — general (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 100% left, weekly 70% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 39% left, 5h 11% left)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@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 Oct 3, 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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants