Repository navigation
refactor(cli): retire the DECDNMAN file-manifest format (#1505) - #1507
Conversation
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
WalkthroughThe CLI no longer reconstructs ChangesDECDNMAN manifest removal
Estimated code review effort: 4 (Complex) | ~45 minutes Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Coverage reportTotal: 80.81% (was 80.77%, ▲ +0.04%) — 53963/66778 lines
History
|
obao4 bao verified-range streaming (ADR 037/038, crates/bao-range) is a strictly finer, single-hash superset of the flat DECDNMAN chunk manifest: ranged access, resume, and bounded origin egress all fall out of one root hash at 16 KiB granularity, with no synthetic derived blobs. The DECDNMAN producer was never built; this removes the consumer and its docs. Removed: - crates/cli/src/commands/file_manifest.rs (the whole consumer module) - fetch.rs: the DECDNMAN magic sniff, MAX_MANIFEST_BYTES cap, and the manifest -> per-chunk expansion path (ChunkFetcher). The obao4-based single-blob byte-offset resume (.partial, bao chunk-group resume) is untouched. - bundle_pull.rs: the branch that expanded a DECDNMAN entry into chunk pulls; bundle entries are plain whole-file blobs again. The SelectedTarget / fetch_preferred discovery-fallback machinery existed only for chunk sequences and is gone with it. - common: the --no-keep-blobs flag (DECDNMAN-only chunk retention). - e2e: cli_fetch_manifest.rs and its now-unused postcard/serde deps. - ADR 012 § File Manifests and Reconstruction; appendix-bundles.md non-relationship note; the file-manifest mentions in architecture.md and the dangling ADR 037 manifest-size reference. Net-negative: 105 insertions, 2197 deletions. Closes #1505. Co-Authored-By: Claude Opus 4.8 <[email protected]>
6955755 to
01525a0
Compare
…ce routes origins Review fixes for PR #1503: - [High] The AutoOpen branch returned the open_or_reuse context WITHOUT the ADR 005 client binding, so the node's pull_authorized gate never fired a cache-miss origin pull on the default/--node-id path — making --namespace inert there. Attach the binding exactly as fetch::build_channel_ctx does (a latent pre-existing gap the new --namespace claim exposed). - [Low] Move common.validate() BEFORE the --dry-run short-circuit so the #1492 flag-combination rule (now in validate(), not clap) still rejects a dangling --provider-address under --dry-run. Regression test added. - [Low] Drop the stale `DECDNMAN` chunk reference from the --namespace doc (that format was retired in #1507); namespace now applies to the manifest blob + entries. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…l-id / --namespace (#1503) * feat(cli): decouple --provider-address from --node-id, guard --channel-id (#1492) Relax the clap `requires = "node_id"` on `--provider-address` and move the pairing rule into `ClientFetchArgs::validate()`: the flag may now stand alone alongside `--channel-id` (where it only guards the adopted channel's on-chain provider), while the auto-open path still requires an explicit `--node-id`. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cli): expose fetch adopt helpers to the crate for bundle pull reuse Widen hydrate_channel_by_id, resolve_node_for_provider, and attach_client_binding to pub(crate) so bundle pull can adopt a channel by id without duplicating the logic. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(cli): route bundle pull cache-miss origin pulls via --namespace Add a bundle-level --namespace flag to `decdn bundle pull`, reusing fetch's namespace parser. It threads through the single fetch_from choke point, so the manifest blob, DECDNMAN chunks, and every entry route their cache-miss origin pulls to the namespace's authorized origins. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(cli): bundle pull adopts a channel by id (--channel-id), pinning the bundle (#1481) Give `decdn bundle pull` the publisher-pays adopt-by-id path fetch already has: a Payment::{AutoOpen,Adopt} mode on PullCtx, resolved once in resolve_selection. In adopt mode the whole bundle pins to the channel's single on-chain provider (node derived from it, or an explicit --node-id), every entry pays from the adopted channel via hydrate_channel_by_id, and the on-chain open-lock is never taken. The keystore prompt is ordered per path so a failed discovery still never prompts. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(cli): document bundle pull --channel-id and --namespace Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(e2e): cover bundle pull --channel-id adopt-by-id against live anvil Anvil-gated journey: a buyer opens one payment channel on-chain (not recorded in the client store), then `decdn bundle pull --channel-id` adopts it and pulls a two-entry manifest — hydrating the channel from chain on the first entry and reusing it for the second. Asserts both files land, the persisted watermark advanced (the adopted channel paid), and the store row carries the opened channel id against the node's operator. --provider-address is passed standing alone as the mismatch guard (#1492), recovering the coverage the adopt path lost. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(cli): attach client binding on bundle pull auto-open so --namespace routes origins Review fixes for PR #1503: - [High] The AutoOpen branch returned the open_or_reuse context WITHOUT the ADR 005 client binding, so the node's pull_authorized gate never fired a cache-miss origin pull on the default/--node-id path — making --namespace inert there. Attach the binding exactly as fetch::build_channel_ctx does (a latent pre-existing gap the new --namespace claim exposed). - [Low] Move common.validate() BEFORE the --dry-run short-circuit so the #1492 flag-combination rule (now in validate(), not clap) still rejects a dangling --provider-address under --dry-run. Regression test added. - [Low] Drop the stale `DECDNMAN` chunk reference from the --namespace doc (that format was retired in #1507); namespace now applies to the manifest blob + entries. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Closes #1505.
What
Removes the DECDNMAN flat file-manifest surface entirely. The producer was never built; this removes the consumer (sniff/decode module, the magic-byte sniff on every fetched blob, the manifest-cap logic, the
fetch/bundle_pullcomposition, and the e2e fixture) and its documentation.Why
obao4 — bao verified-range streaming (ADR 038 +
crates/bao-range) plus origin-tier ranged pull (ADR 037) — is a strictly finer, single-hash superset of what DECDNMAN offered. Ranged access, resume, bounded origin egress, and verifiable file structure all fall out of one root hash at 16 KiB granularity, with no synthetic derived blobs. Multi-file payloads stay handled bybundle create/bundle pull. DECDNMAN's 256 MiB flat chunk-list was a coarser reimplementation of what the outboard already encodes. Backward-compat cost ≈ zero (early implementation; nothing was ever published as DECDNMAN). Matches how ADR 015/033 were retired.The uniquely-DECDNMAN capability (independently addressable sub-blobs via per-chunk hashes) is tracked as a proper obao4-based follow-up in #1506, not reintroduced here.
Removed
crates/cli/src/commands/file_manifest.rs— the whole consumer module.fetch.rs— the DECDNMAN magic sniff (read_if_manifest), theMAX_MANIFEST_BYTEScap, and the manifest→per-chunk expansion path (ChunkFetcher).bundle_pull.rs— the branch that expanded a DECDNMAN entry into chunk pulls; bundle entries are plain whole-file blobs again. TheSelectedTarget/fetch_preferreddiscovery-fallback machinery existed only to serve chunk sequences and is gone with it.common— the--no-keep-blobsflag (DECDNMAN-only chunk retention; no effect on the single-blob path).e2e—cli_fetch_manifest.rsand its now-unusedpostcard/serdeoptional deps._historyarchival or supersession prose), theappendix-bundles.mdnon-relationship note, the file-manifest mentions inarchitecture.md, and the now-dangling manifest-size reference in ADR 037.Kept (the replacement)
obao4 /
crates/bao-range/ ADR 037 / ADR 038 are untouched. Critically, the single-blob byte-offset resume (.partial, bao chunk-group resume infetch,cli_fetch_resumee2e) is obao4-based and stays — only the DECDNMAN chunk-part reconstruction was removed.Net-negative
git diff --stat: 105 insertions, 2197 deletions (net −2092).Verification
cargo build+cargo clippy --workspace --all-targets -- -D warningscleancargo nextest run— 2635 passed, 0 failedcargo test --no-run -p decdn-e2e --features anvil-e2ecompiles (fixture removed)cargo fmt -- --checkclean; pre-commit hooks (incl. ADR reference hygiene) pass🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
decdn fetchnow streams content-addressed files directly, with resumable downloads and atomic completion.Changes
--no-keep-blobsoption.