Skip to content

test(cli): assert the bundle pull unmatched-pattern warning on stderr from the real binary #2362

Closed

Description

@thiras

What happens

No test checks that the bundle pull unmatched-pattern warning reaches the user. EntryFilter::apply_reporting and dry_run_manifest have unit tests, but apply_and_warn prints with eprintln!, and the in-process tests cannot capture stderr. A change that drops the apply_and_warn call from the dry run or the real pull leaves every test green.

Expected

A subprocess test in crates/cli/tests/ runs the real decdn binary, the same way origin_import_dryrun.rs and fetch_node_dir_guard.rs do (common::decdn_command(home)):

  1. Write a v1 manifest with prefixed paths (openai-gpt-oss-20b/config.json, openai-gpt-oss-20b/metal/model.bin) to <out>/.decdn-bundles/<blake3 hex>.json by hand (bundle_cache is pub(crate)).
  2. Run bundle pull --hash b3:<hex> -o <out> --exclude 'metal/*' --dry-run.
  3. Assert that stdout contains would fetch 2 entr(ies), and that stderr contains warning: --exclude 'metal/*' matched no entries and the '**/metal/*' hint.
  4. Run it again with no cache file. Assert that stdout contains the no-cache line and the include/exclude patterns are matched against them then note.
  5. Optional: the same run with -i <manifest> instead of --hash.

Evidence

Found in the review of #2360 (#2327).

Activity

  1. added
    kind:test
    on Oct 7, 2026
  2. self-assigned this
    on Oct 7, 2026
  3. added
    area:cli
    on Oct 7, 2026
  4. removed their assignment
    on Oct 7, 2026
  5. added
    good first issue
    on Oct 9, 2026
  6. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  7. moved this from In progress to Done in deCDNon Oct 28, 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:cligood first issuekind: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