Skip to content

fix(control-plane): retain archived todos on include-archived query and prevent single-goal stale registry false positives - #7969

Merged
huangruiteng merged 3 commits into
mainfrom
codex/personal-knowledge-workflow-20261103
Nov 3, 2026
Merged

huangruiteng merged 3 commits into
mainfrom
codex/personal-knowledge-workflow-20261103

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Retain archived todos on query: In loopx/control_plane/todos/read_transaction.ts, pass include_archived separately from the completed_history-only retained mode. Adding archive rows no longer disables the current acceptance contract, guard or executable-work projection for active Todos.
  • Single-goal source registry health: In loopx/control_plane/goals/global_registry_health.py, allow single-goal source registries to inspect matching contents (observed == expected), eliminating endless false-positive stale_source_registry findings after mtime changes.
  • Regression test: Added test_single_goal_source_registry_unchanged_prevents_false_positive_stale_warning covering single-goal unchanged mtime updates vs real state mutations.

Review Repair

The mixed-history/current-work regression is fixed in the existing projection owner:

  • include_archived now controls row inclusion only.
  • retained continues to mean the historical evaluation mode selected by read_scope=completed_history.
  • Active Todos retain goal_acceptance_contract, goal_acceptance_guard, standing decisions and the executable lane when archive rows are included.
  • New File and SQLite tests compare ordinary, include-archived, include-archived + status=open, stale bound work and unbound active work. All three views keep first_executable_items empty in the guarded fixture while include-archived returns the archived row.

Verification

  • Rebased onto origin/main at cf9b20cd2d; the upstream Windows settlement calibration is already present, so its duplicate local test-only commit was dropped.
  • pytest tests/control_plane/test_sqlite_archive_and_registry_health.py tests/control_plane/test_quota_settlement.py -q: 87 passed, 1 skipped, 1 pre-existing assertion failure reproduced on clean main.
  • node --test tests/control_plane_ts/todo_read.test.ts tests/control_plane_ts/todo_archive_selection.test.ts: 26/26 passed.
  • Applying the new mixed-archive regression to immutable main fails both File and SQLite cases because the archived row is missing; applying it to the intermediate repair also fails both cases because the active acceptance contract disappears. The current head passes both.
  • npm run typecheck:control-plane: passed.
  • ruff: passed.
  • Standard premerge: 6 direct checks and 18 selected checks passed, with only the known maintainability-ratchet inherited advisory.

CI was not polled or waited on under the managed review policy.

@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 | model=gpt-6.1-sol | provider=OpenAI | runtime_reported | reasoning_effort=max

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

REQUEST_CHANGES,head f89d2d5bec02bb6d05db7ada9d7fb2bfba92baaa。一项 P2:包含归档时会隐去活动任务的验收限制。

动机 / Motivation

需要读取当前任务和完成历史、判断任务是否受验收限制的维护者与 Agent。 同一份任务中,普通读取能看到验收关联已过期;加入完成历史后,归档项回来了,但活动任务的限制消失,并被列入可执行候选。 单 Goal 内容未变时可消除时间戳误报;归档查询可返回历史,但必须保留当前活动任务的验收契约和限制。 本次不更改执行授权、租约、验收准则、存储格式或安装版,也不以一次读取证明长程收益。

原来查不到已归档任务、单 Goal 内容没变仍反复告警,都会增加读历史和处理健康提示的成本。两处修复有实际价值;不过小改动也必须保留当前工作限制。本 PR 仍需分开“包含归档记录”和“历史视图”语义,再验证活动任务限制与归档记录同时正确返回。

改动思路 / Approach

复用原 canonical 读取与 registry 比较 owner 是合适的;包含归档仅应扩展记录集合,不能复用会关闭活动任务验收投影的历史模式。 本 PR 是现有 Todo 查询和 registry 健康只读投影的局部修复;修复 retained 语义复用并补齐混合活动/归档负例后,按新 head 复审。

