package governance import ( "crypto/sha256" "encoding/hex" ) // The recovery request has its own queue identity and stable operation. It // borrows the original window's fence, never its immutable sending identity. func LibraryRecoveryQueueID(windowJob string) string { sum := sha256.Sum256([]byte(windowJob)) return "lrec-" + hex.EncodeToString(sum[:14]) } func LibraryRecoveryDigest(scope, queue, window, operation, target, source, backup, plan string) (string, error) { return LibraryRequestDigest(scope, LibraryJobRecover, map[string]any{ "recovery_queue": queue, "window_job": window, "original_operation": operation, "target_id": target, "source_snapshot": source, "backup_snapshot": backup, "writeset_digest": plan, }) }