fix(extraction): close final scope integration gaps

Ignore late JVM output events after abort or timeout until the real child close reconciles opened files. Restrict deferred archive cleanup to package-owned item paths so shared download roots retain foreign archives while package-local empty directory cleanup still works. Update deferred ownership and output-scope fixtures to the coordinator contract.
This commit is contained in:
Sucukdeluxe
2026-08-22 17:29:03 +02:00
parent 3e18ec57ea
commit 522f53d787
4 changed files with 231 additions and 118 deletions
+10 -4
View File
@@ -1863,6 +1863,9 @@ function handleDaemonLine(line: string): void {
if (daemonCurrentRequest) {
const req = daemonCurrentRequest;
if (req.terminationStarted) {
return;
}
parseJvmLine(trimmed, req.onArchiveProgress, req.parseState, req.onOutput);
failDaemonOutputCallback(req);
}
@@ -1912,12 +1915,15 @@ function startDaemon(layout: JvmExtractorLayout): boolean {
child.stderr!.on("data", (chunk) => {
const raw = String(chunk || "");
daemonOutput = appendLimited(daemonOutput, raw);
daemonStderrBuffer += raw;
const lines = daemonStderrBuffer.split(/\r?\n/);
daemonStderrBuffer = lines.pop() || "";
for (const line of lines) {
daemonStderrBuffer += raw;
const lines = daemonStderrBuffer.split(/\r?\n/);
daemonStderrBuffer = lines.pop() || "";
for (const line of lines) {
if (daemonCurrentRequest) {
const req = daemonCurrentRequest;
if (req.terminationStarted) {
continue;
}
parseJvmLine(line, req.onArchiveProgress, req.parseState, req.onOutput);
failDaemonOutputCallback(req);
}