dsh-completion-guard 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/CHANGELOG.zh-CN.md +43 -0
- package/README.md +29 -112
- package/README.zh-CN.md +23 -43
- package/dist/domain/index.d.ts +2 -2
- package/dist/domain/index.js +2 -2
- package/dist/{domain-BtR3J5aL.js → domain-B3EuAllT.js} +12577 -6428
- package/dist/{index-CZSt3D0G.d.ts → index-D45jgmPx.d.ts} +447 -19
- package/dist/index.d.ts +22 -4
- package/dist/index.js +1653 -186
- package/docs/ARCHITECTURE.md +47 -9
- package/docs/COMPATIBILITY.md +6 -0
- package/docs/CONTRACT_REVISION_0_6_3.md +136 -0
- package/docs/CORE_ALIGNMENT_CONTRACT_V2.md +155 -0
- package/docs/CORE_ALIGNMENT_PLAN_REVIEW.json +144 -0
- package/docs/DEVELOPMENT_HANDOFF_0_6_3.json +65 -0
- package/docs/DEVELOPMENT_PLAN_0_6_3.md +103 -0
- package/docs/DEVELOPMENT_PLAN_0_7_0.md +93 -0
- package/docs/EXECUTE_0_6_3_PROMPT.md +62 -0
- package/docs/LOCAL_ACCEPTANCE.md +903 -0
- package/docs/PRIVACY.md +11 -0
- package/docs/REVIEW_0_6_2_CORE_ALIGNMENT.md +87 -0
- package/docs/SEMANTIC_COMPATIBILITY.md +60 -1
- package/docs/upstream-deltas.json +67 -11
- package/package.json +2 -2
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -13,9 +13,34 @@ Context Guard separates DSH-owned execution from Guard-owned certification.
|
|
|
13
13
|
|
|
14
14
|
Context Guard does not own Goal, Todo, Compaction, or continuation. It intervenes when completion is claimed without a valid certificate.
|
|
15
15
|
|
|
16
|
+
## Call-time Host working-directory evidence
|
|
17
|
+
|
|
18
|
+
For an ordinary named `npm test` or `pnpm test` Host call that omits `workdir`,
|
|
19
|
+
the Guard captures a read-only working-directory receipt before execution and
|
|
20
|
+
defers its provider-visible plugin context until the host has persisted the
|
|
21
|
+
complete tool-result batch. This is a call-time derivation from the original Session header, the scoped sandbox
|
|
22
|
+
policy, the active shell service, and exact audited DSH `0.1.5-rc.2` producer
|
|
23
|
+
bytes. It is **not** a working directory returned by the Host process. The
|
|
24
|
+
notice binds the original call ID, sequence, turn, arguments digest, root
|
|
25
|
+
source, Session digest, Host-lock digest, physical directory, and policy root.
|
|
26
|
+
On replay it is accepted only after the matching result and before the next
|
|
27
|
+
assistant step, with the same source and Host identity. A legacy notice between
|
|
28
|
+
a call and result is not upgraded. The observer always lets the Host tool proceed;
|
|
29
|
+
it grants no ordinary mutation or execution qualification.
|
|
30
|
+
|
|
31
|
+
The Bash producer chooses the scoped policy workspace root, or the Session
|
|
32
|
+
header cwd when no policy is mounted; this candidate only certifies the
|
|
33
|
+
audited policy route when its physical root equals the immutable header cwd.
|
|
34
|
+
PowerShell uses the immutable header cwd under its separately audited local
|
|
35
|
+
executor. An explicit `workdir` is checked on its own merits. Missing or
|
|
36
|
+
ambiguous provider identity, a lexical filesystem alias, absent physical
|
|
37
|
+
directory, changed policy or graph bytes, background execution, or missing
|
|
38
|
+
call-time notice leaves target attribution insufficient. Historical logs
|
|
39
|
+
without such a notice cannot be upgraded by reading today's Host config.
|
|
40
|
+
|
|
16
41
|
## Durable state model
|
|
17
42
|
|
|
18
|
-
The effective plugin configuration and the DSH Session append-only log are the inputs to the rebuildable Guard projection. Context Guard **appends no custom session event types**: the persisted event vocabulary is harness-owned and the current persistence layer refuses unknown event types. The `activation` configuration supplies the initial enablement state, while
|
|
43
|
+
The effective plugin configuration and the DSH Session append-only log are the ordinary inputs to the rebuildable Guard projection. Context Guard **appends no custom session event types**: the persisted event vocabulary is harness-owned and the current persistence layer refuses unknown event types. The explicit release and restart paths additionally use the provider-invisible private ledger described below. The `activation` configuration supplies the initial enablement state, while ordinary session state is derived from the natively persisted events DSH already writes:
|
|
19
44
|
|
|
20
45
|
- effective plugin configuration — initial enablement (`opt-in` starts disabled; `always` starts enabled before log replay);
|
|
21
46
|
- `command/run` — later enablement (`/context-guard on|off|clear`) and epoch transitions;
|
|
@@ -41,12 +66,18 @@ Recovery packets keep the existing content-dedup and ride the next entered step.
|
|
|
41
66
|
|
|
42
67
|
## Unified diagnosis and preparation
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
For default v6 ordinary work, the prepare and checkpoint tools display the confirmed shared-core predicates at the current Session watermark. Historical item statuses and certificate bytes remain available for audit, but a pending legacy item does not become a new execution qualification after its current core predicate is satisfied. A separate information requirement remains open until the final answer is durably delivered. The ordinary checkpoint reply is an observation, not a signed certificate; missing or unprojectable core input stays unknown. Explicit proof, adopted Goal and applicable release work retain the versioned certificate path. Pagination binds the shared-core waterline so an older discovery page cannot silently skip changed obligations.
|
|
70
|
+
|
|
71
|
+
`deriveItemDiagnosis` is the pure historical and explicit-certificate item judge shared by recovery, rebind queries, and those checkpoint, prepare, and status views that use the versioned certificate contract. Default v6 ordinary prepare and checkpoint instead read `currentV6Feedback` from the confirmed shared-core projection; they preserve the original item and source for display without turning old item status into a current qualification. On the certificate path, item diagnosis reports a task kind (`inquiry`/`action`/`constraint`/…), certification support (`unsupported`/`needs_target`/`needs_evidence`/`unavailable`/`supported`), repairability (agent-repairable, needs user input, unsupported, historical gap, none), the exact missing target fields and evidence facets, and one concrete next action with a resume condition and a stable attempt fingerprint. Inquiries stay captured obligations whose honest next step is to deliver the answer; they are never prescribed a rebind. An effect recorded without its resolution prestate is a historical gap: read back observed state, never re-execute to mint evidence.
|
|
45
72
|
|
|
46
73
|
0.6.2 adds the shared capability projection beside that verdict (`src/domain/capability-semantics.ts`). Every lane declares one gap kind — unknown interpretation, missing target, missing adapter, legacy migration, missing historical pre-evidence, unattributable operation, pending condition, pending delivery, unavailable host, or standing constraint — and exactly one reachable remedy. Every consumer reads that projection instead of inferring a root cause from one enum, which is what stops a capability this build lacks from being reported as a user-authorization gap. Shell facts additionally carry a layered reading (`processFacts`): the host tool's own return, the console's declared exit status or `unknown`, how far the effect was attributed to this obligation's operation, and the resulting business outcome. Those fields are derived at replay, are excluded from every digest and certificate domain, and never rewrite a historical `outcome` or `parseStatus`.
|
|
47
74
|
|
|
48
75
|
`context_guard_prepare` is read-only. Before a stateful action it renders the supported command shape from the same audited parser the executor uses, the required resolution/effect/state order, reusable evidence references, the host capability verdict, and the exact missing target fields. It performs no action and never turns a guessed default into user authority.
|
|
49
76
|
|
|
77
|
+
0.6.3 adds one shared compatibility judgement (`src/domain/compatibility.ts`) that both preparation and the mutation gate call for the same item, action, revision and target. It separates four different facts — semantic compatibility (does the action belong to the item's reading?), target compatibility (is the resolved target the one the obligation selected?), execution readiness (pending, authorized, free of an outstanding condition or constraint), and adapter capability — and returns `compatible`, `incompatible` (the assumption is not what the obligation records, with the item's own action named) or `blocked` (the assumption matches but this snapshot cannot execute yet). A caller-supplied action manual is returned as `recipe_only`, and a caller-supplied target the obligation did not select is reported as a proposal, never as authority; the side-effect entry still re-reads every fact, evidence, host lock and identity before acting. The same release adds a pre-terminal eligibility pass: before any terminal filtering, records that earlier versions closed as answered are re-read, and one whose own text still orders work or whose git target has no auditable source is marked `needs_review`. That mark preserves the historical status byte for byte, re-executes nothing, and blocks a new certificate and Goal completion instead of warning about them.
|
|
78
|
+
|
|
79
|
+
Requested-target provenance (`targetSource`) is recorded beside the target itself: an explicit name or path, a phrase that selects the current repository, a trusted host selection, a unique selection inherited from another obligation of the same work unit, or the environment default. Only the first four are user selections; the environment default is context that can resolve an allowed object but can never authorize one.
|
|
80
|
+
|
|
50
81
|
A log-derived retry ledger keys each rejected rebind attempt by its stable inputs and outcome. An identical second attempt returns `unchanged` with the resume condition instead of a fresh rejection; new related evidence, a new root instruction, or a changed target produces a new key and re-opens evaluation.
|
|
51
82
|
|
|
52
83
|
## Synchronization
|
|
@@ -106,7 +137,7 @@ rules. `/context-guard migration` reports which of the two is in force.
|
|
|
106
137
|
| `domain/release.ts` | Explicit release contracts, one-shot reservations, readback settlements, coverage surface, and the pre-effect gate |
|
|
107
138
|
| `domain/reason-class.ts` | The frozen seven-class mapping for every reason code |
|
|
108
139
|
| `domain/migration.ts` | Rule set in force, preserved identities, and the rollback precondition |
|
|
109
|
-
| `domain/diagnostics.ts` |
|
|
140
|
+
| `domain/diagnostics.ts` | Historical and explicit-certificate per-item diagnosis, including its reason class; default v6 ordinary feedback reads the confirmed core through `domain/v6-feedback.ts` |
|
|
110
141
|
|
|
111
142
|
### Delivery
|
|
112
143
|
|
|
@@ -145,13 +176,20 @@ demand the proof the user explicitly asked for.
|
|
|
145
176
|
|
|
146
177
|
### Explicit release
|
|
147
178
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
179
|
+
Release adoption remains a root `command/run`. Reservations, settlements, and
|
|
180
|
+
restart intents use an owner-only append-only private ledger beneath the DSH
|
|
181
|
+
home selected by the host's non-empty `DSH_HOME` or default `~/.dsh`. The
|
|
182
|
+
ledger anchors a hashed Session header, cwd, host lock, and canonical ledger
|
|
183
|
+
root; release rows additionally bind the immutable adopted contract, resolved
|
|
184
|
+
target, and preceding reservation. Each row is hash-chained and carries a
|
|
185
|
+
private-ledger position rather than pretending to be a Session sequence.
|
|
186
|
+
Reservations are flushed before the effect and record
|
|
151
187
|
the SRI the trusted producer read; a settlement records a trusted readback when
|
|
152
|
-
one exists and otherwise
|
|
153
|
-
protection and refuses a re-send.
|
|
154
|
-
|
|
188
|
+
one exists and otherwise remains non-settling (`unknown` or `unconfirmed`), which preserves the in-flight
|
|
189
|
+
protection and refuses a re-send. Missing, truncated, cross-session, mismatched,
|
|
190
|
+
or locked ledger state fails closed. Historical plugin-notice records remain
|
|
191
|
+
readable under their frozen rules but are not migrated into stronger sidecar
|
|
192
|
+
facts. `release status`/`release revoke` are read-only and
|
|
155
193
|
authority-withdrawing respectively — neither is a state corruption.
|
|
156
194
|
|
|
157
195
|
The contract freezes the candidate scope's `adoptedAtRevision`, and the closure
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Compatibility is pinned to exact host package sets. A nearby version or a partial package match is not treated as supported.
|
|
4
4
|
|
|
5
|
+
## 0.7.0 release-line boundary (2026-09-21)
|
|
6
|
+
|
|
7
|
+
Public availability of 0.7.0 depends on npm, tag and GitHub Release readback. Historical commit `583035bd90b8ee589d01b12487a057b655d43e41` passed candidate CI and a 34-gate macOS native run with cleanup on its exact canonical tgz; that result skipped real-model requests. That historical tgz has no Windows exact-artifact native or complete fixed-model acceptance. Final release identity, installation and publication require separately bound evidence. Later packaged-document or source changes require a new exact artifact and native acceptance. The existing exact DSH host-lock cohorts remain the test targets. Ordinary file edits, tests and Git operations run through host tools; Guard observes persisted results and uses read-only file/Git/readiness adapters where the named completion predicate needs independent evidence. A package-script readiness observation may select a current test or assessment input; it proves neither that the test ran nor that a root time or approval condition was released. An existing change can be assessed without requiring a new edit. A missing pre-effect state cannot prove create/no-overwrite, and a Git parent object is not an observed pre-effect HEAD. Unsupported predicates remain insufficient rather than being inferred from successful tool return.
|
|
8
|
+
|
|
9
|
+
The core/v2 JSON and conformance fixture mirrors are bound to the exact Codex Context Guard source commit `cb415cbe374d452e4a0c71e9e292d20e31f23b0e` and per-file hashes in `tests/fixtures/conformance/core_v2/UPSTREAM_PIN.json`. The historical v1/digest pin at `tests/fixtures/conformance/UPSTREAM_PIN.json` retains its prior bytes. This source-mirror identity does not establish product runtime equivalence, publication, or installed behavior. Source and cross-end checks, CI, native acceptance, and exact-artifact acceptance remain separate evidence.
|
|
10
|
+
|
|
5
11
|
## 0.5.2 support policy
|
|
6
12
|
|
|
7
13
|
Version 0.5.2 supports exactly **DSH `0.1.5-rc.2` or `0.1.5-rc.1`**.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# 0.6.3 合同修订说明(收窄自动授权范围)
|
|
2
|
+
|
|
3
|
+
状态:**用户明确批准的验收合同调整**,不是对旧合同的“全部实现”声明。本文列出被替代的验收条目、
|
|
4
|
+
代价、替代它们的结构性不变量,以及仍然有效的条目。历史材料
|
|
5
|
+
([开发计划](DEVELOPMENT_PLAN_0_6_3.md)、[0.6.2 复核](REVIEW_0_6_2_CORE_ALIGNMENT.md)、
|
|
6
|
+
[执行提示](EXECUTE_0_6_3_PROMPT.md)、历轮[验收记录](LOCAL_ACCEPTANCE.md))保持原样,不静默改写;
|
|
7
|
+
本文只记录它们之上的一次显式变更。
|
|
8
|
+
|
|
9
|
+
## 1. 为什么修订
|
|
10
|
+
|
|
11
|
+
上一版 0.6.3 合同要求:调查/解释/疑问头治理其句子,**同时**“同句调查之后的第二条指令必须自动授权”。
|
|
12
|
+
满足该要求只能靠“补语是否闭合”的猜测规则(状态词命中、主体词表未命中、工作动词命中、位置与长度窗口)。
|
|
13
|
+
十四轮独立复核逐条证明这些推断在开放类别上不可靠:状态词可以是动作的宾语或修饰语,主体可以出现在任何
|
|
14
|
+
位置,动作词可以完全不在词表内。每一次修补都只是把猜测换成另一条猜测。
|
|
15
|
+
|
|
16
|
+
本次修订把要求收窄为**可证明**的形态:不能证明“该动作是独立指令”时,保留未决义务并拒绝执行授权。
|
|
17
|
+
|
|
18
|
+
## 2. 被替代的验收条目(原文保留在 LOCAL_ACCEPTANCE 的历轮记录中)
|
|
19
|
+
|
|
20
|
+
| 被替代的条目 | 现在的合同 |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `Check whether an update exists and install the package.` 的第二动作必须授权 | 允许保守进入**未决**;不再要求自动授权 |
|
|
23
|
+
| `检查是否有新版本并且安装这个主题。` 的第二动作必须授权 | 同上 |
|
|
24
|
+
| `检查是否有更新并安装新主题。`、`检查服务是否正常并记录变更。`、`确认缓存是否有效并安装依赖。`、`Check whether the cache is valid and install the package.`、`Verify whether the lock file is current and install the package.`、`有没有最新版本并…` 等“已证明是状态疑问”的正例必须保留其并列指令 | 同一治理范围内的并列动作一律**未决**;不再按“状态疑问”区分 |
|
|
25
|
+
| `解释头治理的句子在其补语已闭合时,并列小句开启新谓语,其指令照常保留`(`说明…的作用,然后更新 README。`) | 解释头治理**整句**,句中并列一律未决;只有**另起一句**的指令仍可授权 |
|
|
26
|
+
| 句末问号/标点/拆分可以把先前的指令保留下來(`What changed, and update the README?` 的 README 更新) | 同句疑问与动作混排即未决;标点本身不构成授权 |
|
|
27
|
+
| “命令式调查的补语若能证明是状态疑问则闭合” | 该闭合规则**整体删除**,不再保留第二条授权路径 |
|
|
28
|
+
|
|
29
|
+
**代价**(明确接受):在同一子句内把“问一句 + 顺手安排一件事”的写法视为未决,用户需要**另写一句**
|
|
30
|
+
明确指令才能授权;无法命名的状态与被证实为动作的内容都不再获得自动授权。安全方向优先。
|
|
31
|
+
|
|
32
|
+
## 3. 仍然有效、且被本次修订加强的条目
|
|
33
|
+
|
|
34
|
+
1. 纯问答仍可回答(`检查是否有新版本。`、`Is there any update for the plugin?`、对象列表疑问)。
|
|
35
|
+
2. 普通明确指令仍可执行(`重启 api 服务。`)。
|
|
36
|
+
3. **明确脱离受限范围的独立指令**仍可授权:另起一句(`Explain how the team deploys. Then restart service api.`)
|
|
37
|
+
或另起一个分句(`检查是否存在更新;安装新主题;`)。
|
|
38
|
+
4. 未决义务**必须保留**:不产生 `items = []`,不能被普通回答关闭,不能取得完成证书。
|
|
39
|
+
5. 引号、代码、转述等父范围继续保留:受限范围内的动作永不是授权。
|
|
40
|
+
6. K2 目标身份、K3 prepare/execute 一致性、K4 旧记录资格与历史保真继续有效;旧记录**不再默认获得**新授权。
|
|
41
|
+
|
|
42
|
+
## 4. 替代机制:资格(qualification)
|
|
43
|
+
|
|
44
|
+
- 读取层在**任何分区之前**为每个子句建立一次 `ExecutionQualification`:
|
|
45
|
+
`granted` 或 `restricted`。**`granted` 是正面结论,不是默认值**:只有在子句自身范围既无疑问内容
|
|
46
|
+
(疑问词、是非标记、`?`/`?`、A-不-A 等),又确实命名了读取层能识别的动作时才成立;
|
|
47
|
+
其余一切(未分类的疑问内容 `I wonder whether …`、后置 `是否可行`、无法识别的动作形态)一律
|
|
48
|
+
`restricted`(`unproven_scope`),因此“未命中治理模式即授予”不成立。
|
|
49
|
+
- **指令的正面判据是"祈使",不是"提到了动作"**:`The technicians restart service api every
|
|
50
|
+
night.` 与 `日志显示运维人员重启 api 服务。` 只是陈述,不构成指令;`granted` 现在要求子句是
|
|
51
|
+
**root 自己语气的祈使句**(`opensWithDirective`:消费请求前缀后动作位于句首,或句首是闭类的
|
|
52
|
+
施事/处所/时间/对象短语 `由你…`、`在仓库…`、`按 P0—P4…`、`明天…`),并排除报告体。
|
|
53
|
+
仅"命名了动作"不再授予资格。由此 `restricted` 与 disposition 被强制一致:受限子句不会再出现
|
|
54
|
+
`executable_now`,而是 `unresolved`。
|
|
55
|
+
- **父范围先于切分成立**:引号(`"…"`、`“…”`、词边界处的 `'…'`、`「…」`、`『…』`)与代码跨度
|
|
56
|
+
拥有自己的标点,引号内的句号/问号不再切开外层子句;受保护子句在连接符处不可再分。
|
|
57
|
+
`Explain this instruction: "Install foo. Restart service api."` 与
|
|
58
|
+
`解释这条指令:「安装 foo。重启 api 服务。」` 因此都是**一条**受限义务。等待/恢复标记
|
|
59
|
+
(`waitAuthorization`、resume marker)同样只读 root 自己的话,引号内的回声不再构成保留。
|
|
60
|
+
- **显式重述按"重述内容 + 身份绑定"授权**:重述先取出被重述的跨度(`restatedContentOf`),
|
|
61
|
+
再让它通过**与普通子句相同的判据**(`qualificationOfClause`:无疑问内容、祈使句首、非描述谓语),
|
|
62
|
+
或确认它是**规范操作规格**(`restatedContentIsOperation`:句首是操作,或首词/首二字解析为操作)。
|
|
63
|
+
仅"文中出现动作"不成立:`把重启 api 服务记为需要讨论的重启操作。`、
|
|
64
|
+
`把重启 api 服务明确为解释重启流程。`、
|
|
65
|
+
`Record restart service api as a description of how technicians restart service api.`
|
|
66
|
+
一律 `restricted`。同时**资格绑定到重述后的动作与目标**:捕获时 `semanticAction` 与
|
|
67
|
+
`actionPlan` 取自被重述的跨度,因此 `把重启 api 服务明确为检查日志。` 即便被授予,其身份是
|
|
68
|
+
"检查日志"而不是重启——重述之前的动作永远不会因此获得授权。合法用法
|
|
69
|
+
(`把更新插件明确为 apply package demo@2.0.0 profile web`、`把应用包 … 明确为 apply`、
|
|
70
|
+
`…明确为 inspect_remote_updates`)仍是 sanctioned 的 `granted` 路径,也是无法识别的动作形态
|
|
71
|
+
获得授权的唯一文本路径(裸写 `应用包 foo …` 不再授予资格)。
|
|
72
|
+
- **句首是动作仍不等于祈使**:`重启 api 服务是一个危险操作。`、`Restart service api is
|
|
73
|
+
dangerous.` 的主语就是那个动作,属描述句。`opensWithDirective` 因此要求动作所在子句的
|
|
74
|
+
**谓语不是描述性的**(`是/属于/意味着/导致…`、`is/are/means/causes…`,且只看动作所在的那个
|
|
75
|
+
子句,相对从句与后续子句不参与判定)。
|
|
76
|
+
- 由此产生的**代价**:动作词表之外的祈使形态(例如 `打包日志以便确认哪些请求失败。` 的“打包”)
|
|
77
|
+
也被判为 `restricted` —— 拒绝授权而不是猜测。该边界是安全方向,且只有正面证据能改变它。
|
|
78
|
+
- 分区、投影、恢复、prepare 都**不能**新增执行权限:子项继承父范围的资格(`inherited_restriction`),
|
|
79
|
+
不会因为自己带动作头而被提升为 `executable_now`。
|
|
80
|
+
- 变更门禁与 prepare 消费**同一份**存储资格(`itemHoldsExecutionAuthority`),并对 `semanticAction`
|
|
81
|
+
与 `actionPlan` 中的**每一个**动作适用;二者都不再重新分析文本。
|
|
82
|
+
- 资格缺失(0.6.3 之前的记录)→ 拒绝授权,并由升级资格检查给出
|
|
83
|
+
`legacy_missing_execution_qualification`,历史状态/文本/`answeredBy` 一律不改写。
|
|
84
|
+
|
|
85
|
+
数据流(可在测试中直接读出):
|
|
86
|
+
`interpretMessage().qualification` → `captureClause().executionQualification` →
|
|
87
|
+
投影/恢复持久化 → `itemHoldsExecutionAuthority()` → 门禁 / prepare。
|
|
88
|
+
|
|
89
|
+
- **新旧跨度各自验证唯一性,再逐字段合并**:同一跨度出现两个候选即记为
|
|
90
|
+
`requested_target_field_ambiguous` 并要求澄清(`把重启 api 服务或 worker 服务明确为 restart。`、
|
|
91
|
+
`把重启 api 服务明确为重启 worker 服务或 cache 服务。`);新跨度显式给出的字段优先,**省略的每个
|
|
92
|
+
字段**在被澄清义务唯一时继承(`把应用包 foo 版本 0.6.3 配置档 default 明确为 apply package foo
|
|
93
|
+
version 0.6.4。` 保留 `profile=default` 并采用新 `version`),旧选择有歧义则不继承并拒绝;主动作与
|
|
94
|
+
`actionPlan` 共用同一规则。
|
|
95
|
+
|
|
96
|
+
- **候选枚举与目标提取共用同一语法与规范化**:候选集合由提取器自己的解析器(label-first、
|
|
97
|
+
动词-宾语、名词后缀三种形态)枚举,每种形态内部独立判歧义,因此
|
|
98
|
+
`Rebind restart service api or worker as restart.` 与
|
|
99
|
+
`Rebind restart service api as restart service worker or cache.` 的共享标签列表不会再漏检;
|
|
100
|
+
`actionPlan` 的每个条目同样调用该检查(`restatedSpanAmbiguous`),主动作与计划共用一条规则。
|
|
101
|
+
|
|
102
|
+
- **唯一性覆盖动作的完整身份字段**:枚举按动作的身份字段合同逐字段进行——service、package、
|
|
103
|
+
version、profile、registry、repository、branch、remote、refspec——而不是只看对象名;
|
|
104
|
+
`version 0.6.4 or 0.6.5`、`profile web or prod` 因此与 `service api or worker` 一样被判为歧义。
|
|
105
|
+
重述路径读"被澄清跨度"而非整句(整句必然同时含新旧值,会被自身误判为歧义)。边界:该审计应用于
|
|
106
|
+
需要调和两个跨度的**重述**合并;普通子句沿用既有提取器的单一读数(既有 fixture 族不变)。
|
|
107
|
+
|
|
108
|
+
- **唯一性审计覆盖普通捕获、重述与动作计划**:普通分支此前直接采用单值提取结果,现已与重述共用
|
|
109
|
+
同一结果(`restatedSpanAmbiguous` 按动作的完整身份字段合同枚举),动作计划的每个条目同样消费它。
|
|
110
|
+
`Restart service api or worker.` 与 `提交仓库 /repo-a 分支 main 或 release。` 因此都是
|
|
111
|
+
`requested_target_field_ambiguous` + `clarification_required`。为使普通入口可用,枚举与提取
|
|
112
|
+
统一使用同一套**带边界的标签/动词定义**(`IDENTITY_LABELS`):标签值必须与标签分隔(避免把
|
|
113
|
+
`/repo-a`、`synthetic-plugin`、`repo/sub` 里的片段读成第二个候选),拉丁语标签/动词不被路径或
|
|
114
|
+
复合词中的字符吞并,中文标签仍可在 `把/将` 之后直接出现。
|
|
115
|
+
|
|
116
|
+
- **候选值按各字段的身份规则规范化,不做统一小写**:标签可以大小写不敏感,但分支、refspec、
|
|
117
|
+
repository、remote 等 Git 身份值区分大小写(`main 或 Main`、`main:main or main:Main` 都是两个
|
|
118
|
+
候选 → 歧义拒绝),package 走包名解析、registry 走规范形式;**完全相同的值仍然只算一个候选**
|
|
119
|
+
(`main 或 main` 通过)。
|
|
120
|
+
|
|
121
|
+
- **包规格是完整字段元组**:`foo@1.0.0` 与 `foo@2.0.0` 是两个目标(同名不同版本),
|
|
122
|
+
`foo@1.0.0 version 2.0.0` 是同一字段的冲突——两者的版本候选合并且逐字段验证;完全相同的重复值
|
|
123
|
+
仍只算一个候选。**审计与提取共用全部字段标签**:中文 `引用规范` 等标签同样纳入枚举(此前只在
|
|
124
|
+
提取器里存在)。
|
|
125
|
+
|
|
126
|
+
## 5. 与上游的关系
|
|
127
|
+
|
|
128
|
+
上游 Codex Context Guard 仍按自己的判据运行:本次修订只改 DSH 一侧的授权范围,
|
|
129
|
+
跨端台账 `tests/fixtures/cross-end/core_alignment_0_6_3.json` 以修订 4 记录该变化
|
|
130
|
+
(`mixed-conjunction-zh` 从“1 信息 + 1 指令”变为“1 未决”),两端**仍然都不授权**该安装,
|
|
131
|
+
但机制与信息量不同;不得据此推断任何跨端等价或原生能力。
|
|
132
|
+
|
|
133
|
+
## 6. 未测量的能力(不因本次修订改变)
|
|
134
|
+
|
|
135
|
+
原生宿主恢复与 Codex 宿主轮次、候选 CI、冻结 tgz 与精确制品验收、macOS/Windows 原生验收、
|
|
136
|
+
真实模型行为、插件安装与 DSH 重启、tag 与发布,均仍未测量。本修订与这些事实无关。
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Context Guard 共同核心合同:DSH 0.7.0 / Codex 0.14.0
|
|
2
|
+
|
|
3
|
+
规划合同版本:2.0-plan.2,2026-09-18。本文规定新版本的职责、状态与接受条件,不声称已有实现通过,也不是执行、安装或发布授权。产品版本、协议版本与本文版本独立。
|
|
4
|
+
|
|
5
|
+
## 1. 权威源与适用范围
|
|
6
|
+
|
|
7
|
+
本轮两份开发计划引用本文的逐字相同副本;协调者维护规划合同,禁止任一产品自行改变语义。产品落地时,Codex Context Guard 仓库是共享规范、JSON schema、reference projection 和中立 fixture 的唯一权威源。先在该仓库完成 P0,再由 DSH 按确切 commit、路径及 SHA-256 镜像;不得把 DSH 单边 candidate 称为共享标准。两份规划副本也必须做字节相等检查。上游的公共文件不得依赖私人协调仓库或本机路径。
|
|
8
|
+
|
|
9
|
+
本文的 AC01–AC12 补充并约束既有 C01–C12。旧版记录保留历史效力;0.6.3 的文本执行资格与收窄表达合同不得成为 0.7.0 默认路径。新合同不是保证任意自然语言可被确定性证明,而是规定不能从解析不确定性产生执行权限、错误完成或额外普通审批。
|
|
10
|
+
|
|
11
|
+
只对齐共同语义和可观察行为:要求、来源、工作单元、回答、证据、完成、普通执行职责和显式发布规则。Codex Hook/cache、DSH Session/Goal/Web/Headless、调度和安装分别属于宿主;事件名称、工具名称、消息措辞和制品 hash 不要求相同。
|
|
12
|
+
|
|
13
|
+
## 2. AC01:三个责任边界
|
|
14
|
+
|
|
15
|
+
| 路径 | 负责执行与权限的一方 | Guard 必须做什么 | Guard 不得做什么 |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| standard 普通任务 | 执行助手依据真实用户请求、仓库规则和宿主审批;宿主执行工具 | 保存完整要求/约束,观察真实工具结果,恢复上下文,核验完成事实 | 用文本分类器签发普通执行资格;要求先走 prepare/action/rebind 才能编辑、测试、提交、推送 |
|
|
18
|
+
| strict 普通任务 | 同 standard | 对用户明确要求的视觉/完整范围等 proof 保持强制核验 | 把证明义务转换成普通工具前置审批或重复用户授权 |
|
|
19
|
+
| 显式 release 契约 | 助手仍负责用户授权;宿主仍负责平台审批;Guard 只强制已采用契约 | 精确身份、readiness、单次票据、效果前检查、消费与可信回读 | 从安装、关键词、Skill 或普通 push 自动采用契约;建议或认证绕过已采用契约;把不可拦截的宿主通道说成已被阻止 |
|
|
20
|
+
|
|
21
|
+
“没有 Guard 否决”不是授权;模型仍必须遵守原始约束。Guard 的解释标签是理解候选或证明范围,不是安全沙箱。host-lock/完整性失败使 Guard 的认证或受控执行 unavailable;普通宿主工具权限仍由宿主决定,不能因插件不可用把整个宿主变成不可操作。
|
|
22
|
+
|
|
23
|
+
## 3. AC02:DSH 自有执行器的迁移决策
|
|
24
|
+
|
|
25
|
+
0.7.0 默认路径停止提供 Guard 自有普通 mutation 执行能力。`context_guard_action` 和 evidence 工具内的 effect 执行分支不得仅通过改名、policy 条件或“可选”标记继续承担普通 Git/安装/修改授权;迁移到宿主普通工具执行,Guard 只消费可信观察。prepare 如保留,只给事实/证据诊断,不能给出普通动作的 authorized/granted 结论。
|
|
26
|
+
|
|
27
|
+
兼容入口可以返回结构化 `ordinary_execution_moved_to_host`,说明使用宿主普通工具,**不能执行效果**,不能要求用户重写或再批准。新任务的工具描述、恢复提示、Skill、README、测试都不得引导普通操作回到这条旧链。旧记录中的 `ExecutionQualification` 可保留用于历史解码,不参与新普通执行、目标选择或当前完成推断。
|
|
28
|
+
|
|
29
|
+
受控发布可以继续使用专用 action 实现,但只能由已显式采用、覆盖该操作的 release 契约进入;运行时必须重新检查完整契约,不信任调用方传入的模式。停用旧普通执行器不等于删除身份/producer/前置状态校验:这些检查转归证明验证器或受控发布路径。旧工具名、旧会话、模型误调用和 wrapper 均须有无副作用测试。
|
|
30
|
+
|
|
31
|
+
Codex 0.14.0 保持既有普通工具边界,不为了接口对称新增 DSH action/prepare,也不将新解释内核接回普通 PreToolUse 审批。
|
|
32
|
+
|
|
33
|
+
## 4. AC03:来源、解释与完整覆盖
|
|
34
|
+
|
|
35
|
+
根输入/资产身份不可变;语义记录使用 UTF-8 字节半开区间、原文 hash、unit、revision、来源种类及覆盖余项。保留正向要求、禁止、条件、信息与未知范围,引用/工具/子代理/压缩摘要不能增加用户权限。
|
|
36
|
+
|
|
37
|
+
解释可以由现有助手提出结构化候选,也可由受支持的确定性规则生成。验证器检查来源、覆盖、类型结构、约束、目标关联及修订;模型自报“这是指令/全部覆盖”不是事实证明。未知残余保持可见,不得从闭包丢弃。没有可靠语义依据时不签发信息关闭或执行完成,但这不阻塞普通工具或诚实结束。
|
|
38
|
+
|
|
39
|
+
不扩张词表来证明开放自然语言的授权;不要求用户改分号、写插件 DSL 或固定重述模板。固定的必修中文/英文常用表达须正常处理,不能通过全部 unresolved 来取得安全结果。真实歧义才请求最小业务澄清;解析器缺能力、证据不足和缺用户权限分别诊断。不得增加插件自己调用外部模型的运行时依赖;Codex 保持标准库边界。
|
|
40
|
+
|
|
41
|
+
## 5. AC04:状态维度与闭包
|
|
42
|
+
|
|
43
|
+
P0 必须把下列概念映射为版本化 schema,禁止使用一个 `authorized/completed` 布尔值混合它们:
|
|
44
|
+
|
|
45
|
+
| 维度 | 最少需要表达的事实 |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| 来源/解释 | 原始来源、candidate interpretation、已验证结构、unknown residue |
|
|
48
|
+
| 回答交付 | not_observed / delivered,绑定正确 unit/turn/最终回答/范围;不表示答案正确 |
|
|
49
|
+
| 业务效果 | not_observed / success / partial / failure / unknown,绑定真实工具和目标 |
|
|
50
|
+
| 证明资格 | supported / unavailable / insufficient / satisfied / invalidated |
|
|
51
|
+
| 闭包 | 当前 unit + 必需后代的未满足要求、持续约束、等待、legacy review;历史兄弟任务不混入 |
|
|
52
|
+
| Stop 决定 | ordinary_end / bounded_correction / typed_wait;与证书签发分开 |
|
|
53
|
+
| 发布 | 未采用 / 已采用 / 已保留 / 已消费 / 结果未知,按已有 release 状态机扩展 |
|
|
54
|
+
|
|
55
|
+
信息 delivered 仅覆盖可信最终回答的对应信息项,不覆盖混合执行/资产/proof。执行 verified 需要匹配的证据,final、工具零退出、别项完成或解释分类本身均不充分。父项只有适用必需后代满足才能完整认证。禁止项持续有效,不作为永远待执行的动作计数。
|
|
56
|
+
|
|
57
|
+
## 6. AC05:普通结束、纠正与 Goal
|
|
58
|
+
|
|
59
|
+
ordinary_end 可以保持未认证状态;不得把所有 pending/unresolved 自动变成阻止结束的债务。等待或无可执行证据时静默保留;不能通过伪造 typed boundary 才让用户得到答复。恢复时展示真实剩余要求和能力缺口,不制造重复工作。
|
|
60
|
+
|
|
61
|
+
纠正仅用于有明确可追溯依据的提前完成/漏项或违反显式 proof 的完成声明;每 turn 最多一次可见纠正,进展指纹不变不得自旋。不以动词出现、词表推断、历史 broad resume 或 `ExecutionQualification` 证明当前存在必须自动执行的工作。纠正自身也不产生执行权限。纠正预算用完后保留未认证结论,不伪造通过。
|
|
62
|
+
|
|
63
|
+
### AC05.1:继续提示所需的当前动作依据
|
|
64
|
+
|
|
65
|
+
2026-09-18 的 Codex 0.13.9 误报表明,仅禁止“generic 推为 authorized”还不足以指导替换实现。`remaining_action_facts → _action_authorization → resumed_actionable_work → Stop` 可把后续收益观察补成当前动作,再把简短修复指令提升为持续执行要求。该事实只在 Codex macOS 观察与隔离 Hook 回放中成立;DSH 必须实现同一防护,不据此宣称 DSH 已复现。
|
|
66
|
+
|
|
67
|
+
P0 必须为“提示助手继续执行”冻结可追溯的动作依据及其校验规则,至少关联:当前 unit/revision、根要求及其采用范围、具体动作/对象或仍有效要求的必要子步骤、未满足的完成谓词、负责方、条件与输入是否就绪、来源跨度/事件和截至当前 turn 的判断水位。子步骤不要求用户逐项枚举,但必须解释其与已授权目标的必要关系;仅凭模型补写 owner、类别或 `authorized=true` 不成立。该依据用于 Stop 诊断,不是普通工具权限票据;资料不足保留未决并允许诚实结束,不新增执行前审批。
|
|
68
|
+
|
|
69
|
+
- 分开本轮具体剩余动作、证据/能力不足、未来效果评估、范围外建议、真实用户/外部等待和已完成状态。含动作词的收益/稳定性限制说明不能单独创建当前待办;同句和跨句的完成片段不得借旁边的未来标记变为未完成。
|
|
70
|
+
- `explicit_user_persistence` 只来自可信根要求中真实的持续执行指令;`resume_with_actionable_work` 必须同时有当前恢复指令和上述具体动作依据。两类独立存储、独立原因码,禁止用 OR 写回“用户要求持续执行”;默认未知类别/不明确范围不能补成 authorized。
|
|
71
|
+
- `registered_external_operation` 需要实际关联的外部操作或可信生命周期事实;“未提交”“以后观察”本身不能创建已登记等待。无法确认等待时可以普通结束且未认证,不能捏造 boundary。保留原始用户明确等待约束,并与外部操作登记分开。
|
|
72
|
+
- 只使用截至该次 Stop 的要求与事实;之后新增“安装/提交/推送”的授权不能回填早先决定。同一结果换掉未来观察措辞不应改变当前动作集合。若用户确实要求立即设计/运行效果评估,或当前测试明确未跑且具备输入,则必须识别该具体剩余动作,不能用“观察类”白名单一概放过。
|
|
73
|
+
|
|
74
|
+
继续提示要求“有当前动作依据”;错误整项完成/显式 proof 的纠正沿用 AC05 独立判据,不能以没有可执行动作放过错误认证。纠正总预算、无进展规则及恢复范围保持不变。
|
|
75
|
+
|
|
76
|
+
宿主 Goal 的 `complete` 是完成状态变更,不能与普通聊天结束混同:显式采用的 Guard/Goal 完成合同仍需全部必需证据。无法认证时拒绝 Guard 介导的 Goal 完成并说明缺口,宿主保持实际未完成状态;不自动暂停/重启/改标 blocked,不借“普通结束”宣布 Goal 成功。没有采用这种合同的宿主 Goal 不能由插件擅自接管。DSH 必须核验现有 Goal 接线的采用条件和覆盖;未覆盖旁路公开声明,不伪造全局保障。
|
|
77
|
+
|
|
78
|
+
## 7. AC06:普通工具证据的进入路径
|
|
79
|
+
|
|
80
|
+
使用宿主实际提供的工具调用/结果与持久化事件,输出中立 fact:真实 call/operation lineage、producer、subject、时间/水位、结果、可证明的 predicate、原始材料摘要和能力边界。模型给出的 call ID、文本声明或自造 receipt 不能创建可信事实。
|
|
81
|
+
|
|
82
|
+
宿主适配器负责 observation → fact,核心负责 fact → predicate satisfaction。必须支持已有标准普通工具的有界成功路径:文件改动+回读、测试运行、Git commit/push 的精确 readback,以及只做解释的可信交付。按本次任务所需 predicate 收证据;不是所有普通工具都必须新写认证适配器。
|
|
83
|
+
|
|
84
|
+
- shell 退出码只证明进程结果。复合命令部分失败、循环/catch 掩盖失败、引用报错文本分别建正反例;不能整段 success 关闭全部子项。
|
|
85
|
+
- action-event(本次发生某操作)与 state-outcome(现在满足某状态)必须区分;现状不能反推历史动作或缺失前态。普通工具已有可信历史只要满足 predicate 可接入,不强迫重执行以制造 Guard producer。
|
|
86
|
+
- 缺适配器返回 capability_unavailable,缺足够事实返回 evidence_insufficient;都不说“请再授权/改成另一动作”。允许诚实普通交付,不能签发超出证据的证书。
|
|
87
|
+
- 视觉、指定资产、完整集合和明确 proof 要求保留原强度。没有可观察生产者时显式记录缺口,不把普通路径迁移当作放宽证明。
|
|
88
|
+
|
|
89
|
+
## 8. AC07:目标身份与权限来源分离
|
|
90
|
+
|
|
91
|
+
分别记录根约束、助手在已允许范围内的实现选择、宿主可信选择、执行解析、实际观察身份。cwd、最近工具路径和模型 selector 不自动成为根权限;普通选择也不必被伪装成根用户逐字段指定。
|
|
92
|
+
|
|
93
|
+
跨仓库“提交并推送”复用当前工作单元内唯一且有来源的合法工作对象;显式目标冲突不得替换,多候选才消歧。该判断用于约束保留和证据匹配,不重建普通操作前置审批。版本/分支/refspec/registry/package 等身份按字段规范化;完整元组冲突不可被同包名或统一小写吞并。
|
|
94
|
+
|
|
95
|
+
受控发布在效果前固定全部必需身份;普通完成证明在认证时绑定实际身份及用户约束。两者使用同一身份库而非同一授权流程。准备/诊断与认证/发布核验使用同一快照判据;执行前仍重读 revision、目标、证据、host-lock,防止同 revision 的外部状态变化。
|
|
96
|
+
|
|
97
|
+
## 9. AC08:显式发布的保留范围
|
|
98
|
+
|
|
99
|
+
共同的必修发布语义为显式采用、精确目标/候选、单次保留/消费、防重放、超时结果未知及可信回读。Codex 保留现有 release adapter;DSH 将其实际可保护的表面单列,不能因没有相同 Hook 名称就删除共同语义测试。
|
|
100
|
+
|
|
101
|
+
DSH 本版最低必须提供现有受控 registry publish 表面的完整正反例;Codex 的额外 tag/GitHub Release 表面保留其验收。此最低集合不意味着 DSH 的其他发布方式已受保护:若选定契约还要求未覆盖表面,必须在采用/预检时拒绝该不可履行契约;不能效果后才发现,也不能发出“改用普通 shell”的绕行建议。效果前强制拒绝只适用于Guard实际控制的发布入口以及采用/预检。宿主普通shell/opaque runner等无法拦截的通道没有Guard拦截保证,不能为其签发受控发布认证,也不能建议绕行;助手仍须遵守已采用契约,宿主权限继续生效,不宣称插件是沙箱。
|
|
102
|
+
|
|
103
|
+
root 的普通 push 不自动成为 release 操作;文档、安装、Skill、模型提案不能暗中激活票据。用户明确切换 release profile 的现有语义不得丢失:profile 选定后须进入相应契约流程,缺契约时相关发布失败关闭,普通无关工作保持原边界。
|
|
104
|
+
|
|
105
|
+
## 10. AC09:旧会话、协议与回滚
|
|
106
|
+
|
|
107
|
+
支持 DSH 0.6.3 与现存 legacy 读取边界、Codex 0.13.9 及其已支持旧 schema;P0 从仓库实际消费者清单分配新的协议/schema/hash 身份。不能在旧版本号内改变已签发字节,不能仅升级产品号而沿用不兼容状态语义。
|
|
108
|
+
|
|
109
|
+
新任务用新普通路径;旧任务通过显式版本边界迁移。保留 journal、根输入、旧证书、旧 qualification 原始事实;旧资格不授予新普通执行。当前单元及必需后代内影响新认证的旧 answered/closed 在终态过滤前复查,needs_review 阻断新认证,但不自动成为普通工具审批或无进展 Stop 循环。无关历史不重开;缺原始来源不推断完成。
|
|
110
|
+
|
|
111
|
+
旧工具调用不可触发普通 mutation;旧 release 契约、已保留票据和不确定效果必须先核对原身份再恢复,不能因新路径重试未知发布。事务性迁移、重复迁移、崩溃恢复、旧新证据共存均有用例。回滚需匹配旧运行时和旧状态快照;旧运行时不得写新状态。不能安全回滚时只读诊断并前滚,不丢工作数据。
|
|
112
|
+
|
|
113
|
+
## 11. AC10:共同投影与对齐判据
|
|
114
|
+
|
|
115
|
+
在 Codex 上游产出可独立运行的 Python reference 和 TS consumer;纯核只接收规范事件与真实 fact,不读期望值、case ID 或宿主专属测试开关决定输出。规范输入、Unicode/数值/排序/canonical bytes/hash 规则在 P0 固定,保留 v1/digest_v3 的旧域。
|
|
116
|
+
|
|
117
|
+
归一化投影至少比较:来源覆盖与未知余项、类型与约束、工作单元闭包、目标来源和身份、delivery、效果与证明资格、普通路径是否被 Guard 干预、Stop 原因与纠正次数、显式发布状态。宿主 ID 只作确定映射;不能删除有分歧的关键字段来获得相等。普通路径不得出现 Guard 签发的执行权限字段。
|
|
118
|
+
|
|
119
|
+
同一原始自然语言和同一规范事件序列各有比较泳道:前者测试产品真实解释入口,后者定位核心状态机差异。结构化模型候选输入不能代替原文入口测试。解释不确定允许在扩展集显式记录,但固定必修集须满足独立期望和双端相等;两端都误关闭或都永远 unresolved 不能算通过。
|
|
120
|
+
|
|
121
|
+
状态台账分两个字段:implementation_status(implemented/partial/missing)和 comparison_status(aligned/measured_difference/not_measured/host_specific)。aligned 必须有共同合同版本、双方源码身份、fixture digest、真实入口层级和结果引用;没有相同 API 名称不构成 host_specific。宿主专属能力只能用于真实不存在的语义需求,不能排除共同要求。过时文字与机器状态矛盾必须作为文档缺陷修复。
|
|
122
|
+
|
|
123
|
+
## 12. AC11:必修验收家族与停止条件
|
|
124
|
+
|
|
125
|
+
沿用 C01–C12 / S01–S12 全部适用合同,追加以下结构矩阵;阶段性缺证据不能自行改成 not-applicable。每组同时有正向与反向结果,不穷举自然语言。
|
|
126
|
+
|
|
127
|
+
| ID | 结构家族 | 必修结果 |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| A01 | mixed 问答/执行,否定、条件、引用、未知尾部,中英标点与顺序变形 | 不丢项、不误关闭;固定明确表达无需用户换标点才能正常工作 |
|
|
130
|
+
| A02 | 纯解释提到安装/重启,真正普通执行,未知动作 | 不创建权限;正确普通工作不被 parser/缺 adapter 阻拦;信息交付可达 |
|
|
131
|
+
| A03 | 当前目标、跨仓库后续指代、候选歧义、模型/工具伪造来源 | 有源唯一对象复用;真正歧义才澄清;证据绑定实际目标 |
|
|
132
|
+
| A04 | 零效果 final、无关成功、错目标、部分成功、完整正确执行 | 前四种不完整认证,最后一种能完成;普通诚实结束可未认证 |
|
|
133
|
+
| A05 | 同事实分别经普通工具与旧 Guard wrapper/伪造 receipt | 普通真实事实可验证;旧普通 mutation 无效果;伪事实不被信任 |
|
|
134
|
+
| A06 | proof 不足、缺 adapter、损坏状态、真实等待、无进展 | 不混淆权限/能力/完成;认证拒绝准确;纠正有界且不重做业务 |
|
|
135
|
+
| A07 | prepare/诊断与认证/发布快照、同 revision 身份变化 | 同输入同结论;陈旧快照不得授予发布或错误认证 |
|
|
136
|
+
| A08 | 原生 Goal complete、普通结束、必需子任务、祖先约束 | Goal 合同不被聊天结束绕过;历史兄弟不阻止当前工作 |
|
|
137
|
+
| A09 | 普通 push、显式采用/撤销/恢复、错制品/过期/重放/不透明 runner | 普通push无票据要求;Guard发布入口/adoption预检拒绝且无效果;不可拦截普通opaque通道只断言无保护保证/不可认证,不伪称被挡;未知效果先回读 |
|
|
138
|
+
| A10 | 旧 answered、缺来源、qualification、旧工具调用、迁移中断/重复/回滚 | 历史不改、无自动效果、新认证不继承假完成 |
|
|
139
|
+
| A11 | UTF-8 中文/emoji/组合字符、换行、路径/大小写、稳定分页与 revision | 跨语言同投影、旧摘要不变、无漏项/重复/越界 |
|
|
140
|
+
| A12 | 真实混合工作流:解释→改文件→测试→用户后续提交推送→compact/resume | 用户无需 Guard DSL/重复授权;有业务结果及证据,不能只测拒绝成功 |
|
|
141
|
+
| A13 | 完成结果+未来收益/稳定性观察;简短恢复/显式持续执行;未提交说明/真实外部操作;真实待跑测试/明确要求当前评估;后续才新增授权;中英同义、跨句和顺序变形 | 限制说明不造待办/授权/外部登记;真实当前动作可提醒;两种继续原因可区分;Stop按当时事实判定,普通结束不等于认证 |
|
|
142
|
+
|
|
143
|
+
独立维护者先冻结期望与核心集/留出集;实现者不能根据实际输出录 golden。固定负例误关闭、错误认证和受控发布错误效果均为零;正向业务路径、纯问答和真实同义表达全部满足预期。发现测试 oracle 错误可单独审议纠正,保留旧结果与理由,不能把产品失败直接重标“边界”。连续第二个同族反例触发入口×动作×字段×状态的集中审计,再统一返还阻断清单。
|
|
144
|
+
|
|
145
|
+
本地确定性、生产适配器接线、真实模型任务、原生平台及制品是不同证据。四个产品×平台泳道(DSH/Codex 各自 macOS/Windows)分别跑 A12 的受支持业务路径,并在同一真实模型业务中加入 A13 的诚实限制说明及真实剩余动作对照,记录 loaded version/制品身份、根请求、工具轨迹、业务回读、剩余状态、额外澄清与 Guard 开销。使用一次性仓库/profile,明确批准的隔离 push 目标;没有网络目标授权可先做本地 bare remote 源测试,但不得冒充真实跨主机网络验收。模型对话措辞无需相等,核心结果必须符合 oracle。无需 Guard 的额外用户授权轮次在必修无歧义流程中为零;必要平台审批单独统计。
|
|
146
|
+
|
|
147
|
+
真实模型预算或通道缺失时停止于该门槛,不能用“28 个安装/拒绝检查通过”替代正向任务。配对核心对齐验收要求全部必修泳道完成;一个产品完成可保留候选,但不能宣称已与另一产品对齐。
|
|
148
|
+
|
|
149
|
+
## 13. AC12:开发、计划审查与发布边界
|
|
150
|
+
|
|
151
|
+
本轮交付是规划合同及两份计划,不是产品 schema/fixture 冻结或运行时实现。开发 P0 先完成 schema/fixture/reference 接口、消费者及两宿主最低能力清单(真实工具call/result字段、readback、来源信任、持久化水位和平台可用性,至少覆盖AC06正向路径),独立审查后才开始依赖该合同的双端实现;可以先做不依赖新 schema 的有限接口调查。
|
|
152
|
+
|
|
153
|
+
计划审查固定 authority、identity、state_effect_readback、canonicalization、platform_feasibility、migration_versioning、verification_release_boundary 七个镜头;可复现正确性矛盾、不可实现要求、互操作冲突为 P1。集中返还,修复只复审受影响部分,无开放 P1 和必要机械检查通过即结束本轮计划评审。新镜头/权限来源/缩减必修范围须显式重开,不能在收尾暗中改合同。
|
|
154
|
+
|
|
155
|
+
本地开发、提交、CI、制品、原生、发布与日常安装分别授权与记账。实施阶段是否提交由当时用户授权决定;本计划不继承其他任务的发布许可。两个产品独立版本和制品身份,协调验收不要求同一天发布。若双方必修核心无法满足,保持未完成或由用户明确改范围,不以单边更多测试宣布对齐。
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "multi-repository-plan-freeze/v1",
|
|
3
|
+
"subject": {
|
|
4
|
+
"kind": "plan_spec",
|
|
5
|
+
"paths": [
|
|
6
|
+
"docs/CORE_ALIGNMENT_CONTRACT_V2.md",
|
|
7
|
+
"docs/DEVELOPMENT_PLAN_0_7_0.md"
|
|
8
|
+
],
|
|
9
|
+
"sha256": "d9b19bddfa99fff432e1001b762543049a02fcd62060821bfc8b19b4514c7f96",
|
|
10
|
+
"version": "070-014-plan.2"
|
|
11
|
+
},
|
|
12
|
+
"owners": {
|
|
13
|
+
"mutation_owner": "coordinator",
|
|
14
|
+
"reviewers": [
|
|
15
|
+
"mechanism_review",
|
|
16
|
+
"codex_next_audit"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"review_contract": {
|
|
20
|
+
"lenses": [
|
|
21
|
+
"authority",
|
|
22
|
+
"identity",
|
|
23
|
+
"state_effect_readback",
|
|
24
|
+
"canonicalization",
|
|
25
|
+
"platform_feasibility",
|
|
26
|
+
"migration_versioning",
|
|
27
|
+
"verification_release_boundary"
|
|
28
|
+
],
|
|
29
|
+
"blocking_severities": [
|
|
30
|
+
"P1"
|
|
31
|
+
],
|
|
32
|
+
"scope_reopened": false,
|
|
33
|
+
"scope_reopen_reason": null
|
|
34
|
+
},
|
|
35
|
+
"baselines": [
|
|
36
|
+
{
|
|
37
|
+
"id": "dsh_source",
|
|
38
|
+
"kind": "mutable",
|
|
39
|
+
"value": "0.6.3 at 1735cfadecf0feddfa07bd811fa0297a49c7fd88; workflow/test-only baseline advanced; no 0.7.0 runtime implementation",
|
|
40
|
+
"refreshed_at": "2026-09-18"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "codex_source",
|
|
44
|
+
"kind": "mutable",
|
|
45
|
+
"value": "0.13.9 at ce667adefd716f829fb1fb070b3089e789ed74c3; no 0.14.0 runtime implementation",
|
|
46
|
+
"refreshed_at": "2026-09-18"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "stop_incident",
|
|
50
|
+
"kind": "mutable",
|
|
51
|
+
"value": "CGI-20260918-codex-future-observation-stop; Codex 0.13.9 macOS observed and isolated Hook reproduction; no DSH/Windows reproduction or runtime repair",
|
|
52
|
+
"refreshed_at": "2026-09-18"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"issues": [
|
|
56
|
+
{
|
|
57
|
+
"id": "D070-R01",
|
|
58
|
+
"severity": "P1",
|
|
59
|
+
"status": "resolved",
|
|
60
|
+
"lens": "platform_feasibility",
|
|
61
|
+
"summary": "将效果前发布拒绝限定于Guard控制入口及契约预检,明确普通opaque通道无拦截保证/不可认证。",
|
|
62
|
+
"invalidates": [
|
|
63
|
+
"normative_spec",
|
|
64
|
+
"implementation_annex"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "CG14-R01",
|
|
69
|
+
"severity": "P1",
|
|
70
|
+
"status": "resolved",
|
|
71
|
+
"lens": "state_effect_readback",
|
|
72
|
+
"summary": "继续提示的actionable前提与虚假完成/proof纠正分离,合计每turn一次预算。",
|
|
73
|
+
"invalidates": [
|
|
74
|
+
"normative_spec",
|
|
75
|
+
"implementation_annex"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "CG14-R02",
|
|
80
|
+
"severity": "P1",
|
|
81
|
+
"status": "resolved",
|
|
82
|
+
"lens": "authority",
|
|
83
|
+
"summary": "显式release profile仍进入发布模式;空契约相关发布fail-closed。",
|
|
84
|
+
"invalidates": [
|
|
85
|
+
"normative_spec",
|
|
86
|
+
"implementation_annex"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "CG14-R03",
|
|
91
|
+
"severity": "P2",
|
|
92
|
+
"status": "resolved",
|
|
93
|
+
"lens": "platform_feasibility",
|
|
94
|
+
"summary": "P0加入两宿主真实工具事件、来源信任、readback、水位及平台能力清单。",
|
|
95
|
+
"invalidates": [
|
|
96
|
+
"normative_spec",
|
|
97
|
+
"implementation_annex"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "CG14-STOP-R01",
|
|
102
|
+
"severity": "P1",
|
|
103
|
+
"status": "resolved",
|
|
104
|
+
"lens": "state_effect_readback",
|
|
105
|
+
"summary": "Planning gap closed with AC05.1 action provenance/as-of facts, separate persistence/resume reasons and external-operation registration, plus A13 positive/negative production-path acceptance. Runtime incident remains reproduced and awaits implementation.",
|
|
106
|
+
"invalidates": [
|
|
107
|
+
"normative_spec",
|
|
108
|
+
"implementation_annex"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "D070-STOP-R01",
|
|
113
|
+
"severity": "P2",
|
|
114
|
+
"status": "resolved",
|
|
115
|
+
"lens": "verification_release_boundary",
|
|
116
|
+
"summary": "D070-00 explicitly freezes AC05.1 fields/version identities and A13 independent oracle at P0; M2 wires the frozen contract rather than defining it late.",
|
|
117
|
+
"invalidates": [
|
|
118
|
+
"implementation_annex"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"gates": [
|
|
123
|
+
{
|
|
124
|
+
"id": "structural_docs",
|
|
125
|
+
"status": "passed",
|
|
126
|
+
"evidence": "DSH repository audit: 29 Markdown files, zero errors/warnings; documentation unit tests 3/3 and release-pack tests 2/2 passed. Codex scoped audit: 2 Markdown files, zero errors/warnings; full validate-skills passed 36 skills. Native/product implementation acceptance is not claimed."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "shared_copy",
|
|
130
|
+
"status": "passed",
|
|
131
|
+
"evidence": "Byte-identical shared planning copies; SHA256 523f9239168fb11d8daf72d6c3348b3121caa1b05aaa7f32afd3692952c477d5."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "independent_review",
|
|
135
|
+
"status": "passed",
|
|
136
|
+
"evidence": "Plan.1 seven-lens review retained for unchanged contract. Incident reopened authority/state-effect/verification and affected migration only. mechanism_review and codex_next_audit independently read final bytes; D070-STOP-R01 corrected and rechecked. No open P1. Planning freeze only; product P0 and runtime implementation remain pending. Prior subject cd86da843acbc38190307e8e604ddab6a3e464be857f4baa9da4b4b3db3bb755."
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"freeze_decision": {
|
|
140
|
+
"status": "frozen",
|
|
141
|
+
"subject_sha256": "d9b19bddfa99fff432e1001b762543049a02fcd62060821bfc8b19b4514c7f96",
|
|
142
|
+
"open_p1_ids": []
|
|
143
|
+
}
|
|
144
|
+
}
|