Todo 仍由实际 canonical provider 提供,Python CLI 转给 TypeScript 的统一读取和筛选;registry 健康仍由现有文件读取与标准化比较处理。未增加状态、开关、CLI 或第二个准入 owner。关键区别是:include_archived 是在当前视图中加入历史记录,completed_history 是专门的历史视图;二者都需要归档行,并不表示应对活动行关闭当前验收投影。

具体改动 / Changes

完整审查三文件 +89/-2,其中生产代码 +4/-2、测试 +85。实际基线为 feea5a6e56066eef87889d470d7991922f9f00ec。规范依据 docs/architecture/rfcs/shared-goal-alignment-and-governed-amendment-v0.md,spec_revision=feea5a6e56066eef87889d470d7991922f9f00ec;只应用其中当前已有的 3.8 typed readback/guard 义务,不把未实现的更大 RFC 范围变成本 PR 门槛。补充对照同一基线 docs/status-data-contract.md 的 Global Registry Health、docs/project-agent-todo-contract.md 的 Canonical registry source witnesses,以及 docs/reference/protocols/todo-detail-cold-path-v0.md 的 Ordering And Freshness。

  • 3.8:not_met。 已变化的验收/工作关联须通过既有 typed guard 读回;混合历史查询隐去了这些事实,详见 P2。
  • Global Registry Health:implemented。 相同单 Goal 消除误报,状态、目标、路由或来源不确定仍保留告警。

关键代码讲解

  • readCanonicalTodoProjection 第22行把 include_archived 也映射为 retained=true,这确实让历史记录不再被提前排除。
  • projectCanonicalTodoFields 是同一真实调用链上的未改函数:第210–228行不仅用 retained 控制记录,还用它决定是否带入 goal_acceptance_guard、goal_acceptance_contract 等当前投影。这是回归的实际因果路径。
  • _multi_goal_source_entry_unchanged 去掉单行数量限制后,仍要求唯一匹配目标、无嵌套 source_registry,按原 sanitizer 比较完整 observed/expected;不是直接忽略新时间戳。
  • 新增单 Goal 测试 先改 mtime,再把状态改为 paused,覆盖“未变不报、真变仍报”。它没有覆盖 Todo 的混合活动/归档验收语义。

对主干的风险 / Risks

P2:加入归档不能把当前受限制的工作投影成可执行候选。 定位 read_transaction.ts:22–25。我在独立源码基线与精确 head 上初始化相同合成 canonical 状态:一项已变化的 bound Todo、一项尚未关联验收的活动 Todo,以及一项已归档 done Todo。两端分别用真实 File、SQLite 存储,既执行 typed reader,也通过实际 todo list --include-archived 和 --include-archived --status open CLI 读回。

相同活动任务 基线和 head 普通读取 head 加 include-archived
验收限制 goal_acceptance_stale / goal_acceptance_unbound 均消失
当前验收契约 保留 消失
first_executable_items 空 两项受限制的任务

两种 provider 都复现,provider revision 读前读后不变。只加 --status open 仍能复现,因此不是历史记录自身没有当前限制的问题。真实写入/claim 准入没有被测试为绕过;这里的确定影响是读回不真实,可能诱导重复选择后又被当前准入拒绝。最小修复是在现有 projector 中分开归档行选择与历史模式,给活动行保留当前验收装饰和可执行候选计算。建议在 todo_read.test.ts 的现有 File/SQLite fixture 中加入上述反例,再核对 ordinary、include-archived、status=open、agent scope、exact archived 与 completed_history;无需新框架或新验收状态。

PASS:head 归档/registry Python 模块 9项;同一基线 2 FAIL/6 PASS,失败是原有归档项丢失,说明修复了真实旧缺陷。head TS reader 20项通过。独立 registry 八场景比较中,仅 unchanged 由 stale=true 变为 false;paused、different_state、different_goal、duplicate、nested_source、empty、unreadable 七种真漂移/不确定来源保持 stale=true。native standard premerge 总体通过,6 direct、16 selected/executed、0 blocking failures;其中维护性 ratchet 的 render_canonical_todo_sections 超长告警保留为 advisory,已在本 PR 不变基线上用同命令复现完全相同的失败详情,未降低门槛。

语义与 CI 对齐

复用现有 include_archived、read_scope 和 guard vocabulary;没有新 Enum 或公共协议。但 retained 的语义合并让当前投影丢失限制,属于实测的语义回归。未查询、轮询或等待 CI,CI 未知不是本次阻塞;上述当前 head 的独立反例才是请求修改的依据。

我的整体评价 / Verdict

registry 修复和历史行恢复有用,生产机制规模合适;当前有一项可在原 owner 内修复的回归。长程判断为 regression:历史读取不应改变当前可执行工作观察;未证明实际长程收益。用户体验判断为 regression:普通读取与 include-archived 对同一活动任务给出相反的可执行候选,读者可能据此反复选择被实际准入拒绝的工作。 未执行 PostgreSQL 集成套件、安装版或真实运行中 Goal 的更改;没有测试任何实际越权执行,不能把投影错误说成写入校验已被绕过。

复用原 canonical 读取与 registry 比较 owner 是合适的;包含归档仅应扩展记录集合,不能复用会关闭活动任务验收投影的历史模式。 本 PR 是现有 Todo 查询和 registry 健康只读投影的局部修复;修复 retained 语义复用并补齐混合活动/归档负例后,按新 head 复审。 最有价值的局部整理是给归档选择与历史展示各自清楚的语义,保留现有单一验收 owner;不要求额外平台迁移或等待 CI。未执行 merge、dismiss、resolve 或安装升级。

English verdict: REQUEST_CHANGES — head f89d2d5bec02bb6d05db7ada9d7fb2bfba92baaa; retain active acceptance guards and executable-lane semantics when including archived records. The archive and single-Goal health fixes work, but the mixed current/history read regresses on real File and SQLite CLI paths. CI was not consulted.

@loopx-agent
loopx-agent force-pushed the codex/personal-knowledge-workflow-20261103 branch 2 times, most recently from 412a978 to 6ad6b0c Compare November 3, 2026 07:31
loopx-agent added a commit that referenced this pull request Nov 3, 2026
Preserve both navigation and digest-order recovery tests from PRs #7932 and #7965. Reuse the Windows-only regression-budget calibration already proposed in #7969; production transport and semantic growth guards remain unchanged.

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.

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

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

[P2] 包含归档时仍须保留活动 Todo 的当前验收限制。 当前 read_transaction.ts:22 将 include_archived=true 同样解释为 retained=true;下游因此不仅纳入归档,还跳过活动行的 goal_acceptance_guard、当前 acceptance contract 和 standing-decision 投影。在真实 File 与 SQLite CLI,同一个未绑定活动 Todo 在普通列表中不可执行,加入 --include-archived 后进入 executable backlog;改过正文而 stale 的两个活动任务也从0个可执行变成2个。--status open 仍复现,证明问题不只是归档行展示。请将“纳入归档”与“历史评价模式”分开,在同一 typed projection 保留活动行的当前限制,并加入混合查询回归。实际 claim 仍拒绝未绑定工作;本轮没有证明写入权限绕过。

动机 / Motivation

操作者需要一次查看当前与已归档工作,也需要准确区分 registry 文件被触碰和 Goal 实质变化。旧版 canonical read 在 --include-archived 下遗漏归档行,单 Goal source registry 只因 mtime 新于 synced_at 就出现 stale 告警。本提案确实修复这两条可见问题,但恢复行完整性不能损失当前工作资格。

完整审查 head 为 8304ce60b575a6870672293a0da933e4284770b3,不可变基线 1b37e2e6e0ea77b9bd405cf9a5ef5fcd8557e92e。当前版本另包含 Windows settlement recipe 和 crowded JSON allowance 改动,均按完整差异审查,没有沿用旧头结论。这里不认证实际 Host/模型采用、完整费用或任何合并、安装权限。

实际 File/SQLite 对照确认:归档行恢复,但混合查询丢失当前活动验收限制,stale 状态的可执行计数由0变成2。

改动思路 / Approach

归档纳入应由既有 canonical read projection 处理,验收资格继续来自同一 canonical snapshot 和 acceptance owner;这两件事不需要成为一个隐式历史模式。最小修复是在现有 typed owner 内区分选择范围与评价语义,无需新读器、新状态或改写 acceptance authority。

registry 部分复用现有 sanitize、attention override、唯一匹配及 source cache,只取消单条来源不能进入语义比较的早退,范围相称。Windows 部分在既有 settlement renderer 按平台省略不支持的页输出参数;JSON allowance 是测试回归预算,不是 production transport limit。这些边界各自能解释,但归档修复仍遗漏同一用户旅程的资格保持,不应由另两项通过抵消。

具体改动 / Changes

先读的独立依据包括基线版本 Goal acceptance §3.8、status data contract、canonical registry source witnesses 与 Todo detail ordering/freshness,spec_revision 均为 1b37e2e6e0ea77b9bd405cf9a5ef5fcd8557e92e。并先完整读取 旧头具体变更请求,其 head 为 f89d2d5bec02bb6d05db7ada9d7fb2bfba92baaa。当前证据重新执行;旧评论不是本轮验证。

条款映射(本次审计标签):archive-completeness 完整纳入归档已实现;registry-witness 单 Goal unchanged/drift 区分已实现;active-acceptance 当前活动验收限制未满足;历史模式、scope 和只读事实在相应有界案例保留。仓库经验仅被采用为“从真实用户结果和较小修复判断”的方法,没有继承 verdict 或虚构记忆收益。

完整六文件 +125/-7:生产四文件 +18/-7,原测试两文件 +107。没有新增持久字段、词汇、capability 或新 provider。

关键代码讲解

  • readCanonicalTodoProjection 从实际 provider 收齐 canonical rows、acceptance 和 guards,再将 query 送入投影;第22行把普通混合查询升级为 retained,是本次回归入口。
  • projectCanonicalTodoFields 是既有消费者:retained 同时决定归档纳入、guard 附加、contract 和 standing decision,说明不能把该参数当单纯列表开关。
  • _multi_goal_source_entry_unchanged 仍拒绝空、重复、嵌套来源和无法读取,仅允许唯一原始 Goal 的语义快照比较;函数名虽沿用 multi_goal,新的单 Goal 调用没有另造规则。
  • build_turn_scoped_cli_settlement_plan 只在 POSIX recipe 带 --max-page-output-bytes 64000,原 Goal/Agent/Turn/Todo、execute 及扣额义务仍保留。cli_output_budget.py 只将 crowded JSON 测试 allowance42500→43000,未压缩指令、改 collection growth 或 production hard limit。

独立真实 CLI 从合成的实际 File/SQLite authority 配置 owner acceptance:一个 ready、一个 unbound 活动 Todo 和一个归档 Todo;再通过真实 update 使绑定 stale,真实 owner reconfigure 收窄范围,最后 disable。没有伪造 guard 或 mock provider。

同一 canonical 状态 Base 当前 head
普通列表 两个活动行,保留 ready/unbound 同左
include_archived 遗漏归档;活动限制保留 归档恢复;活动限制与 contract 消失
stale 后普通列表 executable=0 executable=0
stale 后 include_archived executable=0 executable=2
status=open 加 include_archived 活动限制保留 仍丢失限制
独立 completed_history API 仅返回归档 done 同左
checks disabled 活动行不带验收限制 保留;混合查询另纳入归档

真实 claim 在两 provider 都以 goal_acceptance_unbound 拒绝,前后 acceptance inspect、registry 和 state 不变;重复 list 也不改上述事实。exact archived detail 仍可读,Agent scope 没有逃逸。恢复后列表已看见 owner 的新 scope,但本轮没有把该列表观察冒充模型已续做工作。

对主干的风险 / Risks

这是调度输入的错误事实:调用者本来只是补看历史,却收到未确认工作可执行的摘要。新归档用例没有配置 acceptance,40项 TS tests 也没有覆盖这个 mixed guard 分支,因而套件通过不能反驳首段。最小回归应以同一 canonical head 对照普通、mixed、status=open、exact archive、scope、stale/rebind 和 disabled,要求活动资格不因纳入历史而改变;历史专用模式维持其独立语义。

另8项独立 registry 对照确认:只有 unchanged 单 Goal 的误报消失;status/state 真变化、空、重复、嵌套、不同 Goal 和损坏来源均保留 stale/unknown,读前后源字节不变。平台 builder 的成对完整 recipe 仅在非 POSIX 分支省略页参数;本机真实 crowded quota JSON 两端均42277字符。完整载荷对照保留路径衍生 identity、观察钟及回执差异,指令条款没有被预算修改删减。原注释中的 native Windows 数字仍是作者来源,本轮没有执行原生 Windows,不以 mock 分支认证平台。

PASS:40项 typed read/archive/identity tests、变更 Python Ruff、diff advisory、standard premerge6direct+10catalog+8risk,0blocking。focused Python 原始结果为 87 PASS/1 FAIL/1 Windows-only SKIP;同命令不可变 base为83 PASS/3 FAIL/1 SKIP,其中两条归档遗漏失败被修复,提示文案大小写/措辞断言在两端原样失败。保留这一 FAIL,不称 focused 全绿。维护性 ratchet 亦保留既有 advisory;它与当前 mixed-query 反例无关。当前 exact-scope CQR cqr_1e83f9a6b06cc738ea87 为 FAIL,具体 blocker 和必需验证失败均保留。未获取、轮询或等待 CI,未执行 PostgreSQL;已有两个真实 provider 的确定性反例足以阻止批准,不冒称所有后端已资格化。

语义与 CI 对齐

现有 guard 是机器强制的当前验收约束,不能因返回历史数据便降为建议。此处无新 default-off 能力;include_archived 是显式选择范围,不是停用验收的授权。差异 advisory 未发现受支持的新词汇,仍无法自动识别这次既有布尔参数的语义耦合;需要上述反例修复。Windows renderer 的平台运输差异和测试 allowance 扩大应在最终 PR 描述中明确披露。

我的整体评价 / Verdict

REQUEST_CHANGES。 registry 修复与归档完整性都有实际增量,机制总体不需扩张,但当前完整提案尚未交付“看见历史且保持当前资格”的同一可用旅程。请只在既有投影拆开两种语义并补混合限制回归,重跑两个真实 provider、原 archive/registry/settlement 模块及 premerge;不要求修复无关历史文案、迁移所有语言或提前完成父 Goal。

长程与用户体验在该分支发生回归:原有入口没有多一轮确认,却会把不具资格的工作交给后续选择,可能造成拒绝/重试或错误规划。隐式取消限制不能作为省操作的理由;应由原 authority 生成正确投影,用户无需额外设置。已检查现有 CLI、Todo read 和 summary 消费路径;没有渲染组件、布局或首屏变更,visual_review 不适用,视觉未验证范围为 none。真实 Host/模型采用、原生 Windows、长期完整成本仍未验证;本评论不执行合并、dismissal、安装或切换。

English verdict: REQUEST_CHANGES — 8304ce6. Real File/SQLite CLI confirms include_archived removes current active-work acceptance guards and misprojects unbound/stale work executable. Registry drift handling improves; local premerge passes, but the independent mixed-query regression and exact-scope quality fail. Preserve active semantics while including archives; no write-authority bypass is claimed.


