Skip to content

fix(workers): support native assets import and initial Secret setup - #54

Merged
dxiongya merged 5 commits into
mainfrom
feature/workers-background-rollup-20261012
Oct 12, 2026
Merged

dxiongya merged 5 commits into
mainfrom
feature/workers-background-rollup-20261012

Conversation

@dxiongya

@dxiongya dxiongya commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

原生 Vite 项目的资产目录由构建生成,导入源 Wrangler 配置此前被提前拒绝;部分正常的生成配置路径被误判为密钥,新项目在 CI 中设置必需 Secret 前也缺少自动关联 Worker 的入口。

本次修正:

  • 先导入源配置,plan/push 构建后读取原生生成的资产目录,保留绑定和路由;pull/promote 使用远端快照或不可变 Artifact,不要求本地构建产物。
  • 修正明确文件路径字段的密钥误判;构建命令及其他值保持原有完整凭据检查。
  • workers create --config xapi.worker.json 创建并保存 Worker ID,重复调用复用已关联项目,不构建、不创建声明资源、不发布。创建结果不确定时,核对会排除创建前已存在的 ID,避免误关联其他项目;可选列表查询失败不阻止成功创建。
  • 缺少必需 Secret 时,非交互 push 明确返回缺失项和结构化 setup.command/setup.args,避免假设 shell 引号语法;创建后的 Secret 提示分别标明 preview / production 及示例文件,只配置实际需要的环境;CLI 提示及随包 Skill 同步更新。

这是统一候选 feature/workers-background-rollup-20261012 的 CLI 配套 PR,后端属于独立仓库。没有改变计费、权限、资源生命周期、发布串行范围或部署环境变量;Sandbox 状态投影延迟 X-16 不属于本 PR。

验证:

  • bun install --frozen-lockfile、bun run typecheck、bun run build、bun run test、npm pack --dry-run --ignore-scripts 全部通过;本地完整 1,407 项测试通过,CI 通过;Skill 校验通过。
  • Pi Agent 的真实 Vite 构建和 Wrangler dry-run 通过,产物 1,962,021 字节,保留静态资产路由和 D1/R2/DO 绑定;该构建没有发布到 CF。
  • api.test.xapi.to 上的新项目完成构建前导入、自动关联、重复创建复用、批量 Secret、首次部署与更新;API 返回新版本和有效 Secret,静态资源字节与本地一致。
  • 最终候选补验:按缺少 Secret 的提示参数继续创建、设置 Secret、原生发布成功(约 30 秒),干净检出下 pull 通过,独立测试项目删除并回读 DELETED。
  • 账务基本查询 COMPLETE,已记录金额与现有单价一致;不代表全部资源计量验收。
  • 测试使用路径入口,没有绑定独立域名,不代表根域名浏览器完整验收。没有进行 npm 发布,也没有改生产配置。

@dxiongya

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T06:48:30.557092Z 67f6b24 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 6cb4f35fdc

ℹ️ 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 thread src/workers-wrangler-import.ts Outdated
@dxiongya

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: 5a2082cdf3

ℹ️ 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 thread src/workers-push.ts Outdated
Comment thread src/workers-project.ts Outdated
@dxiongya

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: 34ca35375d

ℹ️ 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 thread src/workers-push.ts Outdated
@dxiongya

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: db9ce411df

ℹ️ 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 thread src/workers-push.ts Outdated
@dxiongya

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 67f6b24cbb

ℹ️ 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".

@dxiongya
dxiongya merged commit db7faf7 into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant