Skip to content

cli: flattened entry pulls without -o replace each other on a shared file name #2472

Closed

Description

@thiras

Problem

Without -o, an entry URI lands at ./<name>, the last segment of its path (#2466). Two entries from different paths or bundles can share that name:

decdn get decdn:<H>/text_encoder/config.json   # writes ./config.json
decdn get decdn:<H>/tokenizer/config.json      # silently replaces it

The refusal added in #2466 does not catch this. The first pull records config.json in ./.decdn-manifest.json, so the second pull treats the file as its own and fetches over it: the hash differs, so the skip check fails (crates/client/src/bundle/engine.rs resolve_disk_state). The record also loses track of which manifest path produced the file, because skip-cache records are keyed by the flattened name.

The same applies to two bundle pulls into . whose root-level entries share a name.

Possible fix

When the default destination is used, refuse to replace a recorded file whose record came from a different manifest path or bundle. This means the skip-cache record must store its source (manifest hash + entry path). Pre-mainnet, so the skip-cache format can change with no migration.

Activity

  1. added
    kind:bug
    area:cli
    on Oct 16, 2026
  2. self-assigned this
    on Oct 16, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 16, 2026
  4. moved this from In progress to Done in deCDNon Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions