fix(javascript)!: retain nested artifact readers in caller scopes

Require the caller artifact resource scope when reading JavaScript artifacts. Transfer failed nested ASAR cleanup to that scope so later work retries the same owner before admission. Preserve traversal failures and attempt every remaining iterator during unwind.

Validation: reconstruction, integrity, content identity, cancellation and nested-reader cleanup boundary checks.

BREAKING CHANGE: readJavaScriptArtifactFiles now requires ArtifactResourceScope as its third argument; the optional abort signal is fourth.
This commit is contained in:
morluto
2026-10-11 05:33:15 +08:00
parent a17e257f43
commit 684199ba0b
8 changed files with 133 additions and 19 deletions
@@ -96,7 +96,12 @@ export const reconstructJavaScriptArtifact = async (
"read_javascript_artifacts",
"Reading inventoried JavaScript application sources",
);
const files = await readJavaScriptArtifactFiles(reader, snapshot, signal);
const files = await readJavaScriptArtifactFiles(
reader,
snapshot,
scope,
signal,
);
await reportPhase(
"parse_javascript_sources",
`Parsing and projecting ${String(files.files.length)} application source files`,