Skip to content

refactor(app): decouple canonical Todo workflows from legacy producers - #6050

Merged
loopx-agent merged 6 commits into
mainfrom
codex/app-producer-independent-import-20261010
Oct 10, 2026
Merged

loopx-agent merged 6 commits into
mainfrom
codex/app-producer-independent-import-20261010

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

The complete canonical App still imported legacy Todo/bootstrap producers. Route its real reads/actions through the existing lightweight readback and input transport, retaining the typed transactions, legacy API reexports and supported Markdown IO. Pure Goal naming uses the existing project boundary.

Reviewed creation now carries the preview's provider revision into the existing TypeScript transaction, command digest and provider CAS. Normal confirmation works; a lawful competing write after the final preview or plan is refused without creating the reviewed Todo. Historical recovery retains its original identity and later writes. Unreviewed request digests remain unchanged; reviewed v2 requests cannot silently downgrade to v0/v1.

After cold import or original-operation recovery, the existing Goal settings independently refresh current ownership on the same screen. The saved original import carrier remains immutable; unavailable current policy is cleared and retried through the existing read model. A cohesive completion-validation helper preserves the moved update boundary and its maintainability budget.

Validation at the repaired head:

  • 100 Python update/declaration/action/review/lease checks; 68 source App checks; 54 fresh exact-head wheel CLI/full serve_chat checks passed. Four old producer modules are physically present/absent; actual File/SQLite import, original recovery, full current/archive requirements and later operations are covered.
  • Original defect: 4 passed/2 failed on real File/SQLite post-preview competition. The unchanged rejection assertions now pass. Five typed reviewed-create cases passed on actual File/SQLite/PostgreSQL, including post-plan competition, fresh basis, identity and later-write replay; zero skipped.
  • Real isolated PostgreSQL authority integration: 343 passed, zero skipped.
  • Packaged browser: fresh same-screen ownership after SQLite soft-claim import, original carrier byte preservation on reload, and one injected failed policy fetch followed by real-backend retry. CN desktop/narrow and EN narrow checked. No active Goal was switched or model execution claimed.
  • Retained legacy CLI/lifecycle/serialization baseline comparisons were rechecked for invalidation; current transport/receipt/serialization tests cover this repair. Ruff, configured/focused mypy, TS/frontend types/build, semantic and registry IO inventory, maintainability and standard native premerge passed. Exact-scope Change Quality receipt is valid. Initial defect/setup/maintainability failures remain in review evidence. No limits or assertions were relaxed; CI was not queried under the configured no-wait policy.

This is a complete App loading, reviewed-create and current-readback slice under existing R5/T4 acceptance. Supported legacy callers, full-state identity reactivation, installed adoption, complete writer retirement, formal D2 and a released SQLite default remain separate. Import, policy readback and original receipts grant no execution authority. Frontend Goal settings changed; no new Lark interaction was introduced.


完整 canonical App 仍加载旧 Todo/bootstrap 生产模块。本 PR 改用既有轻量读回和输入传输,保留 TS 事务唯一决策源、旧 API reexport 和仍有实际调用方的 Markdown IO;纯 Goal 命名留在已有项目边界。

创建确认把审核的 provider revision 带入既有 TS 事务、command digest 和 CAS。正常确认可用,最终预览或 plan 后的合法竞争会拒绝原审核任务;原操作恢复保留后续写入。未审核请求的旧 digest 不变,审核 v2 不可静默降级。

冷导入及原操作恢复后,同一 Goal 设置页独立刷新当前策略。原导入 carrier 不被覆盖;读取失败清除过期展示并可重试。声明校验的小 helper 保持原更新语义和维护预算。

修复 head 的 100 项 Python、68 项 source App、54 项新 wheel 完整 App/CLI、5 项真实三 provider 审核创建,以及 343 项真实 PostgreSQL integration 均通过;两个竞争反例从失败变为通过。完整安装包页面验证同页策略、重载原 carrier 及失败重试,并检查中英文窄屏。静态检查、semantic/IO inventory、maintainability、标准原生 premerge 和质量回执通过;保留历史失败,未放宽阈值或删除断言,按配置未查询 CI。

这是 R5/T4 的完整调用方阶段包,仍不等于全量旧 writer 退役、全状态身份恢复、运行安装采用、正式 D2 或已发布 SQLite 默认。导入、当前策略和历史回执不授予执行权限。Frontend 设置页已改动,Lark 无新增交互。

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=xhigh

