Skip to content

RFC: define complete state recovery and controlled reactivation - #5944

Merged
huangruiteng merged 9 commits into
loopx-project:mainfrom
Duang777:codex/full-state-recovery-rfc-20261008
Oct 8, 2026
Merged

huangruiteng merged 9 commits into
loopx-project:mainfrom
Duang777:codex/full-state-recovery-rfc-20261008

Conversation

@Duang777

@Duang777 Duang777 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Issue [RFC]: Define complete state recovery and controlled reactivation #5940 and the source audit at upstream/main@82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc.
  • Goal/source and gap: backup-state creates a mixed-owner physical archive, but the repository had no contract for inert verification, owner reconciliation, writer fencing, or controlled reactivation.
  • Observable before → after, with the validation row that proves it: the repository now has bilingual semantic-mirror RFCs defining the recovery unit, consistency profiles, owner boundaries, effect reconciliation, fencing, rollback limits, and a read-only M1 audit; docs governance and exact-base premerge validation pass.
  • Issue/task and intended base: Closes [RFC]: Define complete state recovery and controlled reactivation #5940. Base: main; implementation audit baseline: 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc.

Author Declaration

  • Written by: OpenAI Codex model agent.

Implemented against

  • Specification and revision: Issue #5940, audited against 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Recovery unit, owner/cursor/incarnation manifest implemented docs/architecture/rfcs/complete-state-recovery-v0.md §5 examples/docs-governance-smoke.py
Online, quiescent, crash-consistent capture implemented RFC §5, Capture consistency profiles bilingual structure and manual semantic review
Inert restore and no activation implemented RFC §§1, 5, 11 M1 exact-base premerge gate
Owner-ordered reconciliation, effects, fencing, partial failure and rollback implemented RFC §§5, 8, 9 issue-to-RFC criterion review
Platform/filesystem qualification implemented RFC §§7, 9, 12 docs governance and public-boundary checks
Runtime implementation deferred RFC §11 M1–M5 explicitly outside the RFC PR
  • Self-check before submission: Read the current backup producer, CLI, tests, configuration recovery contract, related Goal/authority/effect RFCs, both final language mirrors, generated indexes, and the staged diff. Runtime activation and provider qualification were deliberately left out.

Scope And Continuation

  • Completed scope and remaining work: Completes the design request in [RFC]: Define complete state recovery and controlled reactivation #5940. No runtime behavior changes. M1 read-only verify/audit through M5 operational qualification remain implementation milestones.
  • Slice boundary / successor: M1 is the next independently reviewable slice: v0 archive verification and safe extraction to a new inert workspace with execution_authority_granted=false.

Validation

  • Tested revision: 4d98703445fb64e413f2cfb274617fc932b851cf
  • Run state: finished
  • Input classes: none
Check kind Result Public-safe evidence / limitation
static passed .venv/bin/python examples/docs-governance-smoke.py
static passed .venv/bin/python scripts/generate_rfc_status_index.py --check
static passed examples/semantic-vocabulary-drift-smoke.py; 26/26 registered vocabularies covered
integration passed loopx canary premerge --from-git-diff --git-diff-base 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc; 18/18 selected checks, 7 changed docs, no manual holds
static passed Targeted repository public/private boundary validation
static failed Full repository-hygiene-smoke.py reports the pre-existing release timeline lacks v1.3.1; the targeted public/private subcheck passes and this PR does not touch release files
  • Coverage and gaps: The checks cover RFC headers, bilingual lifecycle parity, indexes, project docs, vocabulary drift, diff hygiene, and public/private safety. This documentation-only PR does not exercise restore runtime behavior; each provider and platform remains unqualified until its RFC milestone evidence exists.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A; no product or documentation chrome changed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: S2 typed kernel and durable authority; S10 reliability, diagnostics and operations.

Shared-authority RFC fixture impact

N/A. This RFC composes the existing shared-authority owner but makes no migration, promotion, runtime-routing, or fixture change.

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

Signed-off-by: Duang777 <duangjl007@gmail.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

动机

需要从完整 LoopX 备份恢复工作的维护者和后续实现者。 原来:备份能保留文件和 SQLite 字节,但没有统一契约说明恢复后哪些状态仍只是历史、哪些必须重新绑定,以及未知外部操作能否重放。现在:本 RFC 定义先验证并恢复到惰性目录,再由原 owner 按依赖顺序核验和重新准入,避免把可读的归档误当成可执行系统。

本 head 交付中英文一致的恢复设计、验收矩阵与 M1–M5 顺序;目录和总纲明确只有设计交付,尚未实现完整状态验证或重新激活。 本 PR 不新增 verify/恢复命令,不恢复活跃 runtime,不转移凭据、不重放外部 effect,也不更改 provider 或任何默认值。

改动思路

先把备份视为不可变验证单元,再按 owner 定义更小的 adoption 单元和必要依赖闭包。协调器只拥有 digest-bound 计划、inventory、自己的阶段记录和原 owner receipt;Goal、provider、session、lease、quota、scheduler、effect 和 delivery 继续由原 owner 决策。比原始提取或单体恢复事务更合适,因为这些 owner 和外部系统没有共同原子提交。

独立依据是 Issue #5940,spec_revision 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc 的来源审计基线,及该基线的 docs/reference/configuration-backup.md、Goal/provider/effect 契约。完整原 issue 和评论在 diff 前读取;本 PR 新 RFC 不是先前已接受的验收依据。逐项对应:recovery-unit(恢复集/owner单位与manifest)、capture-profiles(在线/静止/崩溃一致性)、inert-restore(必先惰性恢复)、owner-order(引用与执行/效果依赖顺序)、provider-rebinding(凭据及未知结果)、activation-fencing(旧writer排除)、partial-outcomes(重试/回滚/原receipt)、platform-qualification(平台边界)。这八项都在中英文规范中具备具体规则与未来验收,不等于 runtime 已实现。

具体改动

精确 head 4d98703445fb64e413f2cfb274617fc932b851cf,实际共同基线 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc;全7文件 +1215/-5。

新增 complete-state-recovery-v0.md 633行及 .zh-CN.md 565行,两者完整阅读并核验语义镜像:§1–4 明确当前 backup-state 只有 plan/create、SQLite局部snapshot/其他文件best-effort,字节完整性、privacy与authority分别判断;§5 定义组件owner/revision/cursor/digest/dependency、三种capture profile、受限验证提取、逐owner reconcile与原operation效果判定;§6拒绝原始提取、全局恢复事务和一次性全局enable。

§7–10要求惰性、不加载恢复代码/凭据、路径/链接/大小写Unicode冲突与膨胀限制、原receipt保留、未知效果hold、live新工作后的fenced forward recovery、平台/容量/运行诊断资格。§11明确M1只verify/audit,M2capture,M3首次完整local恢复,M4provider,M5产品与运行资格;§12把limit、continuity、encryption和Windows选择放在各自实现门前。附录记录审计与未实现边界,不作为运行收据。

README.md在现有kernel/state小节增加设计入口;生成的双语STATUS计数43;双语overall roadmap在S2/S10增加同一设计边界和M1下一切片,没有声称主干已有恢复能力。新状态/schema是未来恢复领域设计,不改现有machine vocabulary或自动加载agent prompt。

对主干的风险

最强风险是未来实现误把完整归档可读、旧lease/session、provider identity或effect journal当成当前权限。RFC逐项要求原owner准入、轮换/fence、未知外部结果阻断,且 recovery receipt 始终 execution_authority_granted=false;正常grant由原执行owner另外发出。当前PR只改文档,既有backup CLI/source/test已独立审计;现有5项真实backup/SQLite测试通过,只用于确认当前事实。

文档治理、RFC状态索引检查通过;原生premerge的3项直接和18项选定检查通过、无manual hold,七文档定向public/private检查通过。未查询、轮询或等待CI。

作者披露的完整repository hygiene失败也独立对照了相同命令:不可变base与精确head都在 validate_release_timeline 报 release timeline is missing version entries: v1.3.1。本diff没有改变release timeline、version、validator或相关生成路径;受影响的文档/索引/边界另有通过证据。因此它是保留的基线质量失败,不能要求这个RFC改无关release文件,也不能称完整hygiene通过。

未来恶意归档、crash/unknown effect、真实旧writer拒绝、M1–M5及packaged frontend/Lark均未验证;容量与schema要在M1前冻结。不是把未来验收列出来就当作业务验收完成。

我的整体评价

APPROVE,无阻塞设计发现:它完成#5940请求的设计切片,保留既有owner与默认行为,不交付或启用恢复runtime。后续依赖已在M1–M5中有明确owner、进入门和独立证据,设计PR不需要等待全部恢复实现才能有用。

有限未来重构检查落在同一恢复owner:M1实现时应把内部phase与operator状态做明确typed映射,避免两套持久化决策源;现阶段无实现可删除,也不据此建立重复框架或新的跟踪任务。完整repository hygiene的基线失败继续可见,未豁免;本结论不授予live restore、凭据采用或合并权限。

English verdict: APPROVE - 4d98703; the bilingual owner-composed recovery RFC satisfies issue5940's design criteria and explicitly leaves runtime verification/reactivation unimplemented. Docs/index checks,3 direct/18 selected premerge checks and5 existing backup tests passed. Full repository hygiene reproduces the same unrelated missing-v1.3.1 release-timeline failure at base and head; no live recovery/provider/platform qualification is claimed.

Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
loopx-agent
loopx-agent previously approved these changes Oct 8, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

动机

需要从完整 LoopX 备份恢复工作的维护者和后续实现者。 原来:备份能保留文件和 SQLite 字节,但没有统一契约说明恢复后哪些状态仍只是历史、哪些必须重新绑定,以及未知外部操作能否重放。现在:本 RFC 定义先验证并恢复到惰性目录,再由原 owner 按依赖顺序核验和重新准入,避免把可读的归档误当成可执行系统。

本 head 交付中英文一致的恢复设计、验收矩阵与 M1–M5 顺序;目录和总纲明确只有设计交付,尚未实现完整状态验证或重新激活。 本 PR 不新增 verify/恢复命令,不恢复活跃 runtime,不转移凭据、不重放外部 effect,也不更改 provider 或任何默认值。

改动思路

先把备份视为不可变验证单元,再按 owner 定义更小的 adoption 单元和必要依赖闭包。协调器只拥有 digest-bound 计划、inventory、自己的阶段记录和原 owner receipt;Goal、provider、session、lease、quota、scheduler、effect 和 delivery 继续由原 owner 决策。比原始提取或单体恢复事务更合适,因为这些 owner 和外部系统没有共同原子提交。

独立依据是 Issue #5940,spec_revision 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc 的来源审计基线,及该基线的 docs/reference/configuration-backup.md、Goal/provider/effect 契约。完整原 issue 和评论本轮在 diff 前重新读取;本 PR 新 RFC 不是先前已接受的验收依据。逐项对应:recovery-unit(恢复集/owner单位与manifest)、capture-profiles(在线/静止/崩溃一致性)、inert-restore(必先惰性恢复)、owner-order(引用与执行/效果依赖顺序)、provider-rebinding(凭据及未知结果)、activation-fencing(旧writer排除)、partial-outcomes(重试/回滚/原receipt)、platform-qualification(平台边界)。这八项都在中英文规范中具备具体规则与未来验收,不等于 runtime 已实现。

具体改动

精确 head 1741770661c990eab7d74814fd85ee2246910182,实际共同基线 a1890a37f4f759bc2e39823074bbe78f78e49fdb;全7文件 +1215/-5。

前次评审正文绑定 4d98703445fb64e413f2cfb274617fc932b851cf;虽然远端 review 仍显示 APPROVED,不能把旧正文当成本 head 的评审证据。本轮全部七个改动文件的blob与旧版一致,主干同步没有修改它们;实际base改为 a1890a37f4f759bc2e39823074bbe78f78e49fdb,本轮独立重跑对应检查。来源audit基线 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc 继续作为Issue依据,不与当前运行基线混淆。

新增 complete-state-recovery-v0.md 633行及 .zh-CN.md 565行,原版两者完整阅读并核验语义镜像;本次七文件逐blob确认与旧版一致,并重新检查当前source依赖:§1–4 明确当前 backup-state 只有 plan/create、SQLite局部snapshot/其他文件best-effort,字节完整性、privacy与authority分别判断;§5 定义组件owner/revision/cursor/digest/dependency、三种capture profile、受限验证提取、逐owner reconcile与原operation效果判定;§6拒绝原始提取、全局恢复事务和一次性全局enable。

§7–10要求惰性、不加载恢复代码/凭据、路径/链接/大小写Unicode冲突与膨胀限制、原receipt保留、未知效果hold、live新工作后的fenced forward recovery、平台/容量/运行诊断资格。§11明确M1只verify/audit,M2capture,M3首次完整local恢复,M4provider,M5产品与运行资格;§12把limit、continuity、encryption和Windows选择放在各自实现门前。附录记录审计与未实现边界,不作为运行收据。

README.md在现有kernel/state小节增加设计入口;生成的双语STATUS计数43;双语overall roadmap在S2/S10增加同一设计边界和M1下一切片,没有声称主干已有恢复能力。依赖失效检查发现 shared-authority lane L 已更新 File checkpoint/delta 及 SQLite覆盖索引的当前进展;我完整阅读该差异,它仍明确不构成cross-provider recovery或NoKV资格,没有消除完整归档恢复缺口。其余审计producer/CLI/tests/configuration/Goal/recovery/effect契约逐blob一致。新状态/schema是未来恢复领域设计,不改现有machine vocabulary或自动加载agent prompt。

对主干的风险

最强风险是未来实现误把完整归档可读、旧lease/session、provider identity或effect journal当成当前权限。RFC逐项要求原owner准入、轮换/fence、未知外部结果阻断,且 recovery receipt 始终 execution_authority_granted=false;正常grant由原执行owner另外发出。当前PR只改文档,既有backup CLI/source/test已独立审计;当前实际基线和候选各5项真实backup/SQLite测试通过,只用于确认当前事实。

当前精确head文档治理、RFC状态索引检查重新通过;原生premerge的3项直接和18项选定检查通过、无manual hold,七文档定向public/private检查通过。未查询、轮询或等待CI。

作者披露的完整repository hygiene失败也独立对照了相同命令:不可变base与精确head都在 validate_release_timeline 报 release timeline is missing version entries: v1.3.1。本diff没有改变release timeline、version、validator或相关生成路径;受影响的文档/索引/边界另有通过证据。因此它是保留的基线质量失败,不能要求这个RFC改无关release文件,也不能称完整hygiene通过。

未来恶意归档、crash/unknown effect、真实旧writer拒绝、M1–M5及packaged frontend/Lark均未验证;容量与schema要在M1前冻结。不是把未来验收列出来就当作业务验收完成。

我的整体评价

APPROVE,goal_achieved(仅Issue的设计切片),long_horizon preserved、user_experience not_applicable:没有新增交互或活跃状态变化,无阻塞设计发现:它完成#5940请求的设计切片,保留既有owner与默认行为,不交付或启用恢复runtime。后续依赖已在M1–M5中有明确owner、进入门和独立证据,设计PR不需要等待全部恢复实现才能有用。

有限未来重构检查落在同一恢复owner:M1实现时应把内部phase与operator状态做明确typed映射,避免两套持久化决策源;现阶段无实现可删除,也不据此建立重复框架或新的跟踪任务。完整repository hygiene的基线失败继续可见,未豁免;本结论不授予live restore、凭据采用或合并权限。

English verdict: APPROVE - 1741770; the bilingual owner-composed recovery RFC satisfies issue5940's design criteria and explicitly leaves runtime verification/reactivation unimplemented. Docs/index checks,3 direct/18 selected premerge checks and5 existing backup tests passed. Full repository hygiene reproduces the same unrelated missing-v1.3.1 release-timeline failure at base and head; no live recovery/provider/platform qualification is claimed.

Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

请求修改三项设计内容:R1 明确首个用户承诺及范围;R2 将最小产品路径绑定到 M1/M3;R3 把恢复后的有效成果和重构收益纳入验收。现有隔离恢复、旧 writer 排除和防重复效果规则应保留。

动机

需要在本地故障或升级后找回工作并继续执行的 LoopX 用户,以及维护恢复能力的开发者。
当前备份保留文件和数据库,但用户尚不能通过完整恢复路径找回成果、确认进度并继续工作;拟议设计以隔离检查和逐模块重新准入保护后续工作。
本 PR 已交付双语恢复设计和路线入口;用户可操作的完整恢复仍是后续目标。
本轮要求修改 RFC 的产品承诺、首个切片和验收顺序;恢复运行时、跨机器迁移及凭据转移不在本 PR 的交付范围。
剩余缺口是首个受支持场景、M1 的可读审计与下一步、M3 的打包操作路径,以及恢复后继续产出成果的验收。

例如,外部操作已经成功而本地尚未记下结果时发生故障,直接恢复并重跑可能重复操作;旧进程与恢复后的新进程同时写入也可能破坏工作。这个动机成立。原 issue 主要依据源码审计,没有给出事故频率、损失规模或恢复时限;因此需要用一个具名用户任务确定首个实现范围,避免让全面恢复建设挤占当前 App 交办、纠偏、接续和成果返回的关键路径。

改动思路

保留先验证到隔离目录、再通过各模块原有接口重新准入的方案。恢复协调器记录计划、依赖及回执;Goal、存储、会话、租约、预算和外部操作继续由原有模块决定。必要状态有歧义时阻断执行,界面应显示原因、处理人及继续条件。恢复回执不铸造执行权限,正常执行仍由原准入接口授权。

建议先证明一种本地环境下一个 Goal 的恢复,说明成果、进度和验收来源如何找回,未完成工作如何重新准入。其它 provider、跨机器与全平台资格保留后续独立验收。已有 owner-defined adoption unit 支持这个范围;无需另建恢复规则引擎,也无需在本 PR 全量迁移 TS。

具体改动

审阅 head:f4c21235dfa6695a7592c8023c9a150268e28f48;本轮共同基线:05af21dd4cbc8256af1da9746a34abc13085cfd3。完整 diff 为七个文档,+1215/-5;没有生产代码、测试或安装行为修改。

设计依据:Issue #5940,其源码审计基线 / spec_revision 为 82d1b837479dd5eb64b581bb0ca36d8c1ff1f0cc。原 issue 没有条款编号,以下是审查映射标签:recovery-unit、capture-profiles、inert-restore、owner-order、provider-rebinding、activation-fencing、partial-outcomes、platform-qualification 八项均已在 RFC 设计中覆盖;运行时实现明确 deferred 到 M1–M5。本次要求是补齐产品导向的设计修订,不把原 issue 的技术范围说成未完成。

同时对照基线 05af21dd4cbc8256af1da9746a34abc13085cfd3 的整体 roadmap:第 1 节以已验收成果、人的注意力成本和恢复能力衡量产品成效;App 持续工作对话优先;S2 按真实事务迁移及删除重复 owner;S10 要求恢复演练和实测运行指标。

关键内容讲解

  • 双语新 RFC §1–4 说明现有完整备份只有创建、组件局部快照与配置隔离恢复,未把完整备份描述成可运行系统。
  • §5–10 定义验证、安全提取、依赖核验、逐模块 adoption、旧执行资格失效、原操作结果对账及回滚限制。v0 缺少来源修订时如实报告不确定性;此处安全边界应保留。
  • §11–12 定义 M1 审计、M2 捕获、M3 本地恢复、M4 provider 与 M5 产品运行资格;问题在首个产品目标和旅程覆盖的阶段安排。
  • RFC README 增加设计入口;双语 STATUS 将 accepted inventory 从 42 更新到 43;双语 roadmap 增加 S2/S10 路由和 M1 边界。索引明确只有设计交付。正文修改后请同步中英文、索引及 roadmap 的下一切片描述。

对主干的风险

R1 [P1] 明确首个用户承诺、范围和优先级

位置:双语 RFC §1–3、§11,中文第 23–42、499–503 行。当前开头和阶段出口主要围绕组件与权限正确性,首个具体用户任务、能找回的成果与进度、允许丢失的工作及人工动作没有统一成一个有界产品承诺。这会让实现者分别完成字段和协议,却无法判断下一步是否已帮助用户继续工作。

请在技术决策前补一段产品承诺,选择一个本地 Goal、具名存储/执行环境与恢复场景,并说明日常重启接续和备份灾难恢复各归现有哪个 owner;更广 provider/profile/platform 保留后续独立资格。恢复时限、允许损失和样本工作量可以标为待实测目标,在演练前冻结;不要编造当前性能或为了此设计 PR要求现场恢复已经通过。

R2 [P1] 将最小可操作旅程前移到 M1/M3

位置:双语 RFC §5 v0 audit、§9 产品旅程行、§11;中文第 219–233、458、499–503 行。M1 的退出证据只有 CLI/隔离审计,打包前端集中列在 M5。M3 已要求原入口结果,这是好的,但没有将本地打包操作路径明确绑定到该切片。用户可能只得到技术 finding,仍不知道能找回什么、如何处理阻塞或继续。

请为 M1 定义沿现有设置/能力中心入口可读取的审计:已找回资产、仅历史可读内容、无法判断或恢复的部分,以及处理人和唯一下一步;字节验证通过不能展示成可以执行。为 M3 绑定同一受支持环境下选择备份、影响预览、必要确认、阻塞处理、恢复/重试及结果读回的打包旅程。M5 保留更广传输、平台、留存与运行资格。这是本次交付计划修订,前端实现随对应里程碑完成。

R3 [P1] 用恢复后的成果与维护成本验收首个切片

位置:双语 RFC §9–11;中文第 458、491–503 行。已有旧 writer、未知外部结果、局部失败及新工作测试很有价值,应继续保留;当前指标没有把第一条用户路径中的成果保留、恢复后有效交付和人工介入成本绑定为共同出口。

请规定后续 M3 在隔离真实存储和执行环境中的一条演练:先完成部分工作并留下未完成任务,在关键提交点故障,恢复后由原 owner 重新准入,继续产出可独立验收的结果并回到受支持入口。记录找回/丢失的工作、恢复耗时、人工介入和重复受保护操作;重复操作必须为零,其它目标在测前冻结。恢复中再次失败或结果未知时,应能明确等待、处理和继续条件。

同时在该切片标明复用的 TS decision owner、仍需保留的兼容 reader、可删除的重复规则及真实消费者。重构收益用重复判断减少、调用/定位/验证成本和行为保持证据说明,避免以新增枚举、RPC 或文件数计进展。这不是要求当前文档 PR 删除尚不存在的实现。

验证:本轮精确 head 的 docs-governance、RFC 状态索引检查、semantic-vocabulary-drift、git diff --check 均通过;现有 tests/test_state_backup.py 为 5 passed,只确认当前备份事实。语义扫描第一次因新验证工作区缺 TypeScript dev dependency 失败,准备依赖后复跑通过。七个候选文档的凭据、内部链接和本地绝对路径定向扫描无命中。

当前可见 CI:Summary 成功,Sign-off、dependency-review、build 排队;未以排队状态提出 blocker。作者披露的完整 repository-hygiene 历史失败本轮未复跑,不作为本轮请求修改的依据。完整恢复、真实旧 writer/外部效果恢复、打包恢复旅程及 RPO/RTO 未实测,均属于后续实现验收。

评审 lenses:diff 没有可执行修改,现有默认与 feature-off 路径保持相同;未发现通过恢复名称扩大 actor 权限。新 phase/audit 名称属于未来恢复领域的具名契约,实际实现应由既有 typed owner 承载并做明确映射。规范性的 required-owner 阻断是强制义务,不能改称 guidance。通用协调规则保持 domain-neutral;本轮没有新增字符串 denylist 或第二个决策源。

我的整体评价

REQUEST_CHANGES。原 issue 的设计切片是 justified_increment:恢复安全边界清楚且有独立价值;long_horizon 在设计上 preserved,防旧写入和重复效果的规则应保留。user_experience 的设计闭环为 not_yet_proven:首个有界产品承诺及 M1/M3 的操作/成果出口尚需明确。

本轮三个 blocker 都是当前 RFC 的设计修改,不以尚未实现完整 runtime 本身拒绝文档 PR。有限未来重构检查已落在恢复协调与既有 owner 的边界:复用明确,没有当前生产实现需要删除;后续切片应以真实调用者推动收敛,不增加平行框架。请同步修订两种语言和路线入口;复审检查产品承诺、阶段归属、恢复后成果与成本验收是否一致,再跑相同文档检查。

English verdict: REQUEST_CHANGES - f4c2123; retain the inert-first, owner-composed safety contract, but define one bounded user recovery outcome, attach the minimum usable journey to M1/M3, and require outcome/attention-cost and typed-owner reuse evidence in the first local recovery drill. This requests RFC revisions, not runtime delivery in this PR. Docs/index/vocabulary/diff checks and five existing backup tests passed; full recovery remains untested.

Comment thread docs/architecture/rfcs/complete-state-recovery-v0.zh-CN.md
Comment thread docs/architecture/rfcs/complete-state-recovery-v0.zh-CN.md Outdated
Comment thread docs/architecture/rfcs/complete-state-recovery-v0.zh-CN.md Outdated
Signed-off-by: Duang777 <duangjl007@gmail.com>
…covery-rfc-20261008

Signed-off-by: Duang777 <duangjl007@gmail.com>
@Duang777

Duang777 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

Addressed all three P1 blockers in exact head 774551d96 (design revision commit dd571bb26; then merged current upstream/main@2438ffa04 without conflicts or RFC-content changes).

  • R1, bounded first promise: RFC §1 now names one local Goal in a packaged local POSIX environment with File/SQLite authority, defines recovered/readable versus lost or unknown work, lists required human actions, separates ordinary session/execution continuation from backup disaster recovery, and requires RPO/RTO targets to be frozen before the M3 drill. §3 keeps multi-Goal, service-provider, cross-machine, and unattended profiles outside the first qualification.
  • R2, usable M1/M3 journey: M1 now exposes the inert audit through the existing Settings/Capability Center entry with recovered/readable, historical-only, and unknown/unrecoverable categories, the responsible owner, and exactly one next action; byte verification remains non-executable. M3 now binds backup selection, impact preview, confirmation, hold handling/retry, original-owner admission, unfinished-work continuation, and result readback at the original entry. M5 is limited to broader transport/platform/retention/operating qualification. Both roadmap mirrors carry the same M1/M3 route.
  • R3, outcome and maintenance evidence: The M3 drill now starts with completed plus unfinished work, injects failures at critical owner commit points, requires original-owner readmission and a separately accepted follow-up result, records recovered/lost work, elapsed time, human interventions and hold continuation conditions, and requires zero protected duplicate operations. A decision-owner matrix names the reused TypeScript owner/API, compatible reader, removable duplicate rules/callers, and real CLI/product consumer; progress is measured by fewer repeated decisions, lower caller-location/verification cost, and behavior-preservation evidence rather than enum/RPC/file counts.

The existing inert-first, old-writer fencing, and unknown-effect/no-blind-replay rules are unchanged.

Exact-head validation after the latest main sync:

  • examples/docs-governance-smoke.py: passed
  • examples/semantic-vocabulary-drift-smoke.py: passed
  • tests/architecture/test_rfc_status_index.py: 13 passed
  • tests/test_state_backup.py tests/test_configuration_backup.py: 13 passed
  • git diff upstream/main --check: passed; no uv.lock change

