Skip to content

ci: link the GroveDB structure viewer on pull requests that change structure - #4846

Merged
QuantumExplorer merged 1 commit into
v4.2-devfrom
claude/grovedb-structure-pr-link
Sep 20, 2026
Merged

QuantumExplorer merged 1 commit into
v4.2-devfrom
claude/grovedb-structure-pr-link

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

#4845 described Drive's complete GroveDB structure as code and exports it to packages/rs-drive/grovedb-structure.json. The structure viewer reads that file by git ref and can compare two refs. What is missing is the link between the two: a pull request that adds structure should show, without anyone asking, what it adds.

What was done?

  • .github/workflows/grovedb-structure-preview.yml runs on pull requests that change grovedb-structure.json. It needs no checkout: it finds the merge base through the compare API (the base branch tip would show structure merged since the branch point as removed), reads both files through the contents API, and posts or updates one comment (marker <!-- grovedb-structure-preview -->, same pattern as book-preview.yml) with

    • a link that opens the viewer on the difference: ?base=<merge base>&head=<owner>/<repo>@<head sha>. New nodes glow, removed ones stay as ghosts, every ancestor of a change carries a count, and a tour walks through each change. The viewer fetches and compares the two files itself, so the link works before the merge and for forks;
    • the added, changed and removed nodes as text. A subtree that is new or gone as a whole is listed once, by its top.

    The same text goes to the job summary. Fork pull requests run with a read-only token that cannot comment, so they get the summary and a notice with the link. The structure file comes from the pull request and is not trusted: node identifiers are only printed when they have the expected shape, as code.

  • New book chapter "The GroveDB Structure" (book/src/drive/grovedb-structure.md, first in the Drive section): the description as code, the tests that keep it true (lint, conformance against a real GroveDB for every protocol version and populated fixtures, the coverage gate, the exported file), why the shape of a layer matters and how it is recorded, and the pull request link. It embeds the viewer.

  • Coding conventions gain an "Adding GroveDB structure" checklist: constants and paths, one builder shared by genesis and the protocol upgrade, the node in the sibling structure.rs with since, regenerating the file, fixtures or the UNVERIFIED list, checking the posted link.

  • Pull request template: one checklist line for structure changes.

How Has This Been Tested?

  • The workflow script was run locally against mocked GitHub APIs with two real files (the merged structure, and a copy with a new root tree, a new key, a kind change, a reworded description and a removed tree). It produced the expected link and lists.
  • This pull request adds the workflow file, which is in the workflow's own path filter, so the workflow runs here. Since the structure file does not change, the comment should say that no node was added, changed or removed, and link the viewer on this branch.
  • The comparison the link opens was tested in the viewer with the same two files (flags, trail counts, changes panel, tour), and against the live site with ?head=dashpay/platform@<sha>.
  • mdbook build book succeeds.

Breaking Changes

None.

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

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

…ructure

A pull request that adds GroveDB structure now gets a comment with a link
that opens the structure viewer on the difference between its merge base
and its head: new nodes glow, removed ones stay as ghosts, and a tour walks
through each change. The viewer compares the two grovedb-structure.json
files itself, so the link works before the merge and for forks.

- `grovedb-structure-preview.yml` runs when the exported structure file
  changes. It needs no checkout: it finds the merge base, reads both files
  through the API, lists the added, changed and removed nodes, and posts or
  updates one comment (the job summary carries the same text, which is what
  fork pull requests get). Identifiers from the pull request's file are
  only printed when they have the expected shape.
- New book chapter "The GroveDB Structure": the description as code, the
  tests that keep it true, why the shape of a layer matters, and the
  pull request link. It embeds the viewer.
- Coding conventions gain an "Adding GroveDB structure" checklist, and the
  pull request template a line for it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: 90037967-ec61-4fb3-ae3d-2fbcbca155fe

📥 Commits

Reviewing files that changed from the base of the PR and between 38bbd30 and cbfc1f1.

📒 Files selected for processing (5)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/grovedb-structure-preview.yml
  • book/src/SUMMARY.md
  • book/src/contributing/coding-conventions.md
  • book/src/drive/grovedb-structure.md

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.2.0 milestone Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌳 GroveDB structure

No node of the described GroveDB structure was added, changed or removed. Open the structure viewer on this pull request's version.

Compared 38bbd30181 with cbfc1f14dd. Updated at 2026-09-20T04:10:44.727Z

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Hygiene

State: waiting-bots · commit cbfc1f14ddfebb634925439571899eb65a0dcd99

  • coderabbitai has not reported for the current head
  • thepastaclaw has not reported for the current head

Self-review is an author attestation that you have read the diff:
/self-reviewed — covers everything pushed so far; post it again after a new push.

This check passes when the policy is satisfied; the repository decides whether merging requires it.

@github-actions

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-20T04:10:54.676Z

@QuantumExplorer
QuantumExplorer merged commit bd79344 into v4.2-dev Sep 20, 2026
20 of 21 checks passed
@QuantumExplorer
QuantumExplorer deleted the claude/grovedb-structure-pr-link branch September 20, 2026 04:12
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.

1 participant