fix(release): 完成分发身份与 CAS legacy ownership 收尾
bat-rust / Build and test Rust (push) Canceled after 0s
bat-rust / Build and test Go API (push) Canceled after 0s

This commit is contained in:
2026-09-13 10:44:24 +08:00
parent 786b739f99
commit 5bae90cb14
14 changed files with 867 additions and 109 deletions
+9 -6
View File
@@ -127,14 +127,17 @@ rollback 与 cleanup 保持独立;缺少 generic manifest 的旧 localized rel
本轮 P1 一致性修复已完成:CAS repository 的 store/get/reference/GC 使用跨进程操作锁,
release-local CAS 引用通过持久化 `ownership_id + ordinal` ledger 幂等释放;没有
`ownership_id` 的旧清单走明确 legacy cleanup path,不随机迁移 ownership。官方历史复用
只对不可变文件使用 hard link,`translation-tasks.sqlite` 及 WAL/SHM 始终独立复制;
`ownership_id` 的旧清单按持久化 output-root scope、source mapping 和 generation identity
迁移,已有 basename ledger 的部分 cleanup 保持 legacy compatibility key,完成后同名新
generation 使用新的 ownership,不随机迁移已开始的 cleanup。官方历史复用只对不可变文件使用 hard link,`translation-tasks.sqlite` 及 WAL/SHM 始终独立复制;
localized output 使用单写者锁和事务日志恢复 publish/rollbackpublish 只有最终
`verified` phase 才能 roll-forward,并在发布时写入实际 localized bytes/BLAKE3 的
distribution manifest。`release.distribution(destination=...)` 是单条 lookup,返回
exactly one entry;分发读取只使用轻量发布 metadata,保留 path ownership、symlink 和
文件完整性检查;`release.cleanup execute` 与 official sync 共用 `.official-sync.lock`
P2 尚未由本轮处理:ResourceRepository
distribution manifest。official/localized distribution manifest 还持久化 deterministic
source/localized mapping identity 和 destination index`release.distribution(destination=...)`
是单条 lookup,返回 exactly one entrysource identity mismatch 会阻断 localized
distribution,完整 identity 校验只在 publish/status/audit 路径执行;分发读取保留 path
ownership、symlink 和文件完整性检查;`release.cleanup execute` 与 official sync 共用
`.official-sync.lock`。本轮已关闭两个 Release/CAS P2。其他 P2 尚未由本轮处理:ResourceRepository
更完整的查询/权限/损坏恢复、模糊 TM、bat.sock peer credential/perms、FFI 生命周期、
资源大小/限额与更强的持久化 fsync 语义仍按后续专项推进。