A broader architecture run at the same design revision completed 1409 tests and retained the known main-baseline allowlist failure in test_source_session_registry_denial.py; this PR changes neither that decision owner nor its test. Please re-review exact head 774551d96.

@Duang777
Duang777 requested a review from huangruiteng October 8, 2026 09:25
…covery-rfc-20261008

Signed-off-by: Duang777 <duangjl007@gmail.com>
…covery-rfc-20261008

Signed-off-by: Duang777 <duangjl007@gmail.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=xhigh

English verdict: APPROVE — 774551d963d6c79232948386c4aed0048a70ae63. R1/R2/R3 are satisfied as design requirements in both mirrors; original eight recovery clauses remain intact. This accepts a design prerequisite only, not implemented recovery, activation or measured efficiency. Current local governance, semantic, index and backup/configuration checks passed; CI not consulted.

动机

本地 Goal 的工作区损坏或丢失后,需要找回进度并继续未完成任务的用户。
以前拿到可读备份仍不知道哪些工作丢失、谁负责恢复;本设计要求 M1 在既有设置入口解释找回、历史与未知资产,M3 经原 owner 准入后继续任务并回读独立验收结果。
当前七文件只交付双语设计和索引,已补齐 R1/R2/R3 的可验收承诺;尚未实现任何恢复或重新激活。
本 PR 不授权真实恢复、凭据迁移、自动激活、provider 晋升或默认值变化,也不验收多 Goal、跨机器和长期模型净收益。
M1 的 packaged 只读审计、M3 的真实隔离恢复旅程及故障演练仍待实现;容量和 RPO/RTO 目标须在对应演练前冻结。

改动思路

按 维护者的 R1/R2/R3 评审 与 原问题八项要求 判断设计,未把 PR 自己的 RFC 当成已通过的运行验收。既有 总纲 S2/S10/S5 要求有用恢复、可解释阻塞和真实验证成本。

恢复集只绑定归档与 owner 证据;协调器记录 inventory、phase 和 receipt,各原 owner 保留身份、准入、额度、effect 与投递决策。M1 先把可读/历史/未知状态带到既有 Settings/Capability Center;M3 才完成同类 POSIX/File/SQLite packaged 环境里一个 Goal 的恢复与继续,M5 扩展平台和运维资格。这个设计切片有独立用途且可撤销,不需要先实现所有 provider,也不能用它宣称灾备已可用。

具体改动

全量七文件 +1349/-5:新增完整中英文 RFC;README 增加发现入口;两个生成索引由42至43;两份总纲同步范围基线与 S2/S10 下一切片。源码、默认行为和 live state 未改变。既有旧评审 head f4c2123 的三索引文件 blob 相同;其余四份 RFC/总纲已全部重新读取;不继承旧批准。

  • R1 implemented(设计):§1/3 明确一台合格 POSIX host、一个 local Goal、File/SQLite、已持有 backup/manifest;已找回、丢失及未知工作如实表达。普通 session 接续仍归原 owner,RPO/RTO 在演练前冻结。
  • R2 implemented(设计):§5/9/10/11 要求 M1 的产品只读资产分类和 owner/唯一 next action;M3 从选择备份、影响预览、确认、hold/retry、原 owner 准入,到未完成工作产出独立验收结果并回原入口读回;没有把产品旅程推给 M5。
  • R3 implemented(设计):§5/9/11 要求真实隔离环境关键提交点故障演练;记录 recovered/lost work、耗时、人工介入、可见 hold 和零受保护重复操作;TS decision-owner/API、兼容 reader、可删除重复规则与真实 CLI/product consumer 矩阵,进展以重复决策和定位/验证成本衡量。
  • 原八项 recovery-unit / capture-profiles / inert-restore / owner-order / provider-rebinding / activation-fencing / partial-outcomes / platform-qualification 均 implemented(设计):§1–12 保留不可变验证单元、实际捕获保证、惰性提取、依赖顺序、历史身份、原操作 reconcile 和单独平台资格。各 runtime milestone 均 deferred,不能把设计映射写成实际完成。

正向设计 walkthrough:部分工作完成→备份→来源不可用→M1 只读审计→M3 预览/必要确认/处理 hold→各原 owner 准入→继续未完成任务→独立结果读回。反向:有效 checksum + 同 alias 新 lifetime + 已复制 active lease + 未知外部 effect,只能保持历史/held;不能写 successor、自动启 timer 或换新 operation 重发。

对主干的风险

