Skip to content

fix: uploadFiles 工具 cloudPath 参数语义不清,导致静态托管部署路径错误#603

Open
binggg wants to merge 3 commits intomainfrom
automation/attribution-issue-mocuydus-kbqni9-uploadfiles-cloudpath
Open

fix: uploadFiles 工具 cloudPath 参数语义不清,导致静态托管部署路径错误#603
binggg wants to merge 3 commits intomainfrom
automation/attribution-issue-mocuydus-kbqni9-uploadfiles-cloudpath

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 28, 2026

Attribution issue

  • issueId: issue_mocuydus_kbqni9
  • category: tool
  • canonicalTitle: uploadFiles 工具 cloudPath 参数语义不清,导致静态托管部署路径错误
  • representativeRun: application-js-vite-hello-world-hosting-deploy/2026-04-24T11-57-20-1e116f

Automation summary

干净的diff正好修改了5个文件。所有更改都是第1层(技能文本和工具描述的修复)。 摘要: - 根本原因uploadFiles 工具描述和 web-development 技能包含不正确/不明确的指导,导致AI代理在子目录部署时失败:(1) 工具描述建议为子路径部署使用“相对路径”('./'),但这会导致404错误——base/publicPath必须是与子目录匹配的绝对路径; (2) cloudPath参数的示例是“files/data.txt”,但没有明确说明不能有前导/; (3) 没有强制性的部署前检查清单,确保在子目录部署前base/publicPath已正确设置、项目已重建并且输出已验证; (4) “首选相对资源路径”在web-development技能中具有误导性——这在子目录部署时是错误的。 - 更改(5个文件,全部为第1层): 1. mcp/src/tools/hosting.ts — 修复了uploadFiles描述:用子目录部署检查清单(base必须是与目标匹配的绝对路径,禁止'./',重建,验证输出)替换了不正确的“相对路径”建议。修复了cloudPath参数描述:阐明其相对于托管根目录,不带前导/,示例为'vite-test'而非'/vite-test'。 2. config/source/skills/web-development/SKILL.md — 将“首选相对资源路径”替换为“部署整个dist/目录内容”。添加了完整的“子目录部署检查清单”部分,其中包含3项强制验证。添加了cloudPath格式规则。添加了“根部署”部分以明确根目录情况。 3. config/source/guideline/cloudbase/SKILL.md — 在静态托管部分添加了子目录部署警告,包括base/publicPath必须为绝对路径,cloudPath不能以/开头。 4. doc/mcp-tools.md — 更新了工具描述和cloudPath参数文档,以匹配hosting.ts中的新文本。 5. doc/prompts/web-development.mdx — 将“首选相对资源路径”替换为“部署整个dist/目录内容”。 - 验证:TypeScript编译通过。所有3项强制性技能回归测试通过(build-skills-repobuild-compat-configskill-quality-standards)。storage-hosting-guidance单元测试通过。Diff中未泄露任何内部评估组件。 - 后续:无。这是一个真正的产品缺陷——AI代理被技能

Changed files

  • config/source/guideline/cloudbase/SKILL.md
  • config/source/skills/web-development/SKILL.md
  • doc/mcp-tools.md
  • doc/prompts/web-development.mdx
  • mcp/src/tools/hosting.ts

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4aab8adee3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 166 to 169
- Build before deployment
- Prefer relative asset paths for static hosting compatibility
- Deploy the entire `dist/` directory contents, not just `index.html`
- Use hash routing by default when the project lacks server-side route rewrites
- If the user does not specify a root path, avoid deploying directly to the site root by default
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sync prompt mirror with new subdirectory deploy rules

This prompt mirror section was only edited to replace one bullet, but it still omits the new Subdirectory deployment checklist and cloudPath format guidance that were added to config/source/skills/web-development/SKILL.md for this fix. As a result, users/agents reading doc/prompts/web-development.mdx still do not get the mandatory pre-upload checks, so the same subdirectory asset-path deployment failures can persist on that surface. Please regenerate prompts from the updated skill source (or add the missing sections here) so the guidance is consistent.

Useful? React with 👍 / 👎.

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