Skip to content

build(deps): unpack the grovedbg UI with zip 9 instead of zip-extensions - #1023

Merged
QuantumExplorer merged 1 commit into
developfrom
chore/zip-9-for-grovedbg
Oct 20, 2026
Merged

QuantumExplorer merged 1 commit into
developfrom
chore/zip-9-for-grovedbg

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

What this does: The grovedbg debugger feature ships the GroveDBG web UI as a zip file inside the binary and unpacks it to a temp folder when the debugger starts. It did that through the zip-extensions crate, which depends on zip 6. This uses zip 9 directly instead and drops zip-extensions.

Value: zip 6 and 8 are flagged by RUSTSEC-2026-0367, -0368 and -0369 (extraction can follow symlinks or keep setuid bits). No zip-extensions release supports zip 9 yet, so this is the only way to clear the advisory for GroveDB and for Platform, whose nightly cargo audit has been failing on it.

Risks: Low. Only the grovedbg feature is affected; nothing in storage, proofs or costs changes. The archive is the same SHA-256-pinned GroveDBG v1.2.0 release, and a new test unpacks it with the enabled zip features (Deflate only, which is all the archive uses).

Issue being fixed or feature implemented

cargo audit reports zip 6.0.0 through zip-extensions 0.13.1, pulled in by grovedb's grovedbg feature:

Crate:     zip
Version:   6.0.0
ID:        RUSTSEC-2026-0367 / RUSTSEC-2026-0368 / RUSTSEC-2026-0369
Solution:  Upgrade to >=9.0.0
Dependency tree:
zip 6.0.0
└── zip-extensions 0.13.1
    └── grovedb 6.1.0

The latest zip-extensions (0.14.1) still requires zip ^8.2, which the same advisories cover.

What was done?

  • grovedb/Cargo.toml: zip-extensions = "0.13.0" replaced by zip = { version = "9.0.5", default-features = false, features = ["deflate"] }, still optional and enabled by grovedbg.
  • grovedb/src/debugger.rs: a small extract_grovedbg(destination) helper opens the embedded archive from memory (ZipArchive::new(Cursor::new(GROVEDBG_ZIP))) and calls extract. The old code first wrote the bytes to a grovedbg.zip temp file and then unpacked that file, so the temp file and the std::fs import are gone.

Before:

fs::write(&grovedbg_zip, GROVEDBG_ZIP).expect("cannot crate grovedbg.zip");
zip_extensions::inflate::zip_extract::zip_extract(&grovedbg_zip, &grovedbg_www)
    .expect("cannot extract grovedbg contents");

After:

extract_grovedbg(&grovedbg_www).expect("cannot extract grovedbg contents");

How Has This Been Tested?

  • New debugger::tests::extract_grovedbg_unpacks_the_bundled_ui unpacks the bundled archive and checks index.html exists.
  • cargo test -p grovedb --features grovedbg --lib debugger::tests
  • cargo clippy -p grovedb --features grovedbg --lib --tests -- -D warnings
  • cargo audit no longer lists zip 6.0.0 / zip-extensions.

Breaking Changes

None. The public API is unchanged; only a dependency of the optional grovedbg feature changes.

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 made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 32ef458

  • Bots — coderabbitai ✓ · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Improvements
    • GroveDBG now loads its bundled interface directly from memory, improving startup efficiency and avoiding temporary archive files.
    • Debugger interface extraction is handled internally, providing more reliable access to the UI.

zip-extensions 0.13 pulls zip 6, and its newest release still needs
zip ^8.2; both are covered by RUSTSEC-2026-0367, -0368 and -0369.
The grovedbg feature now depends on zip 9 (deflate only) and unpacks
the embedded GroveDBG archive straight from memory, so the temporary
grovedbg.zip file is gone. A test unpacks the bundled archive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d0d1b61-f0da-404c-970b-09de5342487e
📥 Commits

