fix(drivers/webdav): retry collection stat with trailing slash #3223
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 496 lines diff across 6 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.371
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3223"
general
weight: 0.35
elysia-best
<!--
PR title / PR 标题:
type(scope): summaryfeat,docs,fix,style,refactor,chore!:feat(driver)!: change auth flow-->
Summary / 摘要
Some WebDAV servers (e.g. InfiniCloud) answer a PROPFIND on a collection path without the trailing slash with a redirect the HTTP client follows into a plain 200 HTML response instead of the required 207 Multi-Status, so every stat of a subdirectory fails even though the directory exists. The upstream symptom this produces: any upload into a nested directory dies with "failed to get dir [<path>]: failed to get obj: PROPFIND <path>: 200" — MakeDir succeeds, then the stat of the freshly created parent dir fails, because op.GetUnwrap goes straight to driver.Get.
Retry the stat once against the canonical collection URL (slash appended) before giving up; 404s are not retried, and paths already carrying the slash skip the retry. The new test reproduces the quirky server (slash-less PROPFIND -> 200 HTML, slash PROPFIND -> 207) and fails on the unpatched driver with the exact production error.
<!--
-->
/ 此 PR 包含破坏性变更。
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
/ 此 PR 需要关联仓库同步修改。
Related repository PRs / 关联仓库 PR:
Related Issues / 关联 Issue
<!--
Use
Closes #123,Fixes #123, orRelates to #123.Remove this section if not applicable.
使用
Closes #123、Fixes #123或Relates to #123。不适用时请删除本节。
-->
Testing / 测试
<!--
Describe commands, platforms, and manual checks.
If not tested, explain why.
说明执行过的命令、测试平台和手动验证。
如果未测试,请说明原因。
-->
go test ./...Checklist / 检查清单
/ 我已阅读 CONTRIBUTING。
/ 我确认此贡献符合仓库许可证、贡献规范和行为准则。
gofmt,go fmt, orprettierwhere applicable./ 我已按适用情况使用
gofmt、go fmt或prettier格式化变更代码。/ 我已在适用情况下请求相关维护者或代码所有者审查。
AI Disclosure / AI 使用声明
<!--
Please disclose any substantial AI assistance used in this PR.
Minor AI assistance, such as typo fixes, autocomplete, formatting suggestions,
or wording polish, does not need to be disclosed.
Remove this section if not applicable.
请披露此 PR 中使用的重要 AI 辅助内容。
轻微 AI 辅助,例如拼写修正、自动补全、格式建议或文字润色,无需披露。
如不适用,请删除本节。
Deliberate non-disclosure may be treated as a trust and compliance issue.
故意隐瞒 AI 使用情况可能被视为信任与合规问题。
-->
/ 此 PR 包含 AI 辅助内容。
Tools used / 使用工具:
Usage scope / 使用范围:
/ 我已审核并验证此 PR 中的所有 AI 辅助内容。
Co-Authored-Byattribution./ 我已确保所有 AI 辅助提交都包含
Co-Authored-By归属信息。/ 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。