5d00e71275
頂層 D22 決策(leo 2026-07-03 拍板):推什麼由開發環境歸屬決定, Gitea private=除機敏值/build 產物/.github 外全 push。 解 T1.5 卡點:雲端工人 clone 拿得到 credential-store-migration.md,可就地改寫 SDD。 機敏掃描兩輪通過(新增 189 檔約 2.1MB,node_modules/dist/wasm 照舊排除)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
RELEASE-CHECKLIST — 出貨清單(沒有 GitHub Actions,每個 target 分開推,照順序不漏)
為什麼要這份:沒有 CI,deploy 是「一個個分開」的動作(git / CF workers / npm CLI)。 漏任一步就會「有些新有些舊」——壓測踩過兩次:
- 第一次:CLI 改了但 npm 沒發 → 用戶 npm 裝到舊 CLI。
- 第二次(階段 6):cypher 改了但沒推 main →
acr init從 origin/main codeload 抓到舊 worker → 薄殼打不存在的 API(seed 404)。核心鐵則:self-hosted
acr init從origin/main抓 worker 源。所以「git push main」必須在「部署」之前。 順序錯了 = deploy 出去的 prod 是新的,但 self-hosted 用戶裝到的是舊的。
正確順序(照做不會忘)
0. 改完 code,先驗證
- 三端 typecheck 綠:
cd cli && npx tsc --noEmit、cd cypher-executor && npx tsc --noEmit、cd mcp && npx tsc --noEmit - 動到的 .sh:
bash -n scripts/<檔>.sh
1. ⬆️ 先 git commit + push(必須在 deploy 之前)
git add -A(確認.env/ secret 沒被加:git diff --cached --name-only | grep -iE '\.env|secret|token'應空)git commit -m "..."git push origin main- 理由:self-hosted 從
origin/maincodeload 抓 worker。沒先 push → 用戶抓到舊碼。
2. ✅ 跑出貨前檢查(會擋住「git 沒同步」)
bash scripts/check-release.sh→ 必須全綠(含「0. Git 同步」段)。- 紅燈「領先 origin/main N commit 未 push」= 回步驟 1。
- 此腳本 git 未同步會
exit 1,是 deploy 的前置閘。
3. 🚀 deploy(worker + CLI npm)
- Node ≥ 20(本機若預設舊版:
export PATH="$HOME/.nvm/versions/node/v22.21.0/bin:$PATH") bash scripts/local-deploy.sh --all(或不帶--all只 deploy diff)- 此腳本會先自動跑步驟 2 的 git 閘;未過直接拒絕 deploy(要強推設
SKIP_GIT_CHECK=true,自負風險)。 - worker 走
wrangler deploy;CLI 走npm publish(版本未 bump 會自動 patch +1 + 寫 CHANGELOG)。 - npm publish 需
npm login或.env的NPM_API_TOKEN(authToken)。
- 此腳本會先自動跑步驟 2 的 git 閘;未過直接拒絕 deploy(要強推設
4. 🔁 deploy 後線上驗證(確認新碼真的上去了)
curl https://cypher.arcrun.dev/health→ 200- 改了 cypher 路由時,實際打那條新路由確認存在(例:
curl -X POST https://cypher.arcrun.dev/init/seed、curl https://cypher.arcrun.dev/recipes應非空)。 ← 這步就是階段 6 的教訓:別只看「部署成功」,要打新端點確認。 - 改了 CLI:
npm view arcrun version==cli/package.jsonversion。 - landing 有改:確認 arcrun.dev 更新。
5. 📣 通知 / 收尾
- 若是回應壓測:到壓測報告加「開發者回覆」+ 請壓測者重跑。
一眼對照表:每個 target 怎麼推、誰依賴它
| Target | 推法 | 誰依賴「它在 origin/main」 |
|---|---|---|
| git origin/main | git push origin main |
self-hosted acr init codeload 抓這裡的 worker 源 → 必須最先 |
| CF workers(26 個含 mcp) | local-deploy.sh(wrangler deploy) |
平台 prod;self-hosted 自己 deploy |
CLI(npm arcrun) |
local-deploy.sh 第 6 段 / cd cli && npm publish |
用戶 npm i -g arcrun |
| landing(arcrun.dev) | cd landing && wrangler pages deploy |
訪客 |
常見漏失(自我檢查)
- ❌ 「我 deploy 了 prod cypher 但忘了 push main」→ self-hosted 用戶 init 抓舊碼。先 push 再 deploy。
- ❌ 「改了 CLI 但版本沒 bump」→ npm publish 跳過(同版)。
local-deploy.sh會自動 bump,但手動 publish 時要記得。 - ❌ 「改了 cypher 路由只看到『部署成功』就收工」→ 要實際 curl 新路由確認(步驟 4)。