Skip to content

clean pruner code#3832

Merged
jolestar merged 23 commits into
mainfrom
pruner_clean
Dec 2, 2025
Merged

clean pruner code#3832
jolestar merged 23 commits into
mainfrom
pruner_clean

Conversation

@jolestar

Copy link
Copy Markdown
Contributor

Summary

Summary about this PR

  • Closes #issue

@vercel

vercel Bot commented Nov 30, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview Comment Dec 2, 2025 10:44am
test-portal Ready Ready Preview Comment Dec 2, 2025 10:44am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rooch Ignored Ignored Preview Dec 2, 2025 10:44am

@github-actions

github-actions Bot commented Nov 30, 2025

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/ntapi 0.4.1 🟢 3.2
Details
CheckScoreReason
Token-Permissions⚠️ -1No tokens found
Code-Review⚠️ 1Found 5/30 approved changesets -- score normalized to 1
Dangerous-Workflow⚠️ -1no workflows found
Maintained⚠️ 01 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ -1no dependencies found
Vulnerabilities🟢 100 existing vulnerabilities detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/sysinfo 0.33.1 🟢 4.9
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Code-Review⚠️ 1Found 2/13 approved changesets -- score normalized to 1
Maintained🟢 1030 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/windows 0.57.0 🟢 4.2
Details
CheckScoreReason
Code-Review🟢 3Found 9/26 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging🟢 10packaging workflow detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
cargo/windows-core 0.57.0 🟢 4.2
Details
CheckScoreReason
Code-Review🟢 3Found 9/26 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging🟢 10packaging workflow detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
cargo/windows-implement 0.57.0 🟢 4.2
Details
CheckScoreReason
Code-Review🟢 3Found 9/26 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging🟢 10packaging workflow detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
cargo/windows-interface 0.57.0 🟢 4.2
Details
CheckScoreReason
Code-Review🟢 3Found 9/26 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging🟢 10packaging workflow detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
cargo/windows-result 0.1.2 🟢 4.2
Details
CheckScoreReason
Code-Review🟢 3Found 9/26 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging🟢 10packaging workflow detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts⚠️ 0binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed

Scanned Files

  • Cargo.lock

Copilot AI 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.

Pull request overview

This PR removes the live pruner service from Rooch in favor of a stop-the-world garbage collection (GC) approach. The changes represent a significant architectural shift in how state cleanup is performed.

Key Changes

  • Removed live pruner service: Deleted StatePruner thread-based background pruner and all related infrastructure (atomic snapshots, error recovery, incremental sweep)
  • Removed diagnostic commands: Deleted CLI commands prune-diagnosis, reach-check, and list-stale that were specific to live pruner debugging
  • Simplified configuration: Removed live-pruner-specific fields from PruneConfig (enable, interval_s, boot_cleanup_done, incremental sweep settings)
  • Retained GC utilities: Kept calculate_sweep_start_order function as a public utility for GC operations

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/typescript/rooch-pruner-e2e/src/case/pruner-e2e.spec.ts Deleted entire live pruner E2E test suite
sdk/typescript/rooch-pruner-e2e/src/case/gc-e2e.spec.ts Fixed error message checking to use combined stdout/stderr and added case-insensitive strategy matching
crates/rooch/src/commands/db/mod.rs Removed imports and enum variants for deleted pruner diagnostic commands
crates/rooch/src/commands/db/commands/mod.rs Removed module declarations for deleted commands
crates/rooch/src/commands/db/commands/*.rs Deleted reach_check, prune_diagnosis, and list_stale command implementations
crates/rooch-rpc-server/src/lib.rs Removed StatePruner initialization, imports, and shutdown handling from server
crates/rooch-pruner/tests/*.rs Deleted live pruner test files (atomic snapshot, deletion effectiveness, error recovery, etc.)
crates/rooch-pruner/src/pruner.rs Gutted StatePruner struct, kept only calculate_sweep_start_order utility function
crates/rooch-pruner/src/lib.rs Removed module declarations for deleted components (atomic_snapshot, error_recovery, incremental_sweep, validation_tests)
crates/rooch-pruner/src/*.rs Deleted incremental_sweep, error_recovery, atomic_snapshot, validation_tests modules
crates/rooch-config/src/prune_config.rs Removed live-pruner-specific configuration fields, retained GC-related fields

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment thread crates/rooch-config/src/prune_config.rs Outdated
Comment thread crates/rooch-pruner/src/pruner.rs Outdated
@jolestar jolestar merged commit 1d2b43b into main Dec 2, 2025
19 checks passed
@jolestar jolestar deleted the pruner_clean branch December 2, 2025 12:03
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