Skip to content

[P2] cp and mv return success after partial source preparation failure #64

Closed

Description

@Vonng

Summary

cp and mv stop source preparation after a missing source but return success if another source was already queued or completed.

Reproduction

mcli cp /tmp/partial/good /tmp/partial/missing ALIAS/BUCKET/dest/
mcli mv /tmp/partial/good /tmp/partial/missing ALIAS/BUCKET/dest/

Observed

The missing-source error is printed. The good source is copied; for mv it is removed from the source. Both commands exit 0.

The final status is set only when errSeen && totalObjects == 0 in cp-main.go, even though preparation records an error at cp-main.go.

Expected

Any source listing/preparation error must make the aggregate command exit nonzero, while the output should still identify successfully processed items and failures.

Acceptance

  • Mixed success/failure cp and mv return nonzero.
  • All-success and all-failure behavior remains correct.
  • JSON output remains parseable and identifies per-source outcomes.
  • Add CLI tests with missing local sources, inaccessible paths, and remote listing failures.
  • Define/document partial mv semantics; do not report complete success.

Confirmed on current main 07753f7efc5036465bb79dadde031ec07f172505 with local CLI black-box runs.

Activity

  1. Vonng commented on Nov 8, 2026

    @Vonng
    MemberAuthor

    Fixed on main in #74 (bfb58768).

    Source preparation errors now propagate to the final exit status even when other sources succeed. Valid sources continue to be processed; for mv, successfully transferred sources may therefore already have been removed when the command reports failure. CLI regressions and live SILO checks cover missing local and remote sources in both argument orders.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions