Skip to content

feat: 重构压缩结果下载协议并完善配置与测试#7

Merged
zzgosh merged 5 commits intomainfrom
codex/ephemeral-result-resource
Mar 8, 2026
Merged

feat: 重构压缩结果下载协议并完善配置与测试#7
zzgosh merged 5 commits intomainfrom
codex/ephemeral-result-resource

Conversation

@zzgosh
Copy link
Copy Markdown
Owner

@zzgosh zzgosh commented Mar 8, 2026

变更概览

  • 将压缩接口重构为固定返回 metadata + 一次性 download URL 的协议,避免 metadata 与 binary 双请求重复压缩
  • 新增临时结果存储与下载路由,支持 TTL、单次消费、临时存储上限和下载后删除
  • 将上传限制与临时存储限制拆分为独立环境变量,并统一为更易理解的 MB 配置与错误文案
  • 保留原始 Unicode 文件名,下载响应同时提供 ASCII fallback 与 UTF-8 文件名
  • 重写 README 与 OpenAPI,移除旧 responseMode 心智模型
  • 扩充自动化测试;本地存在 test_images/ 时自动追加真实样本回归,不存在时自动跳过

验证

  • npm run check
  • npm test
  • npm run build

zzgosh added 2 commits March 8, 2026 17:49
- 将压缩接口调整为 metadata 加一次性下载 URL 的协议
- 新增临时结果存储与下载路由,支持 TTL 和存储上限
- 补充上传限制配置、MB 友好文案以及 README/OpenAPI/测试
- 将 test_images 纳入仓库并移除错误的 gitignore 规则
- 更新 README,说明仓库内真实样本回归策略
- 调整真实样本失败用例,兼容 415 与 422 两类显式失败
@zzgosh
Copy link
Copy Markdown
Owner Author

zzgosh commented Mar 8, 2026

@codex review

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: 55bb62dd01

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

- 仅清理服务自己创建的临时结果文件,避免误删用户配置目录中的其他内容
- 串行化结果存储的创建与回收,避免并发上传时突破临时存储上限
- 补充对应回归测试并更新 README 说明
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: b26f864e30

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

- 将 ZIP 临时归档写入结果目录外的 staging 区,避免在容量校验前撑大 RESULT_STORAGE_MAX_SIZE
- 将正整数环境变量改为纯数字校验,拒绝 10foo 和 1e3 这类脏值
- 补充对应回归测试并更新 README 说明
@zzgosh
Copy link
Copy Markdown
Owner Author

zzgosh commented Mar 8, 2026

@codex review in chinese language

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: 9209e51e4b

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

- 避免在写入 ZIP 时再次执行文件名去重,确保 metadata 与 ZIP 内条目名一致
- 为每个结果存储实例生成独立 staging 目录,避免多实例部署时互相清理临时 ZIP
- 补充对应回归测试
@zzgosh zzgosh merged commit 10f2cc8 into main Mar 8, 2026
1 check passed
@zzgosh zzgosh deleted the codex/ephemeral-result-resource branch March 8, 2026 11:59
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