fix(providers): bound launcher diagnostics without losing byte counts

Give Ghidra and Hopper an 8 MiB aggregate retained-output budget while continuing to drain their process pipes. Expose total observed bytes at the supervisor boundary and retained bytes plus explicit truncation in provider diagnostics.

Redact known transport tokens even when the retained prefix ends inside one, preserving adjacent caller path/query evidence. Existing partial-launch and cleanup ownership remain intact.

Validation: 285 tests across 34 focused suites passed; the final cutoff-fixture refinement passed all 31 Ghidra/Hopper diagnostic tests. check:fast and architecture guards passed. Provider fixtures use real child processes; real Ghidra/Hopper applications were not verified.
This commit is contained in:
morluto committed 2026-10-11 02:50:06 +08:00
1 parent cb13a27bfa
commit ba056e08a4
14 files changed
+302 -33

No files matched your search

+22 -6
View File
@@ -20,8 +20,12 @@ it.each([
const stderr =
"FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory\r\n";
const cause = new OwnedCommandFailure("process", "Decoder failed", {
stdout: { text: "", bytes: 0 },
stderr: { text: stderr, bytes: Buffer.byteLength(stderr) },
stdout: { text: "", bytes: 0, observedBytes: 0 },
stderr: {
text: stderr,
bytes: Buffer.byteLength(stderr),
observedBytes: Buffer.byteLength(stderr),
},
exitCode,
signal,
});
@@ -70,8 +74,12 @@ it.each([
format: "har",
});
const cause = new OwnedCommandFailure("process", "Decoder failed", {
stdout: { text: "", bytes: 0 },
stderr: { text: stderr, bytes: Buffer.byteLength(stderr) },
stdout: { text: "", bytes: 0, observedBytes: 0 },
stderr: {
text: stderr,
bytes: Buffer.byteLength(stderr),
observedBytes: Buffer.byteLength(stderr),
},
exitCode,
signal,
});
@@ -128,8 +136,16 @@ it("retains actual command status and both diagnostic streams when cleanup also
"process",
"Observed command failure",
{
stdout: { text: "original provider output", bytes: 24 },
stderr: { text: "private-marker provider reason", bytes: 30 },
stdout: {
text: "original provider output",
bytes: 24,
observedBytes: 24,
},
stderr: {
text: "private-marker provider reason",
bytes: 30,
observedBytes: 30,
},
exitCode: 2,
signal: null,
},