COPY/MOVE: answer a plain status when only the destination fails #102
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
messense
Part of #89 (point 2). Point 1 (
DavLockSystem::lockerrors) 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_errortakes an optional destination path. A single status for that path is answered on its own, the same as one for the request path. DELETE passesNone.Members of an overwritten destination (from the Copilot review)
delete_itemsreported 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:
Tests
New
tests/copymove_dest_status_tests.rs, with aMemFswrapper that refuses some operations:403. Without the change these answer 207;cargo test --all-features --all,cargo clippy --all-targets [--all-features] -- -D warnings,cargo fmt --checkand the feature-set builds from CI pass with Rust 1.100.0.Merging
Rebased on main after #99:
multi_errornow takes both the destination and the DAV prefix.