Skip to content

refactor(cli): retire the DECDNMAN file-manifest format (#1505) - #1507

Merged
alpergundogdu merged 1 commit into
mainfrom
claude/unruffled-dewdney-156c87
Jul 29, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
claude/unruffled-dewdney-156c87

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

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_pull composition, 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 by bundle 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), the MAX_MANIFEST_BYTES cap, 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. The SelectedTarget / fetch_preferred discovery-fallback machinery existed only to serve chunk sequences and is gone with it.
  • common — the --no-keep-blobs flag (DECDNMAN-only chunk retention; no effect on the single-blob path).
  • e2e — cli_fetch_manifest.rs and its now-unused postcard/serde optional deps.
  • Docs — ADR 012 § File Manifests and Reconstruction (removed cleanly, no _history archival or supersession prose), the appendix-bundles.md non-relationship note, the file-manifest mentions in architecture.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 in fetch, cli_fetch_resume e2e) 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 warnings clean
  • cargo nextest run — 2635 passed, 0 failed
  • cargo test --no-run -p decdn-e2e --features anvil-e2e compiles (fixture removed)
  • cargo fmt -- --check clean; pre-commit hooks (incl. ADR reference hygiene) pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • decdn fetch now streams content-addressed files directly, with resumable downloads and atomic completion.
    • Interrupted downloads resume from the last verified position and can reuse an open payment channel.
    • Bundle pulls fetch each distinct blob once and materialize it across destinations.
  • Changes

    • Removed support for chunked file-manifest reconstruction and the related --no-keep-blobs option.
    • Updated documentation to reflect the simplified download and proxy-fetch behavior.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@alpergundogdu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: adf30111-bc2f-4d6b-9c5e-eeae616afb6f

📥 Commits

Reviewing files that changed from the base of the PR and between 6955755 and 01525a0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (12)
  • adr/012-client.md
  • adr/037-regional-proxy-warming.md
  • adr/appendix-bundles.md
  • adr/architecture.md
  • crates/cli/Cargo.toml
  • crates/cli/src/commands/bundle_pull.rs
  • crates/cli/src/commands/fetch.rs
  • crates/cli/src/commands/file_manifest.rs
  • crates/cli/src/commands/mod.rs
  • crates/common/src/cli/fetch.rs
  • crates/e2e/Cargo.toml
  • crates/e2e/tests/cli_fetch_manifest.rs

Walkthrough

The CLI no longer reconstructs DECDNMAN manifests. Fetching and bundle pulls operate on individual blobs, manifest-specific dependencies and options are removed, and ADRs are updated for direct blob handling and download resume behavior.

Changes

DECDNMAN manifest removal

Layer / File(s) Summary
Simplify single-blob fetch flow
crates/cli/src/commands/fetch.rs, crates/common/src/cli/fetch.rs, crates/cli/src/commands/mod.rs, crates/cli/Cargo.toml
decdn fetch streams and verifies one blob directly, while manifest parsing, chunk reconstruction, the --no-keep-blobs option, and related dependencies and tests are removed.
Use direct blob targets in bundle pulls
crates/cli/src/commands/bundle_pull.rs
Bundle pulls select targets per blob, fetch each distinct blob once, and atomically materialize bytes to grouped destinations without nested manifest reconstruction.
Remove manifest-specific build wiring
crates/e2e/Cargo.toml
The anvil-e2e feature no longer enables optional postcard or serde dependencies.
Update architecture decisions
adr/012-client.md, adr/037-regional-proxy-warming.md, adr/appendix-bundles.md, adr/architecture.md
ADRs describe resume behavior and exact origin size probing while removing DECDNMAN-specific references.

Estimated code review effort: 4 (Complex) | ~45 minutes


Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 80.81% (was 80.77%, ▲ +0.04%) — 53963/66778 lines

File Coverage Lines Δ
crates/cli/src/commands/bundle_pull.rs 50.63% 360/711 ▼ 5.96%
crates/cli/src/commands/fetch.rs 41.12% 530/1289 ▲ +0.48%
crates/cli/src/commands/file_manifest.rs — — deleted
crates/common/src/cli/fetch.rs 100.00% 122/122 ● 0.00%
History
Commit Total Δ vs base
6955755 80.81% ▲ +0.04%
01525a0 (HEAD) 80.81% ▲ +0.04%

@alpergundogdu alpergundogdu changed the title Retire the DECDNMAN file-manifest format (#1505) refactor(cli): retire the DECDNMAN file-manifest format (#1505) Jul 29, 2026
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]>
@alpergundogdu
alpergundogdu force-pushed the claude/unruffled-dewdney-156c87 branch from 6955755 to 01525a0 Compare July 29, 2026 14:08
@alpergundogdu
alpergundogdu merged commit 4d9d27c into main Jul 29, 2026
27 checks passed
@alpergundogdu
alpergundogdu deleted the claude/unruffled-dewdney-156c87 branch July 29, 2026 14:33
alpergundogdu added a commit that referenced this pull request Jul 29, 2026
…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]>
alpergundogdu added a commit that referenced this pull request Jul 29, 2026
…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]>
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.

Retire the DECDNMAN file-manifest format — obao4 verified ranges supersede it

1 participant