Skip to content

Commit d3f84dc

Browse files
authored
Merge pull request #6313 from loopx-project/codex/semantic-reserved-meanings-20261012
docs(semantics): define reserved cancellation and custom decision scopes
2 parents 881e06a + f1b6194 commit d3f84dc

12 files changed

Lines changed: 259 additions & 4 deletions

‎docs/architecture/rfcs/STATUS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ appendix may keep dated history, but no dated log heading may precede it.
6161
| [RFC: Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.md) | Accepted | none | — |
6262
| [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | Accepted | none | — |
6363
| [RFC: Research Exploration Control Plane v0](research-exploration-control-plane-v0.md) | Accepted | none | — |
64-
| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [5 entries](ledger/semantic-vocabulary-convergence-v0/) |
64+
| [RFC: Semantic Vocabulary Convergence and Commit-Time Drift Checks (v0)](semantic-vocabulary-convergence-v0.md) | Accepted | none | [6 entries](ledger/semantic-vocabulary-convergence-v0/) |
6565
| [RFC: Shared Goal Alignment and Governed Amendment Protocol (v0)](shared-goal-alignment-and-governed-amendment-v0.md) | Accepted | none | [2 entries](ledger/shared-goal-alignment-and-governed-amendment-v0/) |
6666
| [RFC: LoopX Shared Control-Plane Authority and Pluggable State Providers (v0)](shared-goal-authority-state-provider-v0.md) | Accepted | none | [24 entries](ledger/shared-goal-authority-state-provider-v0/) |
6767
| [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | Accepted | none | — |

‎docs/architecture/rfcs/STATUS.zh-CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
| [RFC:Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.zh-CN.md) | 已接受 | 无 | — |
5959
| [RFC: Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | 已接受 | none | — |
6060
| [RFC:研究型探索控制面 v0](research-exploration-control-plane-v0.zh-CN.md) | 已接受 | 无 | — |
61-
| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [5 条](ledger/semantic-vocabulary-convergence-v0/) |
61+
| [RFC:语义词表收敛与提交期漂移检查(v0)](semantic-vocabulary-convergence-v0.zh-CN.md) | 已接受 | 无 | [6 条](ledger/semantic-vocabulary-convergence-v0/) |
6262
| [RFC:共享 Goal 对齐与受治理 Amendment 协议(v0)](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md) | 已接受 | 无 | [2 条](ledger/shared-goal-alignment-and-governed-amendment-v0/) |
6363
| [RFC:LoopX 共享控制面权威与可插拔状态 Provider(v0)](shared-goal-authority-state-provider-v0.zh-CN.md) | 已接受 | 无 | [24 条](ledger/shared-goal-authority-state-provider-v0/) |
6464
| [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | 已接受 | none | — |
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Reserved settlement input and custom decision-scope disposition
2+
3+
Source baseline: `323c3053128e41e16df27e6b6498f83c37e81f5e`.
4+
Refs [#4447](https://github.com/loopx-project/loopx/issues/4447), original
5+
Stage 2a/2b source treatment and Stage 3 owner disposition. This is a concrete
6+
proposal for review and integration, not a record of an earlier maintainer
7+
approval. It does not close the issue or replace the 26-entry inventory in
8+
[#6270](https://github.com/loopx-project/loopx/pull/6270).
9+
10+
## `settlement_failure_kind.cancelled`
11+
12+
Keep `cancelled` as a reader-reserved wire value in the existing vocabulary.
13+
The Python and TypeScript decoders already admit it. Current built-in settlement
14+
branches do not produce it; cancellation in Host, chat, lease or usage contracts
15+
must not be counted as its producer. No new runtime cancellation mechanism is
16+
introduced to make the value appear live.
17+
18+
The existing `compatibility_only` metadata now states why that admitted input
19+
is retained and the exit condition. This is a compatibility commitment, not
20+
proof that any historical producer emitted the value. A supplied `cancelled`
21+
envelope remains a failure: bind must stop before the next callback and preserve
22+
prior receipts and failure details. It neither erases an already committed
23+
step nor proves an in-flight provider effect stopped. It grants no automatic
24+
retry, rollback, resume or quota authority. A provider outcome that is actually
25+
unknown continues to use its owning observation/reconciliation contract;
26+
`cancelled` cannot settle that uncertainty by relabeling it.
27+
28+
Replace the reservation only through one of these owner-reviewed changes:
29+
30+
- a real typed cancellation contract that distinguishes before-dispatch
31+
cancellation from ambiguous after-dispatch effects, with producer and real
32+
caller witnesses plus updated source treatment; or
33+
- explicit versioned reader migration/removal with caller and stored-envelope
34+
compatibility evidence.
35+
36+
There is no automatic expiry, invented external canceller, decoder narrowing,
37+
or forced vocabulary retirement. F1/F2 remains the existing six-entry domain.
38+
39+
## `todo_decision_scope_kind.other`
40+
41+
`other` is explicitly authored custom decision authority when none of the six
42+
named kinds describes the actual approval. Prefer a named kind whenever it
43+
applies; uncertainty about the intended decision is not a reason to select
44+
`other`. The existing task text explains the decision and a stable public-safe
45+
scope key identifies it for both gate and dependent work. See the
46+
[authoring rule and example](../../../../reference/protocols/decision-scope-v0.md#choosing-kindother).
47+
48+
For example, `other:action:study_conflict_review` may name an owner-required
49+
conflict-of-interest review. It is independent of private source access,
50+
resource spend, direction changes or public publication, which keep their
51+
named kinds. `other:action:study_method_review` is another custom decision,
52+
not a synonym or fallback.
53+
54+
Matching uses the same typed owner as every other kind. Exact kind is always
55+
required, so even `other:global:*` cannot cover a named kind. Key, granularity,
56+
recipient and exact Todo target rules remain intact. Unknown/misspelled kinds
57+
still reject; no parser fallback converts them to `other`. Declaring a kind is
58+
not approval: existing linked-gate completion or standing authority consumes
59+
only the scopes it actually covers.
60+
61+
## Evidence and remaining acceptance
62+
63+
Reuse the existing all-value settlement decoder, unknown-input and bind
64+
short-circuit witnesses. Extend their actual IPC/decoder path to preserve a
65+
supplied reserved failure with prior committed receipts and details; this is
66+
reader coverage, never internal producer evidence. Reuse existing Todo
67+
lifecycle helpers and native TypeScript matching to exercise a custom approval
68+
alongside a different custom requirement and a named permission requirement.
69+
Only the selected custom scope may be consumed. A broad custom scope cannot
70+
cover any named kind, and malformed input cannot become custom authority.
71+
72+
The registry still has 26 entries and the same values/owners. No budgets,
73+
formal proof domains, wire schemas, runtime defaults or persisted formats are
74+
changed. Tests alone do not approve these dispositions. Final #4447 acceptance
75+
still requires owner review/integration of this proposal, the current source
76+
inventory, and passed/failed/untested evidence on the final integrated revision.
77+
Earlier records of unresolved meaning remain historical; they are not rewritten
78+
as if this decision had already existed.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# 保留的 settlement 输入与自定义决策 scope 处置
2+
3+
源码基线:`323c3053128e41e16df27e6b6498f83c37e81f5e`。
4+
关联 [#4447](https://github.com/loopx-project/loopx/issues/4447) 原 Stage 2a/2b
5+
来源处置与 Stage 3 owner 决定。这是待评审、待集成的具体提案,不是先前维护者批准的
6+
记录;不关闭 issue,也不替代 [#6270](https://github.com/loopx-project/loopx/pull/6270)
7+
中的 26 项来源清单。
8+
9+
## `settlement_failure_kind.cancelled`
10+
11+
将 `cancelled` 保留为既有词表中 reader-reserved 的 wire 值。Python 与 TypeScript
12+
解码器已接纳它,当前内置 settlement 分支不产生它。Host、chat、lease 或 usage
13+
契约中的取消不能算作它的 producer;不会为了让值看起来存活而新增取消机制。
14+
15+
既有 `compatibility_only` 元数据现在说明保留这一输入的理由与退出条件。这是兼容
16+
承诺,不证明历史上真的有 producer 发出过该值。传入 `cancelled` envelope 仍是失败:
17+
bind 在下一 callback 前停止,保留之前的 receipt 和 failure details。它不抹除已提交
18+
步骤,也不证明在途 provider effect 已停止,不授予自动 retry、rollback、resume 或
19+
quota 权限。实际结果未知的 provider effect 仍由原 observation/reconciliation owner
20+
处理,不能通过改名为 `cancelled` 消除未知。
21+
22+
只有经过 owner 评审的以下变更可以替代该保留处置:
23+
24+
- 真实类型化取消契约,区分 dispatch 前取消与 dispatch 后不确定效果,提供 producer、
25+
真实 caller 见证并同步来源说明;或
26+
- 明确的版本化 reader 迁移/移除,具备 caller 与 stored-envelope 兼容证据。
27+
28+
没有自动到期、虚构的外部 canceller、解码收窄或强制词表退休。F1/F2 保持既有六项域。
29+
30+
## `todo_decision_scope_kind.other`
31+
32+
当六个命名 kind 均不能描述真实审批时,作者可显式选择 `other` 自定义决策 authority。
33+
命名 kind 适用时优先使用它;不清楚要决定什么时应澄清,不能猜测 `other`。既有任务
34+
文本说明 owner 要决定的事项,稳定 public-safe scope key 供 gate 和依赖工作共同使用。
35+
详见[编写规则与示例](../../../../reference/protocols/decision-scope-v0.md#choosing-kindother)。
36+
37+
例如 `other:action:study_conflict_review` 表示 owner 要求的利益冲突声明审核。
38+
读取私有数据、资源消耗、方向改变和公开发布分别保留它们的命名 kind,不被这一审批
39+
覆盖。`other:action:study_method_review` 是另一个自定义决定,不是同义项或 fallback。
40+
41+
匹配仍由与其他 kind 相同的类型化 owner 决定,始终要求 kind 相同,所以
42+
`other:global:*` 也不能覆盖命名 kind。key、granularity、recipient 与准确 Todo target
43+
规则不变。未知或拼错的 kind 仍拒绝,parser 不会把它们转成 `other`。声明 kind 不是
44+
批准:既有 linked-gate completion 或 standing authority 只消费实际覆盖的 scope。
45+
46+
## 证据与剩余验收
47+
48+
复用已有 settlement 全值 decoder、未知输入与 bind 短路见证;扩展实际 IPC/decoder
49+
路径,验证保留失败及之前已提交 receipt 和 details。这是 reader 覆盖,不是内部生产
50+
证据。复用既有 Todo lifecycle helper 与原生 TypeScript 匹配,在同一工作上同时放置
51+
指定 custom 审批、另一 custom requirement 和命名权限 requirement。只允许消费
52+
匹配的 custom scope。宽 custom scope 不能覆盖任何命名 kind,非法输入也不能变成
53+
自定义 authority。
54+
55+
registry 仍为 26 项,values/owners 不变;预算、形式证明域、wire schema、runtime
56+
默认行为和存储格式均不变。测试不能批准这些处置。#4447 最终验收仍需 owner 评审并
57+
集成本提案、当前来源清单,以及最终集成 revision 上明确 passed/failed/untested 的
58+
证据。旧的 unresolved 记录保留历史意义,不追改成当时已有本决定。

‎docs/architecture/rfcs/semantic-vocabulary-convergence-v0.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@ owners and approval requirements.
12671267

12681268
## Appendix A: Execution ledger (non-normative)
12691269

1270+
- Reserved-value and custom-scope disposition proposal: [cancelled / other](ledger/semantic-vocabulary-convergence-v0/2026-10-12-reserved-value-disposition.md).
1271+
1272+
12701273
New entries are files, not sections here. Each one lives in
12711274
[`ledger/<rfc-slug>/`](ledger/README.md) as `YYYY-MM-DD-slug.md` with a Chinese mirror
12721275
beside it, and nothing enumerates them — the directory listing is the index.

‎docs/architecture/rfcs/semantic-vocabulary-convergence-v0.zh-CN.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,9 @@ PR review 保留这些层级。普通改动记录检查范围和理由,无共
10121012

10131013
## 附录 A:执行账本(非规范)
10141014

1015+
- 保留值与自定义 scope 处置提案:[cancelled / other](ledger/semantic-vocabulary-convergence-v0/2026-10-12-reserved-value-disposition.zh-CN.md)。
1016+
1017+
10151018
新条目是文件,不再写在这一节里。每条放在
10161019
[`ledger/<rfc-slug>/`](ledger/README.zh-CN.md) 下,命名 `YYYY-MM-DD-slug.md` 并配
10171020
一份中文镜像;目录名即所属 RFC 文件名;跨 RFC 不设枚举——每个 RFC 的目录就是它的索引。

‎docs/reference/glossary.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Typed failure class of a settlement step.
174174
- python: [`SettlementFailureKind`](../../loopx/control_plane/effect_program.py).
175175
- typescript: [`SETTLEMENT_FAILURE_KINDS`](../../loopx/control_plane/effect_program.ts).
176176
- Values / 值: `invalid_identity`, `receipt_missing`, `receipt_unbound`, `identity_mismatch`, `writeback_missing`, `writeback_rejected`, `quota_spend_rejected`, `terminal_closeout_rejected`, `cancelled`, `permission_denied`, `budget_rejected`, `effect_outcome_unknown`.
177+
- Compatibility only / 兼容保留: `cancelled`.
177178

178179
## settlement_step_kind
179180

‎docs/reference/protocols/decision-scope-v0.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ Attached to a user todo, operator gate, or controller decision.
2727
| `expires_at` | no | Optional ISO timestamp for temporary authority. |
2828
| `reason_summary` | no | Public-safe one-line reason shown in status/UI. |
2929

30+
### Choosing `kind=other`
31+
32+
Choose a named kind whenever it describes the decision. `other` is an explicit
33+
custom decision category for an owner-defined approval that none of the six
34+
named kinds describes. It is not an unknown-input fallback, uncertainty marker,
35+
or shortcut around a named permission boundary. An author who cannot identify
36+
the decision should clarify the requirement instead of guessing `other`.
37+
38+
Describe what the owner must decide in the existing Todo text, and use a stable,
39+
public-safe `scope_key` for that decision on both the user gate and its dependent
40+
Agent work. For example, an owner-required approval of a study's conflict-of-interest
41+
declaration may use `other:action:study_conflict_review`. Reading private data,
42+
spending resources, changing direction and publishing the study still require
43+
their named kinds; this custom approval covers none of them. Another custom
44+
review, `other:action:study_method_review`, remains a different scope key.
45+
46+
The existing key/granularity, recipient and exact-target rules still apply.
47+
`other:global:*` remains an explicit broad **other-kind** scope; it cannot cover
48+
`private_read`, `write_scope`, `resource`, `production`, `public_claim` or
49+
`direction`. Broad scopes require the same owner declaration as all other kinds.
50+
An unrecognized kind, including a misspelling such as `othre`, rejects at the
51+
input boundary. Matching describes a dependency; actual approval consumption
52+
continues through the existing linked-gate completion or standing-receipt owner.
53+
No new metadata, automatic classifier or permission is introduced.
54+
3055
### `required_decision_scopes`
3156

3257
Attached to an agent todo, next action, handoff packet, or candidate runtime

0 commit comments

Comments
 (0)