Skip to content

fix(cli): name the resume directory when a get stops (#2473) - #2531

Merged
thiras merged 2 commits into
mainfrom
fix/2473-interrupt-resume-dir
Oct 19, 2026
Merged

thiras merged 2 commits into
mainfrom
fix/2473-interrupt-resume-dir

Conversation

@yigitdot

@yigitdot yigitdot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2473.

Summary

  • A decdn get whose destination is relative (no -o, or a relative -o) keeps its resume state (.partial, .partial.ranges, a bundle's .decdn-partial/ and .decdn-bundles/) under the current directory, which the command line does not record. A stopped run now names that directory:
    • Ctrl-C: interrupted; run the same command again from <cwd> to resume (exit 130)
    • give-up: no progress for 10m; rerun from <cwd> to resume (exit 75)
  • An absolute -o and -o - keep the plain lines.
  • interrupt::ResumeFrom is attached as error context (same pattern as UnreconciledEscrows) by name_resume_dir, only to an Interrupted or GaveUp error; stop_message reads it. An openPool/topUp in flight still replaces the re-run advice, and exit codes are unchanged. get() wraps both the blob and the bundle route through with_resume_hint.

Tests

  • interrupt/tests.rs: interrupt and give-up name the directory and keep exit 130/75; plain error and success untouched; an in-flight escrow wins over the directory on both stops.
  • get/tests.rs: through with_resume_hint: blob and bundle URIs with no -o or a relative -o name the cwd; an absolute -o and -o - do not.

Gates run locally: cargo nextest run -p decdn-cli (846 passed), cargo clippy --workspace --all-targets -- -D warnings, cargo fmt -- --check, CARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-items.

🤖 Generated with Claude Code

…omitted (#2473)

A decdn get run without -o keeps its .partial state in the current
directory, which the command line does not record. The interrupt line
now names that directory, so a re-run from another directory does not
start over and pay again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 18, 2026 19:41

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-code-quality

github-code-quality Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

main f81ab73 fix/2473-interrupt-r... e39263d +/-
76% 76% 0%
View coverage of the 6 most impacted files.
File main f81ab73 fix/2473-interrupt-r... e39263d +/-
crates/cli/src/...ds/interrupt.rs 90% 89% -1%
crates/client/src/scheduler.rs 94% 94% 0%
crates/node/src...s/client/mod.rs 91% 91% 0%
crates/cache/src/engine.rs 91% 91% 0%
crates/cli/src/commands/get.rs 97% 97% 0%
crates/protocol/src/framing.rs 92% 93% +1%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 18, 2026 21:42 UTC

#2473)

A give-up advises a re-run the same way an interrupt does, and a
relative -o resolves against the current directory like the default
destination. Both now name the directory to run the command again from.
An absolute -o and -o - name none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yigitdot yigitdot changed the title fix(cli): name the resume directory in the interrupt hint when -o is omitted (#2473) fix(cli): name the resume directory when a get stops (#2473) Oct 18, 2026
@yigitdot
yigitdot requested a review from thiras October 18, 2026 21:41
@thiras
thiras requested a balanced review from Copilot October 19, 2026 09:02

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.

🟢 Approval recommended

The focused changes cover both download routes, preserve existing stop behavior, and have no identified blocking issues.

No open issues 🎉

Review effort: Balanced

@thiras
thiras merged commit 4f6beff into main Oct 19, 2026
32 checks passed
@thiras
thiras deleted the fix/2473-interrupt-resume-dir branch October 19, 2026 09:29
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.

cli: interrupt resume hint does not name the directory when -o is omitted

3 participants