Skip to content

fix: MCP uploadFiles 工具上传成功后静态托管仍返回 404,缺少部署完整性校验与后置步骤引导#650

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moj0dwx7-bkz1io-mcp-uploadfiles-404
Open

fix: MCP uploadFiles 工具上传成功后静态托管仍返回 404,缺少部署完整性校验与后置步骤引导#650
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-moj0dwx7-bkz1io-mcp-uploadfiles-404

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_moj0dwx7_bkz1io
  • category: tool
  • canonicalTitle: MCP uploadFiles 工具上传成功后静态托管仍返回 404,缺少部署完整性校验与后置步骤引导
  • representativeRun: application-js-vite-hello-world-hosting-deploy/2026-04-28T19-16-19-ac1ee9

Automation summary

全部 11 项测试通过。 摘要: - 根本原因: AI 代理在子目录部署时使用了错误的构建配置指南。多个技能文件和 uploadFiles 工具描述指出,对于子目录部署,base/publicPath/assetPrefix 应该使用相对路径('./'),这导致当浏览器访问的 URL 不带尾部斜杠(例如 /vite-test)时,所有 JS/CSS 资产解析为根路径 / 而非 /vite-test/,从而引发 404 错误。此外,缺少关于 cloudPath 格式(无前导斜杠)、上传完整 dist/ 目录以及上传前强制重建的指导。 - 变更: 1. mcp/src/tools/hosting.ts (第一层 - 工具描述): 更新了 uploadFiles 工具描述,增加了子目录部署强制预检查清单(4项),将错误的“使用相对路径”指导更正为“必须使用绝对路径,例如 /vite-test/”,添加了 cloudPath 格式规则(无前导 /),更新了错误消息构建器以提供正确的建议,并更新了 cloudPath 参数描述。 2. mcp/src/tools/storage-hosting-guidance.test.ts: 更新了测试断言,以验证新的清单内容(“子目录部署强制前置检查”、“禁止使用 './'”,“不要带前导 '/'”)。 3. config/source/skills/web-development/SKILL.md (第一层 - 技能文本): 用详细的子目录部署指导替换了错误的“对于静态托管兼容性,优先使用相对资产路径”部分,其中包括绝对路径要求和4项预检查清单。 4. config/source/skills/web-development/frameworks.md (第一层 - 技能文本): 添加了 Vite 特定的子目录 base 配置指导,明确禁止 base: './',并提供了正确的 base: '/vite-test/' 示例。 5. config/source/skills/cloudbase-platform/SKILL.md (第一层 - 技能文本): 在“存储与托管”下添加了新的“静态托管子目录部署”部分,包含相同的4项检查清单和 cloudPath 格式规则。 6. config/source/guideline/cloudbase/SKILL.md (第一层 - 技能文本): 在“静态托管 (Web)”部署部分添加了子目录预检查和 cloudPath 格式指导。 - 验证: 所有 3 个强制性回归测试通过,托管指导测试通过,`npx tsc --

Changed files

  • config/source/guideline/cloudbase/SKILL.md
  • config/source/skills/cloudbase-platform/SKILL.md
  • config/source/skills/web-development/SKILL.md
  • config/source/skills/web-development/frameworks.md
  • mcp/src/tools/hosting.ts
  • mcp/src/tools/storage-hosting-guidance.test.ts

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Apr 28, 2026

Attribution post-PR evaluation

  • visibility: internal identifiers, run ids, and private links are intentionally omitted
  • attempt: 1
  • eval_scope: primary_only
  • overall: ERROR
  • summary: post-PR evaluation errored
  • updated_at: 2026-04-28T20:31:14.062Z

Cases

  • [ERROR] — primary — evaluation errored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant