Repository navigation
docs(semantics): define reserved cancellation and custom decision scopes - #6313
Conversation
…pe treatment Signed-off-by: song <liusongstep@gmail.com>
songoow
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)
动机
维护 settlement 和编写用户决策 gate 的开发者,需要知道词表中 cancelled 与 other 应当怎样使用,而不能把“解码器接受”当作真实生产路径。原记录明确保留两项未决含义:cancelled 没有内部生产者,other 没有编写准则。沿用这个空白,后续维护可能误把 Host 取消当作 settlement 已无副作用,或把 other 当成跨权限兜底。本批给出可评审的 reader 保留规则、退出条件和 custom scope 编写约定,并以真实 IPC、CLI 与持久 Todo 读回验证兼容边界。本次不新增取消实现、不改变权限匹配、不扩大词表或形式证明范围,也不把处置提案当作 issue 已关闭。这两项仍需 owner 接受并集成;#6270 来源清单和最终集成 revision 的 passed/failed/untested 验收继续保留。
改动思路
复用既有 compatibility_only 元数据与原 decision-scope 协议,把值的使用意图放回既有 owner;运行时仍由原 TS 匹配和 settlement decoder/bind 决定,不新增推断器。当前 PR 是 #4447 原范围内的两项具体处置和见证;owner 接受、主干集成和最终关闭保持独立,不将未来取消功能或全树证明追加为关闭前提。最强反对理由是把未知改名为 compatibility 可能只是美化报表。本批没有声称找到了 cancellation producer,没有新增 F1/F2 覆盖,也没有证明历史使用;它明确选择保留已接纳的 wire 输入,并公开列出替代这一保留决定所需的取消契约或版本化迁移。other 的准则属于作者选择规范,运行时仍只执行类型、key、granularity、recipient 和 target 匹配,不通过任务文字猜权限。
具体改动
关键代码讲解
评审完整 head f1b6194631395304ff2542644c4c0e2a0e4d581e,源码基线 323c3053128e41e16df27e6b6498f83c37e81f5e。任务规范 https://github.com/loopx-project/loopx/issues/4447,所读 issue body 的不可变内容指纹 sha256:6c5e1c20f8b99fe1ede55e4c09b446b6a1b02fac9d66df0987b6e933503ccbed;原编号为 2a、2b、Stage 3。
- 2a:
loopx/semantics/vocabulary_v0.json中仅更新 cancelled 的 value_note 并新增已有结构 compatibility_only 的 reason/retirement。值集合和 owner 不变。test_reserved_cancelled_envelope_retains_prior_commits_and_failure_details经真实 settlement.bind_gate IPC 和 Python decoder,保留 durable_writeback/quota_spend 的 committed receipts、failure details,且 execute=false。原 bind 短路测试还证明后续 callback 不调用。这是 reader 证据,不能充当真实取消 producer。 - 2b:既有
decision-scope-v0.md增加 other 选择准则与利益冲突声明审核的通用例子。不能用它代替 private_read/write_scope/resource/production/public_claim/direction;不同 custom key 也不同。新 CLI 作者路径与原 complete_goal_todo 真实完成一个 custom gate,独立读回剩余 custom review 和 public_claim 两项要求;拼错的 kind 拒绝且状态字节不变。原生 TS 还检验 other:global:* 对六个命名 kind 都不能跨覆盖。 - Stage 3:双语 ledger 记录待审处置、取消保留的退出条件和验收边界;旧 unresolved 历史不追改。两份 RFC 只链接该记录,生成的 STATUS 仅将 ledger 数从5更新6;生成 glossary 增加一行兼容保留标识。#6270 清单不重复复制,最终集成接受仍未宣称。
对主干的风险
没有 Python/TypeScript 生产源码变更。真实相同 CLI/IPC probe 在独立323c305基线和候选上均通过,输出观察与四个相关运行时源码哈希完全相同。新文档改变的是后续作者如何选择 other、维护者如何处置 cancelled:使用 named kind 的优先级、未知输入拒绝、无自动权限和未知 provider effect 必须由原 owner reconcile 均明确保留。没有把既有未知效果重分类为已取消。
144项 Python、35项 TypeScript、Ruff/typecheck/docs 和最终19项 premerge全部通过。隔离复制实际 TS owner,移除 kind equality 后,新的独立断言以 ERR_ASSERTION 失败;不是 import/setup 错误。初次 docs/semantic 检查分别发现 STATUS 与 glossary 过期,按既有生成器更新后通过,未降限额或改校验器。另以结构化对照确认26项、所有值/owner/source enrollment/formal domains/ratchets不变;F1/F2仍6/26。
语义与 CI 对齐
语义变更被公开声明:cancelled 是保留的已接纳输入,不证明历史 producer、effect absence 或安全重试;other 是显式 custom authoring,不是 parser fallback。准则由作者负责,机器执行的匹配和批准消费仍为原 typed owner;没有 substring/prose 运行时分类。公开默认行为、prompt、CLI/前端/Lark 和持久 receipt 形状不变。没有 storage refactor、真实取消、模型、部署或 installed UI 资格声明。远端 CI 诊断与维护者合并独立。
我的整体评价
APPROVE,作为可逆且明确待 owner 接受的处置提案。long_horizon preserved:实际运行和 replay 行为不变,已提交证据不被取消输入抹除;user_experience preserved:现有作者/消费路径未增加步骤,新增规则帮助选择值,但不声称实测用户收益。12路径+259/-4,多数是配对 ledger、原协议和生成投影,三处薄见证复用现有 helper;没有独立 smoke 框架或虚构生产者。相邻收敛沿既有 metadata/owner 完成,删除原值或新增 cancellation 生命周期都属于本批之外的不同决定。本评审不替代 owner 接受或 #4447 最终关闭。
English verdict: APPROVE - f1b6194. This makes the two original value dispositions reviewable without changing runtime behavior or enlarging proof coverage. 144 Python, 35 TS, kind-isolation mutation, identical baseline/head real-path observations and 19 premerge checks passed. Maintainer acceptance/integration and final #4447 closure remain separate.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · xhigh
动机
维护取消回执和编写审批依赖的开发者。 现有解码器接纳 cancelled,但没有内置取消生产者;other 也可填写却缺少选择规则,容易被误当成已停止外部效果或通用权限。 本提案补齐两项处置说明,并验证取消输入保留历史提交、自定义批准不消费同键的命名权限。 不新增取消运行时、权限、词表值或全树证明,不声称 owner 已接受或 issue 已关闭。 维护者对处置的接受、当前来源清单及最终集成版本验收仍待完成。
改动思路
复用原词表元数据、decision-scope 协议和 TS 匹配/回执 owner;不为未找到的生产者另建取消机制,不以任务文字推断权限。 本 PR 是原有语义收敛任务中可独立评审的来源处置提案及薄见证;正式集成和最终任务关闭独立。 最强反对理由是将未知值改名为兼容保留,可能仅让报告变漂亮。本提案明确选择保留已经接纳的输入,给出取消契约或版本迁移的退出条件,仍承认无内置生产者、无历史使用证明,也不增加形式证明覆盖。审批 kind 的选择属于作者规范;机器继续执行已有类型、键、收件人与目标规则。
具体改动
完整 head f1b6194631395304ff2542644c4c0e2a0e4d581e,基线 323c3053128e41e16df27e6b6498f83c37e81f5e。独立依据变更前 docs/reference/protocols/decision-scope-v0.md 的 Fields、Approval Consumption Lifecycle 和 Standing Approval Receipts;同时核对原语义 RFC 的 Roles of a vocabulary / State model and schema 兼容保留规则及 #4447 的当前 Stage 2a/2b、Stage 3 边界。改后的规范不能自行证明过去已有 owner 批准。
关键代码讲解
vocabulary_v0.json仅改 cancelled/other 的说明,并使用既有 compatibility_only reason/retirement。结构对照确认 26 项、值、owner、producer enrollment、formal domain 和预算均不变。生成 glossary 多一行兼容保留;两份 STATUS 仅更新 ledger 数量。- 新双语 ledger 和原 RFC 链接给出待审处置。cancelled 是传入失败,必须保留之前已提交 receipt,不能证明 dispatch 后效果停止、安全重试或自动回退。替代规则要求真实取消契约和见证,或版本化 reader 迁移;旧 unresolved 历史不回写。
test_reserved_cancelled_envelope_retains_prior_commits_and_failure_details:553通过真实 settlement.bind_gate IPC 与 decoder 验证短路、提交和 details。原SettlementResult.bind继续在 execute=false 时跳过下一 callback;这不是生产者证据。test_custom_gate_consumes_only_its_explicit_custom_requirement:370沿 CLI 作者入口和实际 Todo 完成/持久读回,仅移除匹配 custom。原decisionScopeCovers:22始终要求相同 kind,新增 TS 测试证明 other:global:* 不能覆盖六个命名 kind,拼错仍拒绝。Fields 的明确声明、Approval Consumption Lifecycle 的精确消费和 Standing Approval Receipts 的既有边界全部保留。
对主干的风险
独立更强反例将 custom 与 public_claim 配成同一个 scope_key;真实 CLI 完成 custom 后,命名权限及另一 custom 仍未消费。相同脚本在冻结基线与 head 的观察完全一致,取消 prior receipt/details 同样保留。隔离复制真实 TS owner,仅移除 kind equality,再走同一真实 CLI:断言因 public_claim 被错误消费而失败;原 head 通过,未用导入失败充当反例。四个相关运行时 owner 字节相同。
独立 71 Python、10 TS 通过;native premerge 4 direct +19 selected 全通过。初次缺少 npm dev dependencies 的语义检查失败保留,安装既有 lockfile 依赖后重跑通过,未改源码/预算/断言。早期私有基线探针使用了错误 cwd,保留该记录并以读取 revision=323c 的最终同脚本对照替代;不继承作者 144/35 计数。没有 storage refactor、取消执行、付费模型或安装态 UI 资格声明。
语义与 CI 对齐
选择说明和保留承诺是公开声明的有界语义处置,仍待 maintainer 接受/集成;kind matching 与 membership 是原 machine contract,不是新的自然语言分类器。可见文档、生成投影和三个薄测试在同一批次对齐,完整 semantic check 通过;历史未知记录、F1/F2 六项域和其它 issue 验收保留。未查询或等待 CI。
我的整体评价
APPROVE,无阻断发现,批准这份可审查处置提案。复用原词表元数据、decision-scope 协议和 TS 匹配/回执 owner;不为未找到的生产者另建取消机制,不以任务文字推断权限。 本 PR 是原有语义收敛任务中可独立评审的来源处置提案及薄见证;正式集成和最终任务关闭独立。 long_horizon preserved:提交历史与权限消费不变,没有新取消框架或自动重试;user_experience preserved:现有作者/审批路径没有增加机器步骤,新增规则使意图可解释,未声称实测使用收益。12 文件 +259/-4,大部分为配对说明/生成投影,生产源码不变;相邻整理沿现有 owner 完成,没有需要本批新增的结构层。维护者对处置的接受、当前来源清单及最终集成版本验收仍待完成。
English verdict: APPROVE - f1b6194; explicit reservation and custom-authority authoring remain bounded proposals. Independent real CLI/IPC baseline parity, same-key cross-kind mutation rejection, 71 Python/10 TS tests and 4 direct/19 selected checks pass. Maintainer disposition/integration and final issue acceptance remain separate.
Two values in #4447's original 26-entry source inventory still lack an explicit disposition. This proposes one in the existing registry and contracts, with actual reader/lifecycle evidence:
cancelledas a reserved admitted input, with a recorded compatibility rationale and exit condition. There is still no identified built-in cancellation producer. The value must preserve earlier receipts and short-circuit bind; it does not prove an in-flight effect stopped or grant retry authority.otheras an explicitly authored custom approval only when none of the six named kinds fits. Unknown kinds still reject; evenother:global:*cannot cover a named kind. Real CLI authoring/completion verifies that an unrelated custom requirement and named publication permission remain unresolved.No runtime code, wire values, owner symbols, producer enrollment, formal domains or budgets change. The generated glossary and bilingual RFC status index reflect the explicit reservation and new bilingual ledger entry. Existing historical unresolved records remain intact.
Validation: 144 Python and 35 TypeScript tests pass, including native IPC/decoder and actual Todo CLI/lifecycle readback. Removing kind equality in an isolated source mutation makes the independent test fail. The same real-path probe on the immutable baseline and candidate has equal observations and runtime source hashes. Ruff, typecheck, docs and full semantic checks pass; all 19 final premerge checks pass. Initial index/glossary freshness failures were resolved by their normal generators; no policy or budget was relaxed.
These are proposed owner dispositions for review/integration, not an assertion of prior maintainer approval or #4447 closure. The current source inventory in #6270, final integrated revision and explicit passed/failed/untested acceptance remain required. No cancellation runtime, deployment or live-model qualification is introduced.
Refs #4447