Skip to content

refactor: 清理过时兼容分支、文档与硬编码检查清单 - #2

Merged
LIghtJUNction merged 1 commit into
mainfrom
chore/cleanup-20261008
Oct 8, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
chore/cleanup-20261008

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Contributor

清理范围

本次只清理有源码和测试依据的内容,不删除现有业务功能,也不把所有带 legacy 的代码当作废弃代码。

  • 删除 worker、存储配额、文件作用域、卡密权益和代理路由中的运行期缺表兜底。API 与 worker 已在启动时完成 db.init();缺表不能继续解释为零用量、无历史交付或无需任务隔离。
  • 删除未被调用的 _versions 全历史读取函数,以及专门维护旧版缺表 worker 路径的测试。保留全部数据库迁移、旧卡密规则、任务快照、授权与交付保护。
  • CI 自动遍历全部 27 个 JavaScript 文件,补上原手工清单遗漏的第三方脚本;示例目录同时纳入 Python 检查。工作流示例按 flow.json 发现,不再把 __pycache__ 当作示例;空目录和缺少配套商品定义仍报错。
  • 将独立 SDK 示例从 scripts/welcome.py 移至 examples/sdk/,不再与服务器脚本混放。补充说明并排除构建、覆盖率和包元数据等生成物。
  • 更新过时的单商家、服务器别名、旧处理器执行方式说明。将历史验收流水替换为可复用验证指南,历史版本信息保留在 Git 历史和 releases 文档中。

共 23 个文件,新增 269 行、删除 410 行,净减少 141 行。只有一个清理提交;没有保留临时审计工作流、传输文件或依赖归档。未修改 main,未发布或部署。

已完成验证

  • 原基线完整 GitHub CI 通过:run 37749477689。
  • Python 本地全量对照:基线 3177 通过 / 64 失败;清理后 3186 通过 / 64 失败。失败测试 ID 集合完全相同,没有新增失败。本机没有 bubblewrap,不能用这个结果替代真实隔离执行 CI。
  • 数据库结构与工作流契约定向检查:63 通过,包含新加的 10 项缺表检查和 2 项示例发现检查。
  • 前端测试:865 通过、1 跳过、0 失败;27 个 JavaScript 文件语法检查通过。
  • 官方处理器:169 项测试、417 项子测试通过。
  • Ruff 检查和格式检查通过;Python 编译检查、3 组工作流示例、商城离线往返示例及 SDK 示例运行通过。

最终提交的完整 GitHub CI 由本 PR 触发,以其结果作为合并依据。没有声称完成生产环境、真实外部服务或长期运行验收。

Require the initialized database schema instead of silently bypassing quotas,
flow ownership and delivery history when tables are missing. Keep all data
migrations and legacy-record behavior.

Remove the unused delivery reader and pre-migration worker test. Add missing
schema regression tests. Discover all shipped JavaScript in CI and validate
examples without interpreting Python caches as workflows. Move the standalone
SDK sample out of server scripts and exclude generated build/coverage files.

Replace stale single-merchant and deployment narratives with current product
boundaries and reusable verification guidance.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 08:41

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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
🔒 Security Review ✅ Completed 2026-10-08T08:43:57.021337Z 59243fe PR opened
ℹ️ 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.

@LIghtJUNction
LIghtJUNction merged commit 1db2ad7 into main Oct 8, 2026
2 checks passed
@LIghtJUNction
LIghtJUNction deleted the chore/cleanup-20261008 branch October 8, 2026 14:26
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.

2 participants