const projected = await projectCanonicalTodoFields({...input, todos, retained: requireJsonObject(input.query ?? {}, "Todo query").read_scope === "completed_history",
const query = requireJsonObject(input.query ?? {}, "Todo query");
const retained = query.read_scope === "completed_history" || query.include_archived === true;

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.

[P2] 纳入归档不能停用活动任务的当前验收。这里把 include_archived=true 也设为 retained,下游会跳过活动行 goal_acceptance_guard 和当前 contract。独立真实 File/SQLite CLI 中,owner 配置验收后,普通列表保留 unbound/stale 限制;同一 canonical 状态加 --include-archived(甚至再加 --status open)后限制消失,stale 的 executable backlog 从0变2。实际 claim 仍拒绝,故不声称写入绕过。请在既有 typed projection 分开 archive membership 与 retained-history evaluation,保留活动 guards/contracts/standing decisions,并补普通/混合/status-open、stale/rebind、disabled 与 exact-history 对照。

…nd prevent single-goal stale registry false positives

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

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@huangruiteng
huangruiteng force-pushed the codex/personal-knowledge-workflow-20261103 branch from 8304ce6 to 7861977 Compare November 3, 2026 14:20
Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng
huangruiteng force-pushed the codex/personal-knowledge-workflow-20261103 branch from 7861977 to b52d549 Compare November 3, 2026 14:22

@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-5 · OpenAI · self_reported

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

动机 / Motivation

维护者和 Agent 在排查当前工作时,需要一次读回活动 Todo 与已归档历史;此前 --include-archived 会丢归档行,而恢复归档的中间实现又错误地关闭了活动工作的验收限制,让受 guard 的工作看起来可执行。单 Goal 项目还会在 registry 仅被触碰、内容未变时反复产生 stale 告警,Windows settlement 命令也会携带不可用的输出预算参数。修复后,同一查询既能看到历史,又保留当前验收事实;健康检查只在实质变化时报 stale;平台命令只渲染该平台支持的参数。本次不扩展 provider、权限、存储或 PostgreSQL 契约。

改动思路 / Approach

Enter 点仍是现有 Todo typed reader 和 query selector。canonical provider 给出的 todos、acceptance contract 与 work guards 是唯一事实源;include_archived 只决定结果集合是否加入归档行,read_scope=completed_history 才决定进入历史评价模式。这样活动行继续经过同一个 guard、standing decision 和 executable-lane owner,不需要新读器或第二套资格规则。

registry 健康继续复用原有 sanitizer、唯一目标匹配和完整内容比较,只允许单 Goal 来源也进入同一比较。settlement 继续复用 build_turn_scoped_cli_settlement_plan,仅按现有平台能力决定是否附加 --max-page-output-bytes。三者都复用既有 owner,没有引入新的状态或第二套决策路径。本 PR 只修复读取投影、健康比较和平台命令渲染,不扩展 provider、权限或存储契约。

具体改动 / Changes

相对 cf9b20cd2d11b996c633ad8dd0088df454262353,本 PR 修改 7 个文件(+225/-5):四个生产文件只改选择语义、健康比较与命令渲染,三个测试文件覆盖 File/SQLite 混合历史、registry 未变/实变以及 POSIX/非 POSIX settlement。没有新增字段、协议版本或持久状态。

规范依据为 docs/architecture/rfcs/shared-goal-alignment-and-governed-amendment-v0.md,spec_revision=cf9b20cd2d11b996c633ad8dd0088df454262353。其中 3.8 要求当前可用性通过既有 typed guard 暴露,历史与当前资格分开判断;本 head 以 read_projection.ts:194 和真实 File/SQLite 回归实现该条。cf9b20cd2d11b996c633ad8dd0088df454262353 同时是本次规范的不可变基线。

关键代码讲解

  • read_transaction.ts:15 的 includesArchivedRows 只统一“当前查询是否纳入归档行”的判定;readCanonicalTodoProjection 在 read_transaction.ts:18 仍把 retained 单独绑定到 completed_history,避免选择历史记录时改变活动行评价。
  • read_projection.ts:194 的 projectCanonicalTodoFields 把行收集条件改为 includeArchived || !archived,但 guard、当前 acceptance contract 与 executable-lane 仍只看 retained,因此 repaired path 保留活动资格。
  • global_registry_health.py:34 的 _multi_goal_source_entry_unchanged 删除“单 Goal 不得比较”的早退,继续要求唯一匹配、非嵌套来源和完整 sanitized 内容相等;mtime 更新本身不再制造 stale。
  • effect_program.py:181 的 build_turn_scoped_cli_settlement_plan 按平台决定是否附加页输出参数;POSIX recipe 保持不变,非 POSIX 不再生成会被拒绝的选项,其余扣额与回写义务不变。

对主干的风险 / Risks

最强的剩余回归场景是把 include_archived 再次当作历史评价开关:此时活动 bound/unbound Todo 会失去 goal_acceptance_stale / goal_acceptance_unbound guard,错误进入 first_executable_items。本 PR 在 read_projection.ts 与 read_transaction.ts 的交界处阻止该路径;新增测试同时断言归档行存在、held_todo_ids 正确、first_executable_items=[] 且每个活动项 allowed=false。

独立回归敏感性验证使用了同一份新测试:把测试应用到不可变基线 cf9b20cd2d11b996c633ad8dd0088df454262353,File/SQLite 两项均因归档行缺失失败;应用到中间实现 80c8479e1ed35fb279e2c27585eeec6ce9fc448b,两项均因当前 contract 消失失败;应用到当前 head b52d549f72103b97aca7382cdedc17aba295f641,26 项全部通过。该测试走真实 File 与 SQLite authority store,不伪造 guard。

registry 的负向对照仍要求 status 实变产生 stale;settlement 的双分支测试仍断言 POSIX 保留、非 POSIX 省略该参数。风险边界是:本次没有执行原生 Windows、没有运行 PostgreSQL 集成套件,也没有证明 write/claim authority 被绕过;新增证据只覆盖读取投影、registry 健康与命令模板。

标准 premerge 通过:6 个 direct checks、10 个 catalog canary、8 个 risk smoke;维护性 ratchet 是已披露的继承 advisory。focused Python 为 87 passed、1 skipped、1 failed;唯一失败在当前 head 与不可变基线都能以同一大小写文案断言复现,与本 PR 因果路径无关。按 managed policy 未查询或等待 CI。

语义与 CI 对齐

差异复用既有 include_archived、read_scope 与 acceptance guard 词汇,不新增公共词汇或执行授权。行为变化是把此前错误折叠的两个选择维度重新分开:归档行成员关系只影响可见集合,历史模式才影响历史评价。这个变化与 3.8 的“历史完成与当前可用性分开”一致。

我的整体评价 / Verdict

APPROVE。 当前精确 head 未发现阻塞项。长期任务维度改善:混合历史读取不再让后续选择看到虚假的可执行工作量,也减少因未变 registry 反复触发的维护噪声。用户体验维度改善:维护者可一次看到当前与归档 Todo,同时仍得到真实的验收和健康状态;没有新增确认轮次或设置。视觉评审不适用,因为只改 typed projection、CLI 命令模板与健康比较,没有渲染组件或首屏布局变化。

未来维护上,新增 helper 只消除了两个调用点重复的归档行判定,没有引入兼容层或新持久契约。没有发现需要现在简化的重复实现:三处修改分别属于 Todo projection、registry health 和 settlement rendering。复审所需的剩余证据只有原 PR 的维护者合并判断;本结论不授予合并权限。

English verdict: APPROVE — head b52d549f72103b97aca7382cdedc17aba295f641 preserves active acceptance guards while including archived Todos, fixes unchanged single-Goal registry warnings and non-POSIX settlement rendering, and passes the File/SQLite regression plus repository premerge. No blocking finding remains.

@huangruiteng
huangruiteng merged commit 7ea158b into main Nov 3, 2026
22 of 28 checks passed
@huangruiteng
huangruiteng deleted the codex/personal-knowledge-workflow-20261103 branch November 3, 2026 14:36
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.

2 participants