mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): persist cluster secret transition receipts
This commit is contained in:
@@ -19,7 +19,7 @@ QingLong 3.0 的 workspace package 必须表达独立制品、权限、依赖隔
|
||||
- `ownership_review`:尚需按 capability 继续下沉,但不得在评审前增长。
|
||||
4. 超过登记 hard cap 必须失败;目录重构后降到阈值以下时,旧登记必须删除,避免永久豁免。
|
||||
5. `src/` 根层继续执行 D-269 的精确 entry role、file cap、line cap 和 public-export-only 校验。内部密度门不能替代根门,也不能作为新增 workspace package 的理由。
|
||||
6. 初始冻结 8 个目录:两个 migration ledger,以及 `cluster-admin` 的 prompt-output/worker-credential、`local-owner-cli` 的 deployment/cutover、`runtime-core` 的 security/tool-execution。首个收口把 cutover 的 target-run lifecycle 与 manual-resolution ceremony 下沉到两个 capability 子目录,直接文件 16→10;第二个收口把 Tool Registry facade、Project Tool snapshot 与内建 Run Read 投影下沉到 `tool-registry/` 和 `builtin-run-read/`,tool-execution 直接文件 15→11;第三个收口把 Worker credential management service、transport、HTTP、mTLS、process 与 CLI 下沉到同一 `management-server/` 部署能力目录,worker-credential 直接文件 16→10,同时保留 client、executor 与 delivery 的独立 ownership;第四个收口把 Prompt Output 的 external recovery、retention GC 和 key management 分别下沉到 `external-recovery/`、`retention/` 与 `key-management/`,prompt-output 直接文件 13→0;第五个收口把 Local deployment 的六个 Compose lifecycle 文件与四个共享 contract/file/Docker/render 基础分别下沉到 `compose/` 与 `foundation/`,deployment 直接文件 13→3,顶层只保留 facade、CLI 与 status;第六个收口把 Runtime Security 的身份/API 凭据、Project Policy 与安全审计分别下沉到 `identity-credential/`、`project-policy/` 与 `audit/`,security 直接文件 12→1,根层只保留跨域 principal/fence primitive。六项都删除 stale review;当前只剩两个按原序保留的 migration ledger,没有 ownership review。
|
||||
6. 初始冻结 8 个目录:两个 migration ledger,以及 `cluster-admin` 的 prompt-output/worker-credential、`local-owner-cli` 的 deployment/cutover、`runtime-core` 的 security/tool-execution。首个收口把 cutover 的 target-run lifecycle 与 manual-resolution ceremony 下沉到两个 capability 子目录,直接文件 16→10;第二个收口把 Tool Registry facade、Project Tool snapshot 与内建 Run Read 投影下沉到 `tool-registry/` 和 `builtin-run-read/`,tool-execution 直接文件 15→11;第三个收口把 Worker credential management service、transport、HTTP、mTLS、process 与 CLI 下沉到同一 `management-server/` 部署能力目录,worker-credential 直接文件 16→10,同时保留 client、executor 与 delivery 的独立 ownership;第四个收口把 Prompt Output 的 external recovery、retention GC 和 key management 分别下沉到 `external-recovery/`、`retention/` 与 `key-management/`,prompt-output 直接文件 13→0;第五个收口把 Local deployment 的六个 Compose lifecycle 文件与四个共享 contract/file/Docker/render 基础分别下沉到 `compose/` 与 `foundation/`,deployment 直接文件 13→3,顶层只保留 facade、CLI 与 status;第六个收口把 Runtime Security 的身份/API 凭据、Project Policy 与安全审计分别下沉到 `identity-credential/`、`project-policy/` 与 `audit/`,security 直接文件 12→1,根层只保留跨域 principal/fence primitive。六项都删除 stale review;当前只剩两个按原序保留的 migration ledger,没有 ownership review。ADR-0396 追加 PostgreSQL `pg-0063` 后,该 ordered ledger 的受审 hard cap 随事实从 63 精确推进到 64;这不改变 12 文件评审阈值,也不放宽其他目录。
|
||||
7. 审计只在开发、CI 和发布检查中短生命周期运行;不进入 Edge、Standalone、Worker 或 Cluster 常驻制品,不增加依赖、进程、监听、timer、内存或闪存写入。
|
||||
|
||||
## 机器门禁
|
||||
|
||||
@@ -36,5 +36,7 @@ D-306B1 只允许给当前 active 且尚未绑定的 Package generation 做首
|
||||
- 本切片没有新增 workspace package、第三方依赖、表、连接、daemon、timer、watcher 或常驻资源;Edge/Standalone 只增加 SQLite schema guard,Cluster 复用既有 PostgreSQL Pool/role。完整 18-package 串行测试与 backend 门已通过;真实 PostgreSQL 18.4 的 migration/runtime role 门证明 active、合规 staged 与 exact replay 可写,activating、陈旧/非最大 staged 以及直接 SQL 可被拒绝。
|
||||
- Local Owner 产品纵切面已完成:新增私有短命令 `plugin-package.secret-binding.transition.plan|execute`,从当前 staged head、上一 active install/proposal/lock、历史 binding 与 durable 最大尝试 generation 重建计划;Owner 重新鉴权后在一个 `BEGIN IMMEDIATE` 中原子写入可选目标 binding、allowed audit 和 immutable transition receipt。相同 plan/audit 可跨时钟 exact replay,revoke 通过 `bindingDigest: null` receipt 表达,不制造空 binding。
|
||||
- SQLite capability v49(0097/0098)新增 transition receipt ledger、exact schema/readiness/typed schema 和插入 trigger。安装恢复在缺 receipt 时不扫描该 staged generation,旧 active 继续服务;共享 activation prerequisite 在直接安装/恢复路径再次 fail-closed 检查 receipt,receipt 到位后才允许 active CAS。没有新增连接、timer、watcher、常驻进程、workspace package 或第三方依赖,Edge/Standalone/Adopted 共用同一 SQLite authority。
|
||||
- Runtime Core 533/533、Local SQLite 235/235、Local Admin 91/91、Local Owner CLI 165 pass/5 条 root-only skip、Local Application 47 pass/4 条平台 skip,合计 1071 pass/9 条条件 skip/0 fail;定向纵切面覆盖 staged 阻断、Owner plan/execute、binding+receipt 原子提交、跨时钟 replay 和 receipt 后恢复激活。
|
||||
- Cluster management/executor 仍未消费 transition plan;真实 Kubernetes rotation/revoke、升级失败回滚及物理低配设备证据也仍待完成。因此 ADR 继续保持 Proposed,下一切片实现 PostgreSQL receipt ledger、separation-of-duty Approval 与 package-executor,再进入 Kubernetes/低配现场门。
|
||||
- PostgreSQL capability v62(pg-0063)新增不可变 transition receipt ledger。package-executor 在一个 SERIALIZABLE transaction 内复验 current staged head、上一 active lineage、durable 最大 generation 与可选上一 binding,随后原子写入目标 binding(revoke 时为空)和 receipt;数据库 trigger 独立重验 staged target,角色只取得 receipt 的 `SELECT, INSERT`。安装恢复与直接 activation 共用 receipt prerequisite,缺 receipt 的 staged generation 不进入激活候选。真实 PostgreSQL 18.4 已通过 63 条 migration、最小角色 readiness、binding+receipt 原子提交、exact replay、activating/错误 lineage 拒绝;同时修复并回归了 PostgreSQL `jsonb` 对象键重排后的 transition plan 归一化,digest 与语义校验不依赖对象属性顺序。
|
||||
- 阶段完整性门已串行复验:18 个 `ql3-*` workspace package 的统一 clean build/test 退出 0;backend 共 1194 项,1192 pass、2 条条件 skip、0 fail;PostgreSQL 18.4 arm64 physical HA 完成 timeline `1→2` 提升并通过 125 项门禁,报告 SHA-256 为 `a72477cfd40e9945fd97ed18dd014f4600e0049a29285990c6359054309db812`。package boundary、cluster dependency 与 edge import 审计均无新增越界;这些证据证明当前 authority 与既有运行路径兼容,不替代尚未完成的真实 Kubernetes rotation/revoke 和固定低配物理设备验证。
|
||||
- Runtime Core 534/534、Local SQLite 235/235、Local Admin 91/91、Local Owner CLI 165 pass/5 条 root-only skip、Local Application 47 pass/4 条平台 skip,合计 1072 pass/9 条条件 skip/0 fail;定向纵切面覆盖 staged 阻断、Owner plan/execute、binding+receipt 原子提交、跨时钟 replay 和 receipt 后恢复激活。
|
||||
- Cluster management/executor 的 separation-of-duty 产品编排仍未消费 transition plan;真实 Kubernetes rotation/revoke、升级失败回滚及物理低配设备证据也仍待完成。因此 ADR 继续保持 Proposed,下一切片把既有 package-manager Approval 与 package-executor 接入这条 durable authority,再进入 Kubernetes/低配现场门。
|
||||
|
||||
Reference in New Issue
Block a user