feat(ql3): prepare private reconciliation reviews

This commit is contained in:
whyour
2026-08-21 18:35:28 +08:00
parent 473a535815
commit 827ba5294f
13 changed files with 1744 additions and 8 deletions
+7 -4
View File
@@ -11,9 +11,9 @@
最新增量证据(2026-08-21):
- D-391/ADR-0484契约已冻结,待实现):`reconciliation_planned` 仍是内容无关 summary,不能为人工裁决泄漏明细或获得 import authority。
下一切片在既有 Local Owner `deployment/reconciliation/review/` 增加
`reconciliation.review.prepare|diagnostics|commit|verify`,以
- D-391/ADR-0484第一切片已实现,commit/verify 待实现):`reconciliation_planned` 仍是内容无关 summary,不能为人工裁决泄漏明细或
获得 import authority。既有 Local Owner 已在 `deployment/reconciliation/review/` 增加
`reconciliation.review.prepare|diagnostics`,并为后续 commit/verify 冻结
`reconciliation_planned → reconciliation_review_prepared → reconciliation_reviewed` CAS 建立唯一 review fence。diagnostics 每次只把
一个 database/domain/fact-kind 的最多 64 条私有记录 no-replace 写入 caller 指定的 owner-only 文件;stdout 只返回 page digest、计数和
offset,不含路径、名称或 fact digest。commit 不信任 page,而是从 exact sealed bundle 重新流式派生 canonical facts,与 Edge ≤8 MiB、
@@ -22,7 +22,10 @@
exact review file/plan/bundle/head fence 签名;terminal review 只保存签名 authorization、compact counts/digest 和 content-free receipt。
verify 不打开 SQLite。实现不新增 package/dependency/binary/daemon,不把文件平铺回 `src/` 根,也不调用 DML、Secret 解密、Docker/init/
network。后续领域 adapter 必须消费 exact `reviewDigest` 后重新认证和授权,分别定义 backup、prepare/commit、幂等与 rollback,不能把
review completion 当作 reconciliation completion。
review completion 当作 reconciliation completion。当前聚焦套件 `28 total / 26 pass / 2 conditional Docker skip / 0 fail`Local Owner
`250 total / 243 pass / 7 conditional skip / 0 fail`tracked backend `1540 total / 1538 pass / 2 conditional skip / 0 fail`
18-package clean build/逐包测试、八项架构/发布审计、十四档 artifact 和真实 Docker readonly `2/2` 全通过。workspace 仍为 18
packagesLocal Owner `149 source / 148 nested / 1 root binary entry`;新增 3 个源码全部位于 review 子目录,基础常驻 closure 不增长。
- D-390/ADR-0483(已接受):既有 Local Owner 已实现密封 capture 的严格只读消费与独立
`reconciliation.plan.prepare|commit|verify`。capture v2 使用 SQLite 可识别的固定 `target.sqlite* / legacy.sqlite* /
recovery.sqlite` 物理名和 `0400/0500` terminal sealmain-only 走 immutable readonlyWAL+SHM 完整配对走普通 readonlyhot
@@ -119,6 +119,23 @@ import Local SQLite mutation、adoption publisher 或 runtime execution authorit
运行时最多一个 SQLite handle、一个 decision iterator、64 KiB hash/read buffer、64 条 page record 和固定八领域 counters。diagnostics
output 不进入基础 Edge/Standalone artifactCluster/PostgreSQL/Kubernetes 不读取 Local review root、authorization 或 reviewer identity。
## 当前实现进度
D-391 第一切片已实现 `review.prepare``review.diagnostics`。prepare 读取并重验 exact terminal plan/bundle,以 instance CAS 建立
`reconciliation_review_prepared` 唯一 fence,覆盖 head response loss、第二 review、rollback 和 restart 拒绝。diagnostics 在每次
SQLite open 前后重验密封资产,只为一个 database/domain/fact-kind 发布最多 64 条 owner-only pageSecret、identity、history 和 unknown
facts 固定 blocked,未知表不读取 rowterminal result 不返回路径、名称或 fact digest。page 使用 256 KiB 固定上限、deterministic
stage、hard-link no-replace 与 fsync,重复请求只能得到 byte-exact existing page。
验证结果:聚焦套件 `28 total / 26 pass / 2 conditional Docker skip / 0 fail`;完整 Local Owner
`250 total / 243 pass / 7 conditional skip / 0 fail`tracked backend `1540 total / 1538 pass / 2 conditional skip / 0 fail`
18-package clean build/逐包测试、八项架构/发布审计、十四档 artifact audit 与真实 Docker readonly `2/2` 均通过。workspace 仍为 18
packages`singleSourcePackages=[]``shallowSourcePackages=[]`Local Owner 为 `149 source / 148 nested / 1 root binary entry`,新增
3 个源码全部位于 `deployment/reconciliation/review/`,没有新增 dependency 或常驻对象,基础 Edge/Standalone closure 未增长。
`review.commit`、强认证 User/issuer keyring authorization、terminal seal、`reconciliation_reviewed` 推进和 `review.verify` 尚未实现,因此本
ADR 继续保持 Proposed;当前 prepared review 不授予任何 import、rollback 或 restart authority。
## 被拒绝的替代方案
### 把对象名和冲突列表直接加入 plan