审查 head:e3a817bcfb7b4a5c17b109442c8ec36a6faeb7d6,基线:0012c4eb52191ba58d510e4af8cabb46704c1539。结论:APPROVE,未发现阻塞问题;这是有实际用户结果的阶段交付,尚未结清全部退役或本机采用。

动机

需要把旧 Markdown Goal 导入 File 或 SQLite,并继续通过 App 操作任务的用户会遇到这个问题。移除四个旧生产模块后,主干完整 App 在启动时就报缺失模块;即使保留它们,导入后创建任务的确认也会误报预览过期。修复版可启动、导入并继续创建、修改和完成任务。已验证完整打包 App 在四模块物理缺失时完成 File/SQLite 导入;原操作恢复保留后续新写入的任务、优先级、备注和完成状态。本 PR 不切换新 Goal 默认值,不删除所有旧 writer,不证明全部 Goal 历史恢复、全状态 identity 采用或 D2。合并后的本机安装采用、剩余 Host/bootstrap/历史调用方退役以及完整收尾验收仍待推进。

这里的 canonical 是任务状态的正式数据源。只有导入命令成功,而完整 App 无法启动或无法创建下一项任务,用户仍无法完成迁移后的日常工作。不可把这种局部成功算作旧生产模块可以删除的证据。

改动思路

将现有输入校验与 canonical 路由集中到同一个传输入口,原有 TypeScript 事务仍决定准入和副作用;真正的 Markdown IO 只在未迁移操作时加载,避免为 App 再复制一套状态规则。当前边界是完整打包 App 的旧源导入与后续受审任务操作,覆盖真实入口、恢复和拒绝路径;保留仍有调用方的兼容 writer。

已接受的规格采用改动前版本:docs/reference/local-authority-provider-selection.md,spec_revision=0012c4eb52191ba58d510e4af8cabb46704c1539,对应 R5/D1、T4/C1。前者的完整源要求、备份见证、明确停止旧 writer、原操作恢复和后续写入保留由真实入口验证;后者的全部调用方退役仍是现有 checkpoint 的剩余项,不能用本 PR 修改后的文字反向认证完成。

仅延迟 chat 的直接 import 会漏掉 lease、协作、manager 读取链及后续任务变更;直接删除旧 facade 则破坏尚未迁移的 Goal。现有输入边界提取与 App 确认修复属于同一个可回退结果,不需要新框架、CLI、状态字段或平行的 Python 决策源。这个有限的相关重构已经应用:纯命名函数与真正初始化效果分离,读路径复用现有 readback,原 Markdown IO 留到有证据的调用方退出。

具体改动

关键代码讲解

  • add_goal_todo 提取原签名和校验。canonical 路径直接交给现有 typed provider;未迁移路径才加载真正的 Markdown writer,预处理结果只传一次。
  • update_goal_todo 保留 supplied/omitted/clear 参数意图、claim、validator 和 proof 边界。这里是输入适配层,准入和事务没有移回 Python。
  • complete_goal_todo 保留 provider-first terminal decorator,canonical 完成先于旧 writer import;真正 legacy 完成仍走原实现和校验。
  • _todo_preview_fingerprint 从 canonical record 提取真实 text/status,并使用 provider revision;仅剔除 dry-run 随机拟定 Todo ID。优先级仍由现有 typed planner 编入 text,已审动作参数也仍封存,不能改意图后沿用预览。
  • derive_goal_display_name 是原纯函数移动。bootstrap 保留同一函数和异常类的 reexport,真实创建动作仍局部加载其原 owner。

其余 App、lease、协作、scheduler monitor、manager 和 presentation 文件调整到这些现有读/输入 owner;registry manifest 只更新移动后的坐标,两处文档替换旧资格描述。所有 30 个文件均已审阅。diff 为 +776/-441,最大 518 行模块主要是现有公开参数和校验搬移,未增加另一套状态机。Lark kanban 的真实旧解析调用仍在支持范围,不能据此宣称全部 facade 已退役。

真实正向路径:完整 serve_chat → 备份/预览 → reload 后恢复原预览 → 明确确认停止旧 writer → File/SQLite 导入 → 受审创建/修改/完成 successor → 独立 list/detail 读回 → 原导入重放保留后续写入。负向覆盖来源漂移、备份损坏、别名重定向、缺失所选 provider、hard-lease 缺证和越过任务 owner 的编辑;拒绝后仍通过有效原操作或合法 successor 继续工作,没有放松授权。

对主干的风险

风险集中在输入搬移是否漏参数、terminal 装饰器是否改变先后顺序,以及 canonical preview 是否丢失意图绑定。搬移前的 127 项 App/创建与 64 项 terminal 特征化通过,搬移后的同组 191 项通过;额外 107 项 legacy 生命周期、33 项 registry/bootstrap 通过。最终 wheel 使用不带 editable 源码回退的隔离解释器运行 54 项完整 App/CLI 验证,覆盖 File/SQLite、外部 registry 及四模块存在/物理缺失。

同一实际 HTTP 测试在不可变主干基线复现 loopx.todos 启动缺失和导入后 create 的 409 action_stale,修复 head 两项通过。最初对照环境缺前端构建且含 editable 回退,已保留为无效实验记录;补入同一未改的打包资产并隔离解释器后才作为回归敏感性证据,未用环境错误充当产品根因。

Ruff、配置范围 mypy、完整语义检查、registry inventory 及原生 quick premerge canary 均通过。第一次语义检查发现生成坐标过期,已按原 generator 更正并重验。按当前 managed 策略未查询或等待 GitHub CI,这些是本地证据而非远端 CI 结论。

打包浏览器验证 File 设置页备份、reload、原预览恢复及确认;SQLite 导入后受审新建 successor、改为 P4、完成并读回。其他 actor 持有任务的编辑被明确拒绝,完整 824 字符原要求和 archive 保留。测试使用隔离 Goal,没有切换活跃 Goal。最小 fixture 的其他健康提示未被宣称全 Host 验收通过。成功操作明确使用 soft_claim;hard-lease 仍需原 proof。没有 PostgreSQL store 或 TypeScript 行为变更,不声称 PostgreSQL 新资格,也未引入 create 丢响应的完整原子恢复协议。

我的整体评价

将现有输入校验与 canonical 路由集中到同一个传输入口,原有 TypeScript 事务仍决定准入和副作用;真正的 Markdown IO 只在未迁移操作时加载,避免为 App 再复制一套状态规则。当前边界是完整打包 App 的旧源导入与后续受审任务操作,覆盖真实入口、恢复和拒绝路径;保留仍有调用方的兼容 writer。原来的 handler-only smoke 能绕过真实 App 加载和后续任务确认,本次补齐了会在真实旧缺陷上失败的入口验证,所以不是只为绿色计数搬代码。没有发现需阻塞本 head 的问题。

建议合并这个独立、可回退的运行时阶段,随后安装采用并沿现有 R5/D1、T4/C1 验收剩余调用方。当前 runtime PR 仍由 maintainer 合并;本次作者自评审的 COMMENTED 记录不等于 GitHub 正式 self-approval、合并权限或 Goal 完成。最强剩余证据缺口是当前安装采用与真实 Host/全部历史收尾,本 PR 的范围和文档均保留这一点。

English verdict: APPROVE - e3a817b. Full packaged App cold import and reviewed canonical task continuation work without four legacy producers; isolated base/head tests catch both startup and create-preview defects. Final isolated wheel 54 checks, legacy lifecycle 107, registry/bootstrap 33, static/semantic checks and quick canary passed. Retained writer callers, current installation adoption and full retirement remain explicit follow-up acceptance; maintainer merge required.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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.

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

动机

在统一状态存储中管理任务的用户,需要打开完整 App,查看现有及归档任务、审核后创建任务,并在重启后继续处理原任务。 旧版本即使已使用统一存储,完整 App 仍依赖旧 Markdown 写入模块;删除这些模块会阻止启动,且正常创建预览被随机任务 ID 判为过期。新版本能在四个旧模块缺失时启动并确认创建,但审核版本还没有传到最终创建事务。 新源码和新 wheel 的真实 HTTP/File/SQLite 正常路径通过;独立对照同时复现了阻塞竞态:另一个合法写入在最终预览检查后推进版本,head 仍成功创建用户原审核版本下的任务。 本评审不宣称整个旧存储已退役、默认存储已迁移、PostgreSQL 已验收或本机已安装升级,不新增 Goal、账户、执行、lease 或合并权限。

精确 head e3a817bcfb7b4a5c17b109442c8ec36a6faeb7d6,不可变 base 0012c4eb52191ba58d510e4af8cabb46704c1539;完整30文件及未改的创建事务、旧调用方已读。

改动思路

App 读回、纯 Goal 命名及 Todo 输入传输应复用已有 owner,类型化事务保持唯一决策源;保留真实旧调用方的 lazy writer/reexports 合理。预览恢复必须同时把已审核版本约束落实到现有创建事务,单独让摘要稳定却不约束提交会留下并发确认缺口。 当前 PR 应把完整 App 的去旧模块加载、可用确认以及同一审核版本的事务拒绝作为一个可独立验收边界;全量旧 writer 退役、D2 存储迁移和 live 安装不是此边界,现有 owner/既有验收继续持有这些缺口。

独立依据:修改前 docs/architecture/rfcs/typescript-control-plane-migration-v0.md,修订 0012c4eb52191ba58d510e4af8cabb46704c1539,T4 要求实际剩余调用方、真实入口及原事务/读回语义得到验证,保留 rendering/import-export/external-effect 所属边界。既有 docs/reference/local-authority-provider-selection.md 的选定 provider、审核来源及无 fallback 契约也适用。候选改写的 R5/T4/C1 checkpoint 不能自证完整退役;D2 迁移不是此 PR 的完成结论。

具体改动

  • 新 mutation_api.py 将既有 add/update/complete 的公开签名、校验和 provider-first 输入运输移到轻量 owner;canonical 仍调用同一类型化 create/update/terminal 事务。未迁移的 Markdown 路径才 lazy-load 原 _..._legacy 写入体,旧 todos.py 继续 reexport 真实 CLI/bootstrap 使用的 API。
  • 独立 AST/签名对照确认旧 writer 主体未重写,新增内容是 prepared input/locals transport 及既有 decorator 的搬移;eligibility/lifecycle 没有新增 Python 决策源。纯 Goal 命名/错误移到 projects/identity.py,bootstrap 保留兼容导出,真正注册仍由原 owner 执行。
  • App status/detail/archive/monitor/lease 等读路径复用 list_readback;完整新 wheel、完整 HTTP App 和 CLI 在四个旧模块物理缺失时可用。不是只测 import 单一 helper。源码及新 wheel 验证 real File/SQLite、来源/备份漂移、硬 lease proof、provider 缺失无 fallback、重启原预览和后续 create/edit/complete/soft claim 的保留。
  • 预览摘要正确排除 canonical dry-run 每次随机分配的 proposed Todo ID,并保留 provider revision。但最后创建调用没有携带审核 revision。

[P2,阻塞] loopx/chat.py 第708行放开正常 canonical 确认后,最终提交仍没有审核版本约束。 _todo_preview_fingerprint 第703行将 provider revision 纳入摘要;apply_todo_review_preview 第800行重新 dry-run 并比较 preview ID,随后在第826行附近 _add_review_todo(dry_run=False) 没有传 reviewed revision。ChatActionService 同样做非原子的先检查再创建;原类型化 provider create 保护自己的最新事务写入,却不比较用户已审核的那个版本。

独立最小复现使用真实 File 和 SQLite 的 public preview/apply 及现有 add_goal_todo:先构建审核预览;最后 dry-run 检查刚通过时,让另一个合法 public writer 创建一项任务、将 revision 从1推进到2;再继续最终 create。两个 provider 都成功留下“原审核请求”和“后来独立写入”两项,而不是 stale/no-write 拒绝;两个拒绝断言均失败。夹具只在编排 seam 插入合法写入,没有替换存储、伪造 revision 或破坏活动数据。

同一 immutable base 的两个负例通过,是因为它的随机 preview ID 本来就让正常确认409,所以还没走到最终提交;这不是正常路径健全。新 head 的73/54正常路径通过,也不覆盖最后检查与提交间的并发。

通过既有类型化 Todo 创建 owner 把审核的 provider revision 带到真实提交点,在同一存储事务内比较并拒绝漂移;保持原操作身份及无写入失败读回。不要只增加一次 Python 预读。补 File/SQLite 正常确认、确认前漂移和最后检查与提交间合法写入三种对照。

对主干的风险

