mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 11:13:21 +00:00
fix(process): preserve partial evidence and verify detached cleanup (#1011)
* test(ci): allow transport delivery in source identity regression * fix(process): preserve partial evidence and verify detached cleanup * fix(process): scope Linux token sweeps by stable process identity * fix(process): retain environment permission failure codes * fix(process): wait for signaled processes before verifying cleanup * fix(process): verify sampled detached groups during cleanup * fix(electron): preserve prelaunch identities through cleanup * fix(process): retry growing Darwin process table snapshots * fix(process): retain compatibility with saved v3 capture evidence * fix(process): migrate saved v3 captures during reconstruction verification * fix(process): preserve cancellation during Darwin helper compilation * fix(process): propagate cancellation through ownership baselines * perf(javascript): cache canonical export comparison sort keys * fix(process): cancel provider ownership preparation before spawn * fix(process): isolate native compiler waiter cancellation
This commit is contained in:
1 parent
63ba7424c0
commit
63cf28fd8f
51 files changed
+5506
-316
No files matched your search
@@ -336,6 +336,7 @@ const launchHopperProcess = async (input: {
|
||||
arguments: arguments_,
|
||||
runId: input.session.runId,
|
||||
expectedCommand: ownershipCommand,
|
||||
...(input.signal === undefined ? {} : { signal: input.signal }),
|
||||
});
|
||||
if (input.linuxDemo !== undefined)
|
||||
return spawnOwnedProviderProcess({
|
||||
@@ -343,6 +344,7 @@ const launchHopperProcess = async (input: {
|
||||
arguments: input.linuxDemo.args,
|
||||
runId: input.session.runId,
|
||||
expectedCommand: ownershipCommand,
|
||||
...(input.signal === undefined ? {} : { signal: input.signal }),
|
||||
});
|
||||
return spawn(input.argumentsForTarget);
|
||||
};
|
||||
|
||||
@@ -20,6 +20,9 @@ const PYTHON_PATH = "/usr/bin/python3";
|
||||
const UNSHARE_PATH = "/usr/bin/unshare";
|
||||
const DEFAULT_PROBE_TIMEOUT_MS = 5_000;
|
||||
|
||||
const isAborted = (signal: AbortSignal | undefined): boolean =>
|
||||
signal?.aborted === true;
|
||||
|
||||
export type LinuxPrivateDisplayRunnableStrategy = Exclude<
|
||||
HopperPrivateDisplayStrategy,
|
||||
"unavailable"
|
||||
@@ -101,8 +104,7 @@ export const selectLinuxPrivateDisplayStrategy = async (options: {
|
||||
/** Run one helper probe in an owned process group and retain its full diagnostics. */
|
||||
export const runLinuxPrivateDisplayProbe: LinuxPrivateDisplayProbeRunner =
|
||||
async (strategy, options) => {
|
||||
if (options.signal?.aborted === true)
|
||||
return emptyProcessResult("cancelled");
|
||||
if (isAborted(options.signal)) return emptyProcessResult("cancelled");
|
||||
const command = privateDisplayProbeCommand(options.helperPath, strategy);
|
||||
let started: Awaited<ReturnType<typeof spawnOwnedProviderProcess>>;
|
||||
try {
|
||||
@@ -111,11 +113,14 @@ export const runLinuxPrivateDisplayProbe: LinuxPrivateDisplayProbeRunner =
|
||||
arguments: command.arguments,
|
||||
runId: randomUUID(),
|
||||
expectedCommand: null,
|
||||
...(options.signal === undefined ? {} : { signal: options.signal }),
|
||||
});
|
||||
} catch (cause: unknown) {
|
||||
// best-effort cleanup: probe spawn failure is reported as launch-failed.
|
||||
void cause;
|
||||
return emptyProcessResult("launch-failed");
|
||||
return emptyProcessResult(
|
||||
isAborted(options.signal) ? "cancelled" : "launch-failed",
|
||||
);
|
||||
}
|
||||
const launch: ProviderProcessLaunch = {
|
||||
process: started.process,
|
||||
|
||||
Reference in new issue
Block a user