Skip to content

Preserve Todo validator whitespace in Markdown projection - #8722

Merged
loopx-agent merged 1 commit into
mainfrom
codex/audit-todo-validator-metadata-pr-20261114
Nov 14, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/audit-todo-validator-metadata-pr-20261114

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Canonical Todo projection now preserves the exact whitespace in a declared validator command, argument array, and label. Previously the Markdown writer compacted those values and made the readback differ from the declaration digest. A declared multiline command could then leave creation or completion stuck with a pending projection.

The projection percent-encodes the original values and keeps the existing representation for other metadata. File and SQLite are covered through the native CLI. Thirty-seven tests and the quick premerge checks passed.

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

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

评审提交 45c32e4921d3e314553c8af554a6fc89e5d15fd5;基线 78e936f9d1f1a00505c4026ee0a5857de95cee27。

动机 / Motivation

给待办配置验收命令的维护者和随后完成待办的人会遇到这个问题。 例如把一个含换行、缩进和两个连续空格的 Python 命令用于任务验收:旧版本能在 CLI 查到它,却不能把任务交付到原有 Markdown 视图。现在同一命令完成后,声明、结果与独立读回一致。 在 File 和 SQLite 上用同一操作创建含多行验证器的待办,基线已提交权威记录并返回成功,但 Markdown 投影仍 pending;同一操作重试也补不回这条待办。 候选让 Markdown 恢复该待办和原始声明,文本和 argv 路径都按原内容执行;验证失败仍保持待办开放,完成回放不会重复执行。 覆盖本地 File、SQLite 和源 checkout 的 packaged Chat HTTP;PostgreSQL 只运行独立 16.15 存储集成套件,未声称 App、飞书或 PostgreSQL 服务已端到端测试或部署。未查询托管 CI。

改动思路 / Approach

TS 的 Todo transaction、provider CAS 和私有声明存储继续决定是否能执行及完成,Python 只修字段往返。 仅修现有 Markdown 格式的可逆性;扩展同一字段表比开第二种元数据格式或回退到从显示层取得执行权限更窄。 当声明含程序及参数时,换行和连续空格属于输入;普通说明仍可压缩。把这条规则放在现有字段表,既修好写入和读取的两端,也保留原有摘要比较与失败路径。复用现有声明、命令和权限;无需通用的第二套编码迁移。

具体改动 / Changes

关键代码讲解

字段声明 只给命令文本、argv 和标签保留空白。百分号编码让换行、制表、Unicode 和注释界定符仍留在单行;空白命令不成为可执行声明。解析 按同一字段表反解,其他元数据保留旧压缩;格式化 和列表更新共用规则,老的紧凑文本继续可读。HTTP 完成与回放 以真实两种 provider 检查预览、完成、原文读回和同一操作只运行一次。按 项目待办合同 和 原完成事务,原声明与摘要、成功、拒绝与重放、没有验证器的原路径三项均已验证。

对主干的风险 / Risks

相同探针在真实 File/SQLite 都先观察到基线提交了相同摘要、仅显示待处理,再观察候选读回完整声明。正例验证字面输出和一次执行;反例返回非零仍可读且保持开放,预览零执行,无验证器的完成顺序不变。公开 CLI 只显示摘要、不显示命令;私有 Markdown 仍受原读写权限约束。最新主干的本地 merge-tree 计算无冲突。

语义与 CI 对齐

精确头 37 个主回归、33 个验证器用例、18 个本地 standard canary 和真实 PostgreSQL 16.15 上 397 个存储用例通过。 PostgreSQL 结果覆盖 provider 层;不同使用入口的行为以 File/SQLite CLI 与 packaged Chat HTTP 的证据为准。无新共享状态词或权限,已有字段和终态合同继续生效。托管 CI 未查询。

我的整体评价 / Verdict

批准此精确 head 的独立评审。带真实命令的待办现在可以持续推进并在原界面读回;旧版本中相同操作反复 pending 的情况已用独立探针消除。无需同时重构权威存储或打包前端。覆盖本地 File、SQLite 和源 checkout 的 packaged Chat HTTP;PostgreSQL 只运行独立 16.15 存储集成套件,未声称 App、飞书或 PostgreSQL 服务已端到端测试或部署。未查询托管 CI。

English verdict: APPROVE at 45c32e4. File and SQLite preserved the exact declaration without rerunning completion; local and PostgreSQL store checks passed.

@loopx-agent
loopx-agent merged commit 36a0cbe into main Nov 14, 2026
42 of 48 checks passed
@loopx-agent
loopx-agent deleted the codex/audit-todo-validator-metadata-pr-20261114 branch November 14, 2026 09:37
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