fix(artifacts): preserve decode coverage and cleanup ownership

This commit is contained in:
morluto
2026-10-13 12:54:22 +08:00
parent c74142e6bd
commit a73a55f53c
8 changed files with 305 additions and 45 deletions
+9 -13
View File
@@ -213,19 +213,15 @@ export const inventoryFirmwareOutput = async (
});
if (handle === undefined) continue;
const names: string[] = [];
try {
for await (const entry of handle) {
throwIfFirmwareInventoryCancelled(signal, operation);
count++;
if (count > maxEntries)
throw new AnalysisOutputError(
operation,
`Staging entry budget exceeded (${maxEntries})`,
);
names.push(entry.name);
}
} finally {
await handle.close().catch(() => undefined);
for await (const entry of handle) {
throwIfFirmwareInventoryCancelled(signal, operation);
count++;
if (count > maxEntries)
throw new AnalysisOutputError(
operation,
`Staging entry budget exceeded (${maxEntries})`,
);
names.push(entry.name);
}
for (const name of names.sort()) {
const path = join(directory, name);