Skip to content

test(e2e): assert the real bundle pull's unmatched-pattern warning on stderr #2672

Closed

Description

@yigitdot

A real (non-dry-run) decdn get 'decdn:<hash>/' prints each unmatched --include/--exclude pattern on stderr through EntryFilter::apply_and_warn, called from obtain_manifest (crates/cli/src/commands/bundle_pull.rs). No test runs that path through the binary. A real pull is where an --exclude that silently matched nothing costs the user money, because they pay for the entries they meant to skip.

The dry-run path has a subprocess test (crates/cli/tests/bundle_pull_dryrun.rs, #2671). The real path cannot be tested offline in crates/cli/tests/: before obtain_manifest reads the manifest, open_puller selects nodes, loads the buyer keystore, and BundlePullerBuilder::build reads PaymentPool.usdc() over RPC.

Suggested shape (in crates/e2e, behind anvil-e2e):

  • ChainFixture for the chain, plus a keystore made with decdn key-gen.
  • Pass --node-id/--provider-address so node selection skips the registry.
  • Seed the output root's manifest cache by hand (BundleManifest::cache_path; a load accepts any file whose BLAKE3 equals the hash in its name), so no manifest fetch is needed.
  • Run with --exclude 'metal/*' --exclude '**' against a manifest whose metal/ directory sits below a top-level directory. The filter empties the set, so the run ends at report_nothing_to_fetch before it dials a node or pays.
  • Assert stderr contains warning: --exclude 'metal/*' matched no entries and the did you mean '**/metal/*' hint, and stdout contains no bundle entries match the include/exclude filters; nothing to fetch.

Follow-up to #2362.

Activity

  1. added
    kind:test
    area:cli
    on Oct 28, 2026
  2. moved this from Backlog to In progress in deCDNon Oct 30, 2026
  3. moved this from In progress to Done in deCDNon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clikind:test

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions