fix: mark backup snapshots without metadata invalid

This commit is contained in:
AI Bot
2026-06-06 19:26:18 +08:00
parent cfd41b4fbf
commit bddbe8b5ba
2 changed files with 10 additions and 1 deletions

View File

@@ -372,7 +372,7 @@ export async function listBossStateBackups(limit = 20): Promise<BossStateBackupS
fileName,
absolutePath,
bytes: typeof meta.bytes === "number" ? meta.bytes : stat.size,
sha256: typeof meta.sha256 === "string" ? meta.sha256 : createHash("sha256").update(text).digest("hex"),
sha256: typeof meta.sha256 === "string" ? meta.sha256 : "",
createdAt: typeof meta.createdAt === "string" ? meta.createdAt : stat.mtime.toISOString(),
actorAccount: typeof meta.actorAccount === "string" ? meta.actorAccount : undefined,
reason: typeof meta.reason === "string" ? meta.reason : undefined,