← Back to Pull requests

fix(drivers/webdav): retry collection stat with trailing slash #3223

Closed
unknown closed this pull request without merging on Oct 23, 2026 14:47 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 12:58 UTC
Author

<!--
PR title / PR 标题:

  • Use Conventional Commits: type(scope): summary

  • Allowed types: feat, docs, fix, style, refactor, chore

  • Scope is required by the current PR title check.

  • For breaking changes, add !: 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.

    <!--

  • List user-visible behavior changes.

  • List important implementation changes.

  • Mention config, storage, API, or compatibility changes if any.
  • 列出用户可感知的行为变化。

  • 列出重要实现变化。

  • 如涉及配置、存储、API 或兼容性变化,请明确说明。

  • -->

  • This PR has breaking changes.

  • / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.

  • / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.

  • / 此 PR 需要关联仓库同步修改。

    Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:

  • OpenList-Docs:
  • Related Issues / 关联 Issue

    <!--
    Use Closes #123, Fixes #123, or Relates 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 ./...

  • Manual test / 手动测试:
  • Checklist / 检查清单

  • I have read CONTRIBUTING.

  • / 我已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.

  • / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.

  • / 我已按适用情况使用 gofmt、go fmt 或 prettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.

  • / 我已在适用情况下请求相关维护者或代码所有者审查。

    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 使用情况可能被视为信任与合规问题。
    -->

  • This PR includes AI-assisted content.

  • / 此 PR 包含 AI 辅助内容。

    Tools used / 使用工具:

  • ChatGPT

  • Codex

  • GitHub Copilot

  • Claude

  • Gemini

  • Other (please specify) / 其他(请注明):
  • Usage scope / 使用范围:

  • Code generation / 代码生成

  • Refactoring / 重构

  • Documentation / 文档

  • Tests / 测试

  • Translation / 翻译

  • Review assistance / 审查辅助
  • I have reviewed and validated all AI-assisted content included in this PR.

  • / 我已审核并验证此 PR 中的所有 AI 辅助内容。
  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.

  • / 我已确保所有 AI 辅助提交都包含 Co-Authored-By 归属信息。
  • I can reproduce all AI-assisted content included in this PR without any AI tools.

  • / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

    Diff: 496 lines (+372 / -124) across 6 files Reviewer: elysia-best Review duration: 4429m
    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
    0.47
    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.371
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3223"
    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.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    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.8% · Safe to merge
    18.8%