Repository navigation
docs: align lease recovery guidance with fenced takeover - #9518
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
恢复租约过期工作的 Agent 和操作者会读到这份参考文档。旧说明要求新租约只能收尾旧轮次,容易让本可接续的工作被重新派发;新说明引导同一 Agent 重新领取并重入原 guard,由当前资格决定是否继续。可观察的交付是参考说明与已合并实现一致,并保留当前验收和失败收尾路径。本次仅修正文档,不修改租约规则,也不新增 Codex App 后台续租。
改动思路 / Approach
直接修订原参考页,复用既有准入、验收和结算 owner,避免新增恢复命令或第二套流程。正常路径是重新领取、以原身份重入 guard、验证现有成果并按返回计划结算;竞争持有人仍可阻止领取,旧 proof 不能继续写入。相比保持原文,这消除了明确的行为矛盾;相比删除整段,保留具体限制更有操作价值。边界是解释已经交付的行为,不扩展任何执行授权。
具体改动 / Changes
关键内容讲解
精确 head 为 bcfe73defd4e71d73faf3deaf379fc47e8f091a1,完整差异只有 docs/reference/canonical-lease-renew.md,增加 29 行、删除 6 行。新段落明确 File/SQLite、同一 Agent、原 Goal/Agent/Todo/Turn、新 key 与递增 version/epoch,并链接实际规则和现有 CLI 测试;中英文说明共同保留当前验收、竞争保护及续租边界。
依据已合并的 #9488,规范引用为 https://github.com/loopx-project/loopx/pull/9488,版本 988a80c2b12835ddcfa404a242a27a9d958324a1。逐项核对:same-agent-local-authority 已对应现有 heartbeatLeaseTakeover 的 provider、owner、Todo 与代际检查;current-validation 已说明旧验收不继承,并由当前 validator 负例验证;once-only-settlement 对应原身份、追加式来源记录及重放只消费一次;renewal-boundary 明确可信 CLI Host 的续租与未接入的 Codex App 后台续租。四项在本次文档中均已落实,运行行为来自前述已合并实现。
对主干的风险 / Risks
主要风险是把接管写成无条件恢复,或者把延长默认租约误解为持续自动续租。当前正文要求 guard 核验并遵循返回计划,明确跨 Agent、远端 provider 不在范围内;未获准时走失权收尾,未改写历史回执或绕过验收。现有 File/SQLite CLI 六项测试 PASS,覆盖旧 proof 拒绝、当前 validator 拒绝、进度/完成接管和重复结算。标准 premerge 的直接检查、catalog、风险 smoke 与公开边界检查均 PASS;新增相对链接及 Host 文档锚点检查 PASS。按照仓库策略,远端 CI 不作为同步门禁,未宣称远端全绿。测试使用隔离本机状态,不能证明跨 Agent、远端 provider 或 App 后台续租,这些已明确排除。
我的整体评价 / Verdict
没有发现阻塞问题。该文档修正完成了自身目标:长期续接语义保持既有实现,操作说明改善了过期后恢复路径的准确性,不要求用户增加确认或重新派工。仅保留一份既有参考说明及必要中英文解释,无新状态、兼容分支或运行机制。渲染视觉评审不适用:本次只修订参考 Markdown 正文,未改变 App、首屏或布局;未验证范围为读者理解率和模型行为收益,不能由文字修正推定。本次采用作者账户 COMMENTED 结论,实际合并仍需精确 head 的独立就绪检查和已有授权。
English verdict: APPROVE — bcfe73d aligns the reference with existing fenced takeover; six CLI tests and local premerge checks passed, with no runtime change.
The canonical lease reference still says a fresh lease can only close an expired Turn. That contradicts the merged same-Agent takeover path and can make operators abandon recoverable work.
Describe the existing File/SQLite recovery conditions, original-Turn lineage, current acceptance checks and competing-holder protection. Link the owning implementation and CLI regression tests, and distinguish takeover from the leased CLI supervisor's renewal and Codex App's unsupported background renewal. This changes one reference page; it does not alter runtime behavior or authority.
Validation: six existing File/SQLite takeover tests passed, including stale-proof rejection, current-validator rejection and once-only settlement. New relative links, the Host supervisor anchor, public-boundary scan and diff hygiene passed. Remote CI is not used as a synchronous gate.