fix(library): 收口 B1-R1/B2-R1/B5-R1 并让恢复链经过正式队列终态

B1-R1: 演练写集改为受限 restore-drill(V2 信封/contract 1/schema 摘要,零对象、零索引、零本地映射,来源身份必填)。B2-R1: verify 作业先建不可变 operation 并携带 operation_id,同 job recover 的网关 claim 同时携带原 operation 与 recovery 身份。B5-R1: 前端按 scope 世代与动作序号丢弃迟到响应,不污染新 scope 或父级旧回调。harness 的 recovery 改由生产 jobs.Worker.RunOnce 消费并读回 jobs 终态;原失败窗口作业保持 failed,不改写历史。
This commit is contained in:
姚章浩
2026-11-03 13:02:42 +08:00
parent f9457fab52
commit b4add6c9b0
12 changed files with 1515 additions and 18 deletions
@@ -53,6 +53,12 @@ func ObjectGatewayPlan(set libraryrelease.WriteSet) (objectgateway.Plan, error)
func gatewayCreateOperation(plan, owner string) string {
return objectgateway.Digest([]byte(plan + "\x00" + owner + "\x00create"))
}
// OwnedAttemptClaim 暴露本装配冻结的 attempt claim:受限演练计划/回放必须与它一致。
func (s *GatewayObjectStore) OwnedAttemptClaim() (objectgateway.Claim, bool) {
return s.Claim, s.Automatic
}
func (s *GatewayObjectStore) BindObjectPlan(set libraryrelease.WriteSet) error {
if !validLowerSHA256(set.Digest) || set.JobID == "" {
return errors.New("gateway frozen plan identity missing")