独立源码五组实际 HTTP/CLI/storage/priority/detail 73 passed,225.97秒;新 wheel 的完整 cold HTTP/CLI 54 passed,227.11秒。相同 built UI 和相同 fixture 对 immutable base:旧模块存在时 canonical 确认409,四模块缺失时 full App 启动失败。相同 legacy CLI 和 lifecycle smoke 在 base/head 都通过,serialization/bootstrap13项在两侧都通过。Ruff、仓库配置的 kernel mypy19files(base/head)、TS typecheck、全树语义检查及 I/O manifest290sites 最终通过。共享 TS 事务/provider factory 没有修改,没有以未跑 PostgreSQL 宣称其退役验收。

实际浏览器使用新 wheel 的隔离完整 App、四模块物理缺失及合成 Goal:原预览在 reload 后恢复,显式协作认领确认后存储读回 sqlite、两项任务。同屏所有权表单仍显示旧 Markdown 来源,最终 UI policy freshness 没有通过验收;HTTP 状态成功不替代这个界面读回限制。没有调用在线 Provider,原浏览器 TaskSpace 和隔离 server 已清理。

首次新 worktree 缺 UI bundle 导致 build/cold HTTP setup 失败;按锁文件构建既有 UI 后,同一源码73/新 wheel54通过。错误猜测的测试/脚本路径与临时扩大 mypy 到配置外导入树的失败也保留;没有声称整个 Python 树 typecheck 通过。实际规定的检查及正确 legacy/current 入口如上,未削弱断言或硬限制。

没有查询或等待 CI,未升级活动安装、迁移活动 Goal、操作真实 Bot 或账户。部分 App 加载 retirement、完整 writer 退役、D2、安装采用分别保留,测试数量不关闭母级验收。

我的整体评价

REQUEST_CHANGES 当前精确 head。 轻量加载和原 owner 复用有实测收益,保留真实旧调用方的兼容层合理,整体30文件不是无效铺设。必须把用户审核的 source head 交给同一类型化创建事务,正常确认与并发拒绝一并交付;这也是 bounded future-facing pass 的当前最小修复,不应新造 Python policy/事务 owner 或用第三次非原子读取替代。完整退役无需成为本小边界的前置条件,现有 checkpoint 继续持有那部分剩余验收。

同一 GitHub 账号拥有 PR,故发布 COMMENTED 自评及明确阻塞结论;这是技术 REQUEST_CHANGES,不伪造 GitHub 的正式自审状态,也不授予合并权限。

English verdict: REQUEST_CHANGES - head e3a817b. Whole30-file extraction and compatibility/transaction callers reviewed against immutable T4 and selected-provider contracts. Real full source73 and fresh-wheel54 HTTP/CLI cases pass with all four legacy producers physically absent; legacy base/head CLI and13-test parity pass. However, both real File/SQLite public preview-confirm paths accept creation after a lawful writer advances the reviewed provider basis between the last check and commit. Carry the reviewed revision into the existing typed create transaction and atomically reject drift without writes; preserve original identity and test normal, pre-confirmation and check-to-commit interleavings. Browser storage reads sqlite/2tasks, but ownership form remains stale and final UI policy readback is unqualified. Broader retirement/migration/PG/install adoption are not certified; CI was not consulted.

…dependent-import-20261010

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent requested a review from maxliux5 as a code owner October 10, 2026 05:10

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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; xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Exact head: 7e01597a1e91775889909cfdb9ce7858968d6ffd. Integrated base: ed79bfd63c0dae3dd0111ae3854790cce47ca014. This review supersedes my original-head REQUEST_CHANGES judgment; it preserves that discussion and its reproduced failure. Owner authorization specifically covers repairing and self-merging #6050.

动机

已选择统一状态存储的用户,需要打开完整 App、导入旧任务并审核后创建新任务。这里的统一状态存储指 Goal 已选定的 canonical File 或 SQLite,原始 Markdown 文件不再是该 Goal 的正常写入源。

原先移除旧模块会让 App 无法加载;修复预览后,另一写入发生在确认检查与提交之间仍能让过期确认成功。现在正常确认可用,并发漂移在真实事务中拒绝,导入后当前策略即时回读。这消除了“页面显示审核成功,实际提交却基于另一份状态”的风险,也减少了用户为了确认策略而手动刷新页面的负担。

完整安装包中的 File/SQLite 导入、后续任务操作和原操作恢复通过;过期审核无写入,同页策略、重载和读取失败后的重试均已验证。

