fix(cache-storage): verify candidate entries before inspect() reports verified (02-05)
inspect() read only the marker and set verified to true for every candidate, even one whose entries the browser had evicted. It now runs the same entry check as activation, so the cost grows with the entry count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0b41cb38af
commit
55c0bf52bb
@@ -866,10 +866,19 @@ export function createPublicResponseCacheAdapter(
|
||||
unreadableOwnedCacheCount += 1;
|
||||
continue;
|
||||
}
|
||||
// 02-05. The marker only claims staging finished; `verified` means
|
||||
// every entry is still present and matches, as activation checks.
|
||||
const candidate = await verifyReleaseCandidate(
|
||||
cache,
|
||||
marker.value.assets,
|
||||
policy,
|
||||
dependencies.crypto,
|
||||
undefined,
|
||||
);
|
||||
candidates.push(
|
||||
Object.freeze({
|
||||
releaseRegistryId: marker.value.releaseRegistryId,
|
||||
verified: true,
|
||||
verified: candidate.kind === "VERIFIED",
|
||||
entryCount: marker.value.entryCount,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user