Repository navigation
fix(cli): check bundle pull --hash --dry-run filters against the cached manifest - #2360
Merged
Merged
Conversation
…ed manifest `bundle pull --hash <H> --dry-run` never read the manifest, so an `--include`/`--exclude` pattern that matches no entry went unreported: the repro in #2327. The live-run warning already exists (#2244). The dry run now reads the manifest from the output root's `.decdn-bundles/` cache when an earlier pull stored it. The read is local, unpaid, and verified against the hash, so it happens even under `--overwrite`. It then prints the filtered plan and the unmatched-pattern warnings, as `-i --dry-run` does. With no cached manifest it prints the bundle and output root, with `count`/`entries` null under `--json`. A malformed `--hash` fails the dry run, as it fails a real pull, and a cached manifest that does not parse names its cache file. Closes #2327 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 7, 2026
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#2327 reported that
decdn bundle pull --exclude "metal/*"silently matched nothing in a bundle whose paths start withopenai-gpt-oss-20b/.The live-run warning for that case already ships in #2244 (merged 2026-09-30, before the issue):
warning: --exclude 'metal/*' matched no entries (… did you mean '**/metal/*'?)prints before any fetch. The 2026-10-06 testnet run most likely used an older binary.The one gap left was the issue's own repro,
--hash <H> --dry-run, which never read the manifest. This PR closes it:--hash --dry-runreads the manifest from the output root's.decdn-bundles/cache when an earlier pull stored it (local, unpaid, hash-verified, so read even under--overwrite). It prints the filtered plan and the unmatched-pattern warnings, as-i --dry-rundoes.--jsonit prints{"output", "hash", "count": null, "entries": null}instead of prose.--hashnow fails the dry run, as it fails a real pull. A cached manifest that does not parse names its cache file in the error.adr/appendix-bundles.md--dry-runbullet,bundle_cache.rsmodule doc,--dry-runhelp, CHANGELOG.Closes #2327
Reviewer notes
dry_run_manifest/dry_runincrates/cli/src/commands/bundle_pull.rs.obtain_manifest) is unchanged and still skips the cache under--overwrite.bundle_cache::loadstill folds "missing", "unreadable" and "hash mismatch" intoNone, so an unreadable cache file falls back to the no-cache line with no reason given. A subprocess test asserting the stderr warning is also left for later.Verification
cargo fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run -p decdn-cli -p decdn-common: 1394 passed. The new cache-read tests fail when the dry run skips the cache (mutation-checked).RUSTDOCFLAGS="-D warnings" cargo doc -p decdn-cli -p decdn-common --no-deps --document-private-itemsdecdnand ran the repro against an empty output dir (no-cache line, JSONnullform) and a dir with a cached prefixed manifest (warning: --exclude 'metal/*' matched no entries (… did you mean '**/metal/*'?)plus the 2-entry plan).CHANGELOG.mdentry addedadr/added or updated (appendix-bundles.md--dry-runbullet)🤖 Generated with Claude Code