Reviewing files that changed from the base of the PR and between fc7028d and 32ef458.

📒 Files selected for processing: 2
  • grovedb/Cargo.toml
  • grovedb/src/debugger.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

The grovedbg feature now uses the optional zip dependency. The debugger extracts the bundled UI from in-memory ZIP bytes into a temporary web directory, and a test checks that the extracted directory contains index.html.

Changes: GroveDBG UI extraction

Layer / File(s) Summary
Configure and verify in-memory extraction
grovedb/Cargo.toml, grovedb/src/debugger.rs
The grovedbg feature enables zip with the deflate feature. The debugger uses Cursor and ZipArchive to extract the bundled UI without creating a temporary ZIP file. A test checks that the extracted UI contains index.html.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: fominok

Merge Risk: ⚪ Minimal · up to 32ef4

The in-memory extraction matches the bundled archive and served directory, with no actionable merge-blocking risk established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main dependency replacement and GroveDBG UI unpacking change.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ 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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 20, 2026 •

Copy link
Copy Markdown

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw

thepastaclaw commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 32ef458) · triage: low · Phase 2 only (no Phase 1 for this repository)

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.21%. Comparing base (fc7028d) to head (32ef458).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1023   +/-   ##
========================================
  Coverage    93.21%   93.21%           
========================================
  Files          356      356           
  Lines       108953   108953           
========================================
  Hits        101556   101556           
  Misses        7397     7397           
Components Coverage Δ
grovedb-core 91.59% <ø> (ø)
merk 94.18% <ø> (ø)
storage 91.68% <ø> (ø)
commitment-tree 95.62% <ø> (ø)
mmr 95.43% <ø> (ø)
bulk-append-tree 93.72% <ø> (ø)
element 97.39% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Final validation — Phase 2 only (no Phase 1 for this repository)

Verified the complete diff at head 32ef458 and the supplied Phase-2 reviewer conclusions; no actionable defects were found. The replacement remains isolated to the optional debugger, preserves the pinned archive and temporary-directory lifecycle, and delegates extraction to zip 9, whose implementation creates the destination directory. Current CI reports successful test shards, linting, formatting, and security audit; PR Hygiene remains pending, and no builds or tests were run locally in this static review.

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: 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 optional-debugger dependency replacement with straightforward in-memory archive extraction and a focused regression test.
  • Phase 1 reviewers: not run (disabled for this repository)
  • 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 — rust-quality (completed, effort medium); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown

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 and removed waiting-bots Waiting for the review bots to report on this head labels Oct 20, 2026
@QuantumExplorer
QuantumExplorer merged commit b61fd50 into develop Oct 20, 2026
15 of 16 checks passed
@QuantumExplorer
QuantumExplorer deleted the chore/zip-9-for-grovedbg branch October 20, 2026 12:13
QuantumExplorer added a commit that referenced this pull request Oct 20, 2026
6.1.1 carries one change since 6.1.0: the grovedbg feature unpacks the
bundled GroveDBG UI with zip 9 instead of zip-extensions/zip 6 (#1023),
clearing RUSTSEC-2026-0367, -0368 and -0369. All workspace crates move
to 6.1.1; grovedb-bincode and grovedb-bincode-derive stay at 2.1.0.

Co-authored-by: Claude Opus 5.5 <[email protected]>
QuantumExplorer added a commit to dashpay/platform that referenced this pull request Oct 20, 2026
GroveDB 6.1.1 (2128ea18) is 6.1.0 plus dashpay/grovedb#1023: the
grovedbg feature unpacks the bundled GroveDBG UI with zip 9 instead of
zip-extensions 0.13 / zip 6, which RUSTSEC-2026-0367, -0368 and -0369
cover. zip 6.0.0 and zip-extensions leave Cargo.lock, taking cargo audit
from 6 vulnerabilities to 3 (all zip 8.6.0 via tenderdash-proto-compiler).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants