mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
refactor(process): route remaining captured output and cancellations through their owners (#11787)
Migrate the remaining 2 direct AnalysisCancelledError constructions onto cancelledBy and the remaining 14 process-snapshot stdout/stderr copy sites onto capturedProviderOutput, burning down both architecture-guard baselines to zero.
This commit is contained in:
1 parent
1e9df09f68
commit
62f5946ba1
17 files changed
+94
-123
No files matched your search
@@ -49,6 +49,7 @@ import {
|
||||
type SpawnedOwnedProviderProcess,
|
||||
} from "../../process/ProviderProcess.js";
|
||||
import { prepareProcessOwnershipInspection } from "../../process/ProcessOwnershipObservation.js";
|
||||
import { capturedProviderOutput } from "../../process/capturedProviderOutput.js";
|
||||
import { errorMessage } from "../../kernel/errorMessage.js";
|
||||
|
||||
const OPERATION = "trace_web_source_location";
|
||||
@@ -544,15 +545,14 @@ class OwnedCodec implements SourceMapCleanupOwner {
|
||||
outputComplete: boolean,
|
||||
) {
|
||||
if (snapshot === undefined) return undefined;
|
||||
const captured = capturedProviderOutput(
|
||||
exit === undefined
|
||||
? snapshot
|
||||
: { ...snapshot, exitCode: exit.code, signal: exit.signal },
|
||||
);
|
||||
return {
|
||||
stdout: snapshot.stdout.text,
|
||||
stderr: snapshot.stderr.text,
|
||||
truncated: snapshot.diagnosticTruncated === true || !outputComplete,
|
||||
stdout_bytes: snapshot.stdout.observedBytes,
|
||||
stderr_bytes: snapshot.stderr.observedBytes,
|
||||
...(exit === undefined
|
||||
? {}
|
||||
: { exit_code: exit.code, signal: exit.signal }),
|
||||
...captured,
|
||||
truncated: captured.truncated || !outputComplete,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user