← Back to Pull requests

COPY/MOVE: answer a plain status when only the destination fails #102

Closed
unknown closed this pull request without merging on Nov 18, 2026 10:43 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 07:11 UTC
Author

Part of #89 (point 2). Point 1 (DavLockSystem::lock errors) waits for a breaking release, as discussed there.

When the only failure of a COPY or MOVE is the Destination itself, the answer is now a plain status instead of a 207 Multi-Status with one response. Examples are a destination collection that cannot be created, or an existing destination that cannot be removed with Overwrite: T. This is the same as for a failure of the request path, which already answers a plain status. Failures of members still answer 207.

To do this, multi_error takes an optional destination path. A single status for that path is answered on its own, the same as one for the request path. DELETE passes None.

Members of an overwritten destination (from the Copilot review)

delete_items reported a member whose metadata could not be read with the path of the collection it walks, and went on removing the other members. With the change above, a COPY or MOVE onto an existing collection would then answer a plain status for the destination although it had been partly removed. The error is now reported for the member, so the answer is a 207 with the member's href.

This also changes DELETE, which had the same problem for the Request-URI: such a member now answers a 207 instead of a plain status for the collection, as RFC 4918 section 9.6.1 asks.

As you noted in #89, RFC 4918 (sections 9.8 and 9.9) asks for a 207 when the failed resource is not the Request-URI, and the Destination falls in that category. SabreDAV answers with the plain status, which clients handle better. This changes the shape of the response, not the Rust API.

Changelog note

There is no changelog file in the repository, so here is a suggested line for the release notes:

COPY and MOVE answer a plain status (for example 403 Forbidden) instead of a 207 Multi-Status with one response when the only failure is the Destination itself. Failures of members inside a collection still answer 207.

> DELETE, COPY and MOVE report a member whose metadata cannot be read with that member's href in a 207 Multi-Status, instead of a plain status for the collection.

Tests

New tests/copymove_dest_status_tests.rs, with a MemFs wrapper that refuses some operations:

  • a destination collection that cannot be created, and an existing destination that cannot be removed (COPY and MOVE), answer 403. Without the change these answer 207;

  • a refused member inside the copied collection still answers 207;

  • a member of an existing destination collection whose metadata cannot be read answers 207 for COPY and MOVE, and so does a DELETE of that collection. Without the fix, COPY answers 403.
  • cargo test --all-features --all, cargo clippy --all-targets [--all-features] -- -D warnings, cargo fmt --check and the feature-set builds from CI pass with Rust 1.100.0.

    Merging

    Rebased on main after #99: multi_error now takes both the destination and the DAV prefix.

    Diff: 370 lines (+277 / -93) across 4 files Reviewer: messense Review duration: 10291m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 370 lines diff across 4 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #102"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.8% (MEDIUM) · Higher = larger blast radius
    47.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%