Skip to content

[nextest-runner] add support for reading archives#3012

Merged
sunshowers merged 1 commit into
mainfrom
archive-read
Feb 1, 2026
Merged

[nextest-runner] add support for reading archives#3012
sunshowers merged 1 commit into
mainfrom
archive-read

Conversation

@sunshowers

@sunshowers sunshowers commented Jan 31, 2026

Copy link
Copy Markdown
Member

Add support for the -R option to cargo nextest run, cargo nextest store info, and cargo nextest replay.

I've already used this to debug a test leak on Windows (#3020).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for consuming recorded runs directly from portable archive files (.zip) via the -R/--run-id style selector across cargo nextest run (rerun), cargo nextest store info, and cargo nextest replay.

Changes:

  • Introduces PortableArchive reading support and a unified StoreReader trait for reading from either on-disk stores or portable archives.
  • Adds RunIdOrArchiveSelector to allow CLI args to accept either a run ID selector or an archive path.
  • Extends store info, replay, and rerun-from-recording flows to operate directly on portable archives, plus new integration coverage.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
nextest-runner/src/record/run_id_index.rs Adds RunIdOrArchiveSelector parsing/display + unit tests.
nextest-runner/src/record/rerun.rs Adds rerun-outstanding computation path for portable archives.
nextest-runner/src/record/replay.rs Generalizes replay conversion to work with dyn StoreReader (store or archive).
nextest-runner/src/record/reader.rs Introduces StoreReader trait; implements it for RecordReader; exposes shared decompression helper.
nextest-runner/src/record/portable.rs Adds PortableArchive and PortableStoreReader to read portable archives + run logs.
nextest-runner/src/record/mod.rs Re-exports new archive-reading types and constants.
nextest-runner/src/record/format.rs Exposes portable-archive filenames/constants and manifest accessors needed for reading.
nextest-runner/src/errors.rs Adds PortableArchiveReadError and wraps it via RecordReadError::PortableArchive.
integration-tests/tests/integration/snapshots/integration__record_replay__store_info_portable_archive.snap New snapshot for store info output when reading an archive.
integration-tests/tests/integration/snapshots/integration__record_replay__rerun_error_invalid_run_id.snap Updates clap error output to reflect new rerun arg name.
integration-tests/tests/integration/record_replay.rs Adds end-to-end tests for archive-based store info, replay, and rerun-from-archive flows.
integration-tests/tests/integration/fixtures.rs Adds helper to validate output for filtered runs/replays by expected test names.
cargo-nextest/src/errors.rs Wires portable-archive read errors into CLI expected errors + exit codes.
cargo-nextest/src/dispatch/utility/store.rs Enables store info to accept archive paths and run without workspace for archive inputs.
cargo-nextest/src/dispatch/utility/debug.rs Adds debug extract-portable-archive utility for extracting archive contents/metadata.
cargo-nextest/src/dispatch/core/tests.rs Updates CLI parsing tests to accept archive paths for store info / replay / rerun.
cargo-nextest/src/dispatch/core/run.rs Extends --rerun/-R to accept archives and adds rerun resolution from archives.
cargo-nextest/src/dispatch/core/replay.rs Extends replay to accept archives and supports workspace-free archive replay execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cargo-nextest/src/dispatch/core/replay.rs Outdated
Comment thread nextest-runner/src/record/portable.rs Outdated
Comment thread cargo-nextest/src/dispatch/utility/debug.rs Outdated
Comment thread cargo-nextest/src/dispatch/utility/store.rs Outdated
Comment thread cargo-nextest/src/dispatch/utility/store.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nextest-runner/src/record/run_id_index.rs
Comment thread nextest-runner/src/record/portable.rs Outdated
Comment thread nextest-runner/src/record/rerun.rs Outdated
Comment thread nextest-runner/src/record/rerun.rs Outdated
Comment thread cargo-nextest/src/dispatch/utility/store.rs
@codecov

codecov Bot commented Jan 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.56984% with 230 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.98%. Comparing base (f920db2) to head (1874347).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
nextest-runner/src/record/portable.rs 57.54% 152 Missing ⚠️
cargo-nextest/src/dispatch/utility/debug.rs 59.80% 41 Missing ⚠️
nextest-runner/src/record/reader.rs 29.54% 31 Missing ⚠️
cargo-nextest/src/dispatch/utility/store.rs 95.08% 3 Missing ⚠️
cargo-nextest/src/errors.rs 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3012      +/-   ##
==========================================
- Coverage   83.21%   82.98%   -0.24%     
==========================================
  Files         155      155              
  Lines       41330    42068     +738     
==========================================
+ Hits        34394    34909     +515     
- Misses       6936     7159     +223     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@trunk-io

trunk-io Bot commented Feb 1, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nextest-runner/src/record/portable.rs
Comment thread nextest-runner/src/errors.rs
@sunshowers sunshowers merged commit 1069419 into main Feb 1, 2026
29 checks passed
@sunshowers sunshowers deleted the archive-read branch February 1, 2026 04:01
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