没有剩余 R1/R2/R3 设计阻塞。现有 backup-state CLI 只有 plan/create;源码基线82d1的 SQLite snapshot、WAL 排除和配置 isolated restore 支持文中的当前系统陈述,而没有提供完整恢复。当前 exact head 的 docs-governance、semantic-vocabulary、RFC index 与 state/configuration backup 测试及 diff check 已独立运行,其中 index/state/configuration backup 共26项通过;这些检查不证明 M1 UI、M3故障恢复或真实长期效率。未获取/等待 CI,未恢复 active Goal、运行模型、改变 timer 或授予数据库权限。

新 vocabulary 属于待实现的 recovery workflow,不是当前 peer 或 execution grant;execution_authority_granted=false 在 recovery receipt 始终成立,正常 grant 只能从原 executor admission owner 获取。v0 缺 revision/profile 的 legacy_manifest_incomplete、unknown effect hold、原始 receipt 不改写及有新写入后禁止字节回滚都保留。建议实现时把 §7 “不执行 network call、offline owner-local verification” 写成无歧义的纯离线要求;当前不因此要求增加运行接口。

我的整体评价

APPROVE,problem_context 为 justified_increment:这次完成的是可执行的设计验收约束。长程效果与体验的正向依据是 M3 必须恢复到新的独立结果,而非止于数据库可读;效率方向的依据是减少逐 owner 猜测和重复决策,同时预先冻结人工/恢复成本指标。没有实测灾备或长期成本,不能断言已获得净收益。

有界未来重构判断已落实到同一设计边界:保留既有 TS decision owner、删被替代的重复规则/caller、保留有证据的历史 reader;没有新增泛化框架。保留维护者现有 REQUEST_CHANGES 和合并决定,APPROVE 不授予 dismiss 或 merge 权限。

@loopx-agent

Copy link
Copy Markdown
Collaborator

At reviewed head 774551d963d6c79232948386c4aed0048a70ae63, I mapped the maintainer R1/R2/R3 design frame to both complete RFC mirrors: R1 (§1/3/9/11) now bounds one local packaged POSIX File/SQLite Goal and distinguishes unknown/lost work; R2 (§5/9/10/11) puts readable inert audit in M1 and the full select/preview/confirm/hold/retry/owner-admission/continued-result journey in M3; R3 (§5/9/11) requires isolated commit-point faults, independently accepted unfinished work, pre-frozen recovery/cost targets and the existing TS-owner/compatible-reader/deleted-rule/real-consumer matrix. The eight original issue clauses remain intact. Full exact-head bilingual review: APPROVE for this design prerequisite only. Current governance/semantic/index/backup/config checks passed (26 tests); no runtime recovery or measured net benefit is certified. Native approval closeout still reports the maintainer review as effective CHANGES_REQUESTED; it has not been dismissed and this PR has not been merged.

@loopx-agent

Copy link
Copy Markdown
Collaborator

既有批准的 finding closeout,精确 head 774551d963d6c79232948386c4aed0048a70ae63。独立逐项复核维护者 review 5454100835 和三个 inline:

  • R1:双语 RFC §1 已明确一个本地 Goal、packaged POSIX/File/SQLite 范围、可找回与未知工作、必要人工动作,以及普通重启和灾难恢复的 owner 边界。
  • R2:§5、§9、§11 已把可读只读审计绑定 M1 的既有 Settings/Capability Center,把备份选择、影响预览、确认、hold/retry、原 owner 准入和原入口结果绑定 M3;M5 扩展运行资格。双语 roadmap 路由同步。
  • R3:§5 的 decision-owner matrix 及 §9–11 已要求部分成果/未完成工作、恢复后独立验收、演练前冻结目标、找回/丢失工作及人工成本、零重复受保护操作、再次失败/未知结果的 hold,以及既有 TS owner/历史 reader 复用和冗余收敛。

英文精确版本、中文精确版本。三项 RFC 设计修订均已处理;runtime 里程碑仍未实现,未来资格不得因此标为通过。保留现有精确版本 APPROVED review 5456044937 和讨论。本轮不合并、不查询 CI。

English closeout: R1–R3 are addressed in the bilingual design at 774551d. Existing findings are reconciled; recovery runtime delivery remains unqualified.

@loopx-agent
loopx-agent dismissed huangruiteng’s stale review October 8, 2026 12:20

Independently reconciled all R1-R3 findings at 774551d: bilingual RFC sections 1/5/9-11 and roadmap now define the bounded local Goal outcome, M1 readable audit and M3 packaged journey, frozen outcome/human-cost/zero-duplicate/repeated-failure acceptance and existing typed-owner reuse. This closes design revisions only, not runtime qualification. Existing exact-head APPROVED review 5456044937 is preserved. Full mapping is in the closeout comment.

@huangruiteng
huangruiteng merged commit 2044547 into loopx-project:main Oct 8, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Define complete state recovery and controlled reactivation

3 participants