Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 17, 2026
- messages 增加 generationOwner/generationHeartbeatAt lease; 生成启动 CAS 认领,心跳守望读回 stop/supersede 标志做跨实例中止 - 孤儿清扫改为心跳判定:活实例的生成不再被「本进程重启」误杀, 周期 sweeper 兜底属主崩溃的场景 - drain 状态机:内部 API(CRON_SECRET)关准入 + 有界排空; SIGTERM/SIGINT 走有界收尾 + 遥测 flush;新入口返回 CAPACITY_UNAVAILABLE - stop/edit/stream 支持 fly-replay 定向到属主实例; deploy-drain 取消映射为 DEPLOY_INTERRUPTED 可重试失败 - /healthz、/readyz(drain 中 503 摘除流量、DB 探测短缓存); proxy 对健康检查放行;instrumentation 启动环境白名单与信号钩子 - Dockerfile(standalone)+ fly.toml(autostop off、双实例、 readiness/liveness 分层、30s kill_timeout)+ drain/migrate 部署脚本 - 修复 GenerationOwnership beat 自停死锁;修复存量 e2e 测试 parts 命令格式与 document_revisions 清理顺序 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
范围
flyio-production-deploymentOpenSpec + 运行时契约实现:多实例 Generation lease、部署 drain、健康检查、部署文件与隔离环境验证。可复现构建、环境隔离、健康检查、共享状态和对象存储、部署前 drain、Generation lease/CAS 已落实到代码;区域/规格实测、备份恢复和旧镜像回滚的真实演练未完成。
重点:HTTP 连接空闲不等于后台 Generation 空闲;未验证前关闭可能误停工作实例的 autostop。平台终止窗口不够时不能只靠 signal handler 承诺任务完成。
实现内容(代码完成)
messages.generation_owner/generation_heartbeat_at,启动 CAS 认领、周期心跳;同一行stop_requested_at/superseded_at作跨实例控制通道。POST /api/internal/drain(CRON_SECRET,{waitMs, abort})关准入+排空;5 个生成入口 drain 中返回CAPACITY_UNAVAILABLE;SIGTERM/SIGINT 有界收尾(20s)+遥测 flush(5s)+退出;deploy-drain取消映射DEPLOY_INTERRUPTED。fly-replay: instance=<owner>;fallback=prefer_self;属主死亡→SESSION_LOST收敛。/healthz(liveness)、/readyz(readiness,drain 中 503 摘除流量,DB 探测短缓存+超时);proxy 放行。Dockerfile(standalone)、fly.toml(autostop off、min 2 实例、双检查分层、kill_timeout 30s)、scripts/fly-drain.mjs/fly-migrate.mjs、next.configdeploymentId=FLY_IMAGE_REF、环境白名单启动校验、runbookdocs/deploy-flyio.md。验证(隔离环境完成)
pnpm build(standalone 产物)通过e2e/runtime/drain-env.test.mjs:drain 状态机+环境白名单e2e/thread-chat/generation-ownership-db.test.mjs:隔离 PG 验证 claim CAS/心跳/停止标志/陈旧接管/终态不回写normalized-generation-db回归通过(含 sweep 新谓词适配)openspec validate flyio-production-deployment --strict通过fly-runtimeCI workflow(含 docker build)与db:test:push未完成(不得宣称已验收)
真实 Fly 部署、双实例生产流量、区域/内存/延迟实测、容量压测、RPO/RTO 批准、备份恢复与回滚演练、外部告警送达(依赖 #168)、真实 secrets 配置。tasks.md 仅勾选已验证项(1.2、3.4、4.1–4.3 未勾)。
依赖
根 PR,基于 main。运行时集成依赖 #164 预算、#166 准入、#167 搜索/cursor、#168 观测;最终在 08 发布门禁验收。migration 不在构建或实例启动时执行,由 develop 单一集成生成验证;测试库经
db:test:push同步。Generated with Devin