This repository was archived by the owner on Aug 5, 2026. It is now read-only.
fix(deploy): bound main cutover sessions - #72
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
需求与摘要
修复 main deploy run 29499059767 attempt 2 在全部 OSS/CDN preflight 通过后,于 wallet-key 360 秒 drain 的静默窗口失去 SSH 进展、最终撞上 25 分钟 job timeout 的问题。N/A issue。
本 PR 同时收口链路存活、远端孤儿进程、并发发布、超时预算和不确定 cleanup 五个边界:
产品行为与不变量
影响矩阵
contract/openapi.yaml与 Web 生成类型仅影响 main-staging GitHub Actions、版本化 deploy script、对应测试和运维 runbook。没有依赖、API、schema、业务逻辑或 provider credential 变化;wallet 安全窗口仅增加链路可观测性,时长与 fail-closed 条件不变。
文档影响
更新
docs/operations/deployment-and-previews.md:记录 SSH keepalive、heartbeat、双层 deadline、远端锁、信号恢复和 mount-aware cleanup。验证
python3 scripts/check_docs.py— passedpython3 -m unittest discover -s ops/deploy/tests -v: 37 passed;backend Rust 未变化其他实际检查:
shellcheck ops/deploy/deploy-main.sh— passedbash -n ops/deploy/deploy-main.sh— passedgit diff --check— passedMigration、部署与回滚
本 PR 不新增或修改 migration。合并会生成新的 main SHA 并触发包含修复的新 deploy;不要 rerun 旧 run,因为 rerun 仍使用旧 workflow。
合并/新 run 前需只读确认服务器没有旧
deploy-main/verify-oss进程,核对main-berevision/Cmd、rollback containers、0067 marker 权限与内容,以及 migrations 67–69/active-key invariant。若 marker 有效,移除旧 efba288 approval;若 marker 缺失,则把 approval 更新为本 PR 合并后的精确 main SHA,让新脚本重新完成 drain/verify 并原子写 marker,禁止手写 marker。Preview 与证据
公网
/、/api/v2/health、/api/v2/ready在失败后均返回 200;新 selection route 也存在,说明远端很可能继续启动了新版 backend,但公网探针不能证明 marker、精确 revision 或 migration ledger,因此不把它当作 cutover 完成证据。本改动只触及 main deploy workflow/script,不触发 PR runtime preview;验证证据由上述部署测试与 workflow 静态边界测试提供。
已知限制与 Review 重点