Skip to content

Conversation

@hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Jan 28, 2026

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • New Features

    • Added state snapshot file discovery and retrieval from remote storage.
    • Implemented concurrent processing of state snapshots to streamline test workflows.
    • Enhanced state snapshot management with batch validation and error handling.
  • Chores

    • Added justjson library dependency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

The changes add remote state snapshot handling by introducing a justjson dependency and implementing functionality to fetch and list state snapshot files from remote storage, while integrating this into the existing test snapshot workflow pipeline.

Changes

Cohort / File(s) Summary
Dependency Management
Cargo.toml
Adds justjson v0.3 as a direct dependency in the workspace
State Snapshot Utilities
src/state_manager/utils.rs
Introduces DO_SPACE_ROOT constant, adds get_state_snapshot_file() to fetch specific snapshots and list_state_snapshot_files() to query available snapshots from remote storage; updates snapshot retrieval to use the new helper function; adds test coverage for listing and file retrieval functionality
Dev Subcommand Integration
src/dev/subcommands/mod.rs
Adds new fetch_state_tests() async function that lists and processes state snapshot files concurrently with per-task error handling; extends fetch_test_snapshots workflow to invoke fetch_state_tests() before existing fetch_rpc_tests() call

Sequence Diagram

sequenceDiagram
    participant FTS as fetch_test_snapshots()
    participant FST as fetch_state_tests()
    participant LSF as list_state_snapshot_files()
    participant GSF as get_state_snapshot_file()
    participant Remote as Remote Storage
    participant FRT as fetch_rpc_tests()

    FTS->>FST: invoke fetch_state_tests()
    FST->>LSF: request available snapshots
    LSF->>Remote: query DO_SPACE_ROOT/index
    Remote-->>LSF: return snapshot list
    LSF-->>FST: return .car.zst files
    
    par Process Snapshots
        FST->>GSF: fetch snapshot 1
        GSF->>Remote: download file
        Remote-->>GSF: file content
        GSF-->>FST: return local path
    and
        FST->>GSF: fetch snapshot 2
        GSF->>Remote: download file
        Remote-->>GSF: file content
        GSF-->>FST: return local path
    end
    
    FST-->>FTS: complete with errors logged
    FTS->>FRT: invoke fetch_rpc_tests()
    FRT-->>FTS: complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • LesnyRumcajs
  • sudo-shashank
  • akaladarshi
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: prefetching state computation snapshots to improve codecov reliability, which is directly supported by the new fetch_state_tests() function and snapshot handling utilities added in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@hanabi1224 hanabi1224 marked this pull request as ready for review January 28, 2026 18:29
@hanabi1224 hanabi1224 requested a review from a team as a code owner January 28, 2026 18:29
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and akaladarshi and removed request for a team January 28, 2026 18:29
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 62.26415% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.74%. Comparing base (a23d136) to head (b7c5a17).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dev/subcommands/mod.rs 0.00% 14 Missing ⚠️
src/state_manager/utils.rs 84.61% 1 Missing and 5 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/state_manager/utils.rs 82.24% <84.61%> (+0.11%) ⬆️
src/dev/subcommands/mod.rs 25.00% <0.00%> (-6.38%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a23d136...b7c5a17. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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