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:
morluto authored and GitHub committed 2026-10-08 04:46:46 +08:00
1 parent 63ba7424c0
commit 63cf28fd8f
51 files changed
+5506 -316

No files matched your search

+2
View File
@@ -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);
};
+8 -3
View File
@@ -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,