fix: scope extracted output counts to package provenance
Snapshot non-archive outputs around each main, hybrid, and nested extraction and attribute only files created or changed by that package. Persist deduplicated hashed provenance keys so shared extract directories and restarts cannot count unrelated package outputs. Cover startup extraction in a shared target containing an existing foreign file and validate persisted provenance normalization.
This commit is contained in:
@@ -11466,8 +11466,10 @@ describe("download manager", () => {
|
||||
tempDirs.push(root);
|
||||
|
||||
const outputDir = path.join(root, "downloads", "recovery");
|
||||
const extractDir = path.join(root, "extract", "recovery");
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
const extractDir = path.join(root, "extract");
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
fs.mkdirSync(extractDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(extractDir, "foreign-package.txt"), "foreign");
|
||||
|
||||
const zip = new AdmZip();
|
||||
zip.addFile("episode.txt", Buffer.from("ok"));
|
||||
@@ -11518,7 +11520,7 @@ describe("download manager", () => {
|
||||
token: "rd-token",
|
||||
outputDir: path.join(root, "downloads"),
|
||||
extractDir: path.join(root, "extract"),
|
||||
createExtractSubfolder: true,
|
||||
createExtractSubfolder: false,
|
||||
autoExtract: true,
|
||||
enableIntegrityCheck: false,
|
||||
cleanupMode: "none"
|
||||
|
||||
Reference in New Issue
Block a user