此 PR 不删除仍有调用方的旧 Markdown writer,不升级当前运行安装,也不认证完整退役、正式 D2 或已发布的默认 SQLite。既有 R5/T4 计划仍需完成运行安装采用、全状态身份恢复和最后调用方退役。

改动思路

创建审核版本属于既有 TS 事务的不变量,Python 只传输输入;当前策略属于既有 owner 的派生读回,导入与恢复后刷新同一设置页即可,无需新的状态源或能力。

当前 PR 交付完整 App 去旧模块加载、安全确认、同页当前策略及原操作恢复;旧 writer 最后调用方退役与正式存储资格继续由既有 R5/T4 验收负责。

我重新比较了 immutable base/head 的 App、旧 facade、列表读回、provider create/update/terminal 和 bootstrap 调用方。新的 mutation API 移动既有输入校验和路由,并未重建第二套 Python 状态机;真实旧调用方仍按原入口懒加载 Markdown IO。纯 Goal 命名留在已有项目边界。审核版本从完整 provider head 推导,既不是用户额外填写的字段,也不是某一页 Todo 的推测。

确认链路先恢复原 command receipt,再检查审核版本与当前 head,最后由原 provider 事务 CAS 提交。这样既拒绝检查后竞争,又允许已成功的原操作在后续数据写入之后恢复。增加第三次 Python 预读仍有竞争窗口,另建状态或 provider 则扩大维护面;二者都不如复用既有事务。

具体改动

全 PR 为 38 个文件、+1047/-458。主体是既有 Todo 输入传输和纯命名 helper 的迁移、App 消费方改用轻入口、原 API reexport、真实旧 writer 的保留,以及完整 App 的 producer-absence 验证。修复增加审核版本的 typed wire/digest/precondition、同页当前策略刷新和聚焦竞争测试。它没有新增 capability、provider、配置开关或权限。

关键代码讲解

  1. loopx/chat.py:807 — apply_todo_review_preview:核验正常预览后,把同一审核的 provider revision 传给创建 owner。只有确定的 provider_revision_mismatch 转成无写入 409;提交阶段拒绝会如实标记已尝试写入,并不伪造一个已审核的 current_preview_id。不确定的写入结果继续走原操作恢复。
  2. loopx/control_plane/coordination/todo_create.ts:210 — executeCoordinationTodoCreate:可选审核版本只在提供时进入请求 digest,旧 unreviewed digest 保持兼容;原回执优先,再校验完整 head,并把该 head 交给原 CAS。合法竞争会拒绝,成功后再写入其他数据也不会被原回放覆盖。变更或删除原审核版本不能重用同一操作身份。
  3. loopx/control_plane/todos/mutation_api.py:40 — add_goal_todo:canonical-first 的既有输入传输;提供审核版本时使用 v2,未提供仍是旧 v1。旧 v0/v1 不能携带新字段静默降级,v2 缺少或非法版本在访问 provider 前拒绝。真正未迁移的 Markdown 调用仍使用原 writer;新版审核版本不能混入该路径。
  4. apps/presentation/dashboard/src/features/personal-workspace/workspace-settings-page.tsx:32 — WorkspaceSettingsPage:导入/原操作恢复触发同一 Goal 的 ownership read model 重新读取。storage 中使用最新 callback ref,避免原操作恢复拿到旧 callback 或产生 effect 循环;保存的不可变原导入 carrier 不被当前读回覆盖。

规范依据:docs/architecture/rfcs/typescript-control-plane-migration-v0.md,固定于 ed79bfd63c0dae3dd0111ae3854790cce47ca014,接受标准 T4。本 PR 验证真实 App/CLI、保留既有事务和仍有调用方的 IO,但完整 T4 writer 退役仍是 deferred,由既有最后调用方/安装采用验收继续负责。相关 R5 checkpoint 在同一 base 的 docs/architecture/rfcs/loopx-overall-roadmap-v0.md;候选 checkpoint 文档只记录有界结果,不能自行改写验收标准。C1/D2/发布默认仍独立。

对主干的风险

最危险的旧反例并非 App 不能运行,而是正常测试都绿、另一合法 writer 在最终预览与提交之间改变状态,过期审核仍成功。我用真实 File/SQLite 重现了旧 head 的 4 通过、2 失败;当前保留同一拒绝断言,正常创建、重复操作、确认前漂移和检查后漂移均通过。TS 另在真实 File/SQLite/PostgreSQL 上制造 plan→commit 竞争,验证无原操作回执/无原 Todo,取得新审核版本后可以继续,原操作回放保留后续写入。

当前证据:100 项 Python update/declaration/action/review/lease 检查通过;68 项 source App 检查通过;exact-head 新 wheel 的 54 项完整 serve_chat/CLI 检查通过,四个旧模块分别实际存在/被移除。typed reviewed-create 5 项通过且零 skip;隔离的真实 PostgreSQL integration 343 项通过且零 skip。保留旧 CLI/lifecycle/serialization 的 immutable-base/original-head 对照,核对当前旧 writer 和调用路径未变化,另以当前 transport/recovery/serialization 覆盖修复的影响。

完整安装包浏览器验证:SQLite 导入后同页显示协作认领;重载时 localStorage 原 carrier 字节不变;单次注入 policy fetch 失败会清除旧展示、给出重试,恢复后读取真实后端。桌面、390px 中文和英文窄屏均检查。失败仅在网络读取 seam 注入;没有伪造存储或成功状态。这里使用隔离的合成 Goal,没有修改运行中的 Goal,也没有模型执行或安装采用声明。Lark 入口没有新增交互,仍消费现有共享 backend。

历史失败没有删去:第一次 maintainability 检查发现 update 函数复杂度增长,已抽出同一声明 owner 的小 helper,并用 100 项语义/参数测试验证;第一次 canary 同时发现审查期间编辑文档的 tracked side effect,最终干净不变 head 的标准 canary 全部通过。窄范围 typing 问题也修复并复查,未声称全树 Python 已通过 typing。无阈值放宽,无断言删除。

语义与 CI 对齐

复用已有 revision conflict 词汇和 create 状态 owner,仅扩展已存在的 create wire 到 v2。changed-diff advisory 后执行 full semantic、registry IO 290 sites、maintainability;Ruff、配置的 19-source mypy 与 mutation API 的 focused mypy、TS/frontend typecheck/build、compile/diff/public-boundary 均通过。最终标准 native premerge gate 通过,exact-scope Change Quality receipt 有效;当前无失败或 required skip。wait_for_ci=false,因此没有查询、轮询或等待 GitHub CI,远端 CI 状态不被声称为通过。

审核版本与 original identity 是机器强制约束,不是建议。当前 UI 状态来自 owner endpoint;import 回执和 capability 可用性不授予执行权限,不结算 lease,不激活其他 Goal,也不恢复旧 writer 的权限。错误和规则保持 Goal/provider/operation 中性,未把具体产品或 benchmark 的目标写进通用决策。

我的整体评价

APPROVE,属于 justified_increment。 long_horizon 与 user_experience 均 improved:完整 App 可以持续读写,原操作恢复保留后续数据,当前策略不依赖手动重载,拒绝后的新审核和读取重试能恢复有效工作。修复没有把整个退役路线塞进一次变化,也没有仅增加序列化就停下;完整调用链及负例已验证。

这次 future-facing pass 已应用:保留类型化事务的唯一决策源,声明校验使用最近 owner 的小 helper,UI 重用原 fetch/callback;没有添加 speculative framework。+540 行 transport 大多是搬移,仍需随真实旧调用方退出而继续压缩,不能把搬移算作旧代码彻底退役。v0/v1 保留由实际 unreviewed 调用及原回执兼容支持,不只是“曾经存在过”。

在以上不变 exact head、原生审查/旧意见 closeout 和 merge-readiness 完成后,可按本次明确授权自合并。此结论只接受本 PR 的有用调用方边界;运行安装升级、完整 T4/C1、D2 和发布默认仍按原计划验收。


Motivation

Users of a selected canonical File or SQLite Goal need the full App to import old tasks, review new work and continue after restart. Removing old producer modules broke App loading. Stabilizing preview identity made normal confirmation reachable, but a lawful competing write could then commit stale reviewed intent; import also left ownership settings showing the old policy.

This head makes normal confirmation usable, binds its reviewed basis at the real transaction, and refreshes current ownership on the same settings page. The installed File/SQLite App, subsequent operations, original-operation recovery and failed-read retry were exercised. It does not retire remaining real Markdown writers, upgrade the active installation, qualify full-state identity adoption, certify D2 or publish a SQLite default. Existing R5/T4 acceptance retains those gaps.

Approach

The existing TypeScript create transaction owns the invariant. Python transports the reviewed full-head revision; it does not add another decision owner or a third pre-read. Existing command identity includes the optional basis, existing receipt-first recovery preserves later writes, and existing provider CAS refuses the competing commit.

The existing ownership endpoint remains the source of current policy. Import and original-operation recovery refresh that projection using the existing callback/fetch. No second policy state, capability or permission is introduced. Lazy old IO and API reexports remain for actual supported legacy callers; pure naming and declaration helpers stay in their nearest owners.

The useful boundary combines full App loading, safe confirmation, current same-screen readback and original-operation recovery. Whole writer deletion and formal persistence qualification remain with the existing plan, making this slice independently testable and reversible.

Changes

The whole 38-file diff is +1047/-458, mostly moving existing mutation transport and pure naming, switching actual App consumers to existing lightweight readback, preserving live compatibility, and validating the complete packaged App with producers physically absent.

The four behavior-bearing symbols explained above are apply_todo_review_preview, executeCoordinationTodoCreate, add_goal_todo, and WorkspaceSettingsPage. They carry the reviewed revision into the original transaction, bind it only when provided, reject v0/v1 silent downgrade, preserve unreviewed digests, and refresh the actual current policy without overwriting the saved import carrier. A small existing declaration helper also restores the maintainability budget without changing validation precedence.

Specification: docs/architecture/rfcs/typescript-control-plane-migration-v0.md at ed79bfd63c0dae3dd0111ae3854790cce47ca014, criterion T4. Actual caller/transaction preservation is verified here; complete writer retirement is deferred to the existing acceptance. The linked R5 roadmap checkpoint at that same base retains C1/D2/default and installed-adoption boundaries. Editing a checkpoint does not rewrite independent acceptance.

Risks to main

The original candidate passed ordinary checks while accepting a stale confirmation after the final preview. The independent real File/SQLite fixture had 4 passes/2 failures; this head retains the assertions and passes normal, duplicate, pre-confirmation and post-check cases. Real File/SQLite/PostgreSQL tests additionally cover plan-to-commit CAS, fresh review after refusal, changed/omitted basis identity rejection, and replay after later writes.

Local results: 100 Python transport/action/declaration/review/lease tests, 68 source App tests, 54 exact-head installed-wheel full App/CLI tests, five reviewed-create typed cases with no skip, and 343 actual isolated PostgreSQL integration cases with no skip passed. Existing legacy CLI/lifecycle/serialization baseline comparisons were retained after caller/writer invalidation, with current affected transport/receipt tests covering the repair. Packaged browser checks show fresh same-screen policy, byte-identical saved carrier on reload, and actionable unavailable state followed by real backend retry. Only one failed fetch is injected; success uses actual storage. CN desktop/narrow and EN narrow views were inspected. No active Goal was mutated or paid-model adoption claimed.

Initial race, maintainability, concurrent reviewer-edit canary and narrow typing failures remain recorded; the affected obligations were repaired and independently rerun. No assertions or budgets were weakened. The full standard native premerge gate, current quality receipt, semantic and 290-site IO inventory, maintainability, Ruff, configured/focused mypy, TS/frontend types/build and diff/public-boundary checks passed. No current required failure/skip remains. Remote CI was not queried, polled or awaited under wait_for_ci=false.

The v2 wire extends the existing create contract; it creates no broader actor lifecycle or authority. Import receipts, readback and availability do not authorize execution or restore an old writer. Reviewed revision requirements are enforced preconditions, not guidance. Generic errors remain domain-neutral. Lark gets no new UI workflow and retains the shared backend.

Overall assessment

English verdict: APPROVE. This is a justified increment with improved continuation and user experience: full App operations remain usable, historical recovery preserves new data, and refusal/retry returns to productive authorized work. The future-facing pass uses existing typed authority, a cohesive local declaration helper and the original UI read model rather than speculative structure.

The remaining transport size and live legacy IO should shrink only as actual callers retire. The exact-head review, prior-finding closeout and native merge-readiness still precede the expressly authorized self-merge. Active installation adoption, complete T4/C1 retirement, formal D2 and released-default qualification remain separate, visible work.

@loopx-agent
loopx-agent merged commit c0f77b2 into main Oct 10, 2026
16 checks passed
@loopx-agent
loopx-agent deleted the codex/app-producer-independent-import-20261010 branch October 10, 2026 05:22
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.

1 participant