chore(文档): CLAUDE.md 瘦身,后端专属的坑挪进 apps/api/CLAUDE.md,并改正「推 origin 不部署」的说法
Deploy / deploy (push) Canceled after 0s

- 单二进制、runtime.ts、SQL 自 spawn、路由遮蔽、出参 satisfies、外键与迁移原样搬到
  apps/api/CLAUDE.md,只在动后端文件时加载;根文件留一行指路
- Chrome 105 的 polyfill 审计细节挪到 apps/web/CLAUDE.md
- 删掉 ls 就能看到的仓库结构表,以及 docs/database.md、docker/judge/README.md 已有的重复步骤
- origin 会镜像到 github,平时推 origin 通常也就部署了(CLAUDE.md 与 deploy.md 原来写的是不触发)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-20 18:18:24 +08:00
1 parent 51c3c16fd5
commit 4be569d978
7 files changed
+104 -114

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# 契约:闸门设在写入侧的来龙去脉
规矩在 `CLAUDE.md`「出参不 `parse`,用 `satisfies`」一节,前端那侧
规矩在 `apps/api/CLAUDE.md`「出参不 `parse`,用 `satisfies`」一节,前端那侧
(`utils/contract.ts` 为什么只挂三处)在 `apps/web/CLAUDE.md`。这里是证据。
## 读出侧校验自己造出来的四次故障
+1 -1
View File
@@ -1,6 +1,6 @@
# 数据库与迁移
`CLAUDE.md` 里只留了日常要记住的那几条,这里是细节:迁移执行器为什么是自己的、
`apps/api/CLAUDE.md` 里只留了日常要记住的那几条,这里是细节:迁移执行器为什么是自己的、
空库怎么自举、给已有库打基线、以及 drizzle-kit 的几个坑。
## 迁移执行器是自己的,不是 drizzle 那个
+2 -1
View File
@@ -58,7 +58,8 @@ docker exec -it oj-postgres psql -U onlinejudge -d postgres -c '\password online
`.github/workflows/deploy.yml` —— 在 runner 上编好产物、rsync 到服务器、在服务器上
跑 `docker/deploy.sh --prebuilt`。触发的是 push 到 **github** 这个 remote
(`origin` 是 `git.xuyue.cc`,平时那次 push 不触发 —— 那边是 Gitea,没有
(`origin` 是 `git.xuyue.cc`,它会镜像到 github,所以**平时 push `origin` 通常几秒后
也就部署了**,偶尔不跟、要 `git ls-remote github` 核实。Gitea 自己不跑这份工作流 —— 没有
`.gitea/workflows` 时它的 Actions 会退回来读这份工作流,所以 job 上卡了
`github.server_url == 'https://github.com'`,在 Gitea 上直接跳过):