mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
test(process): distinguish native preparation from capture allocation
A missing temporary path stops Darwin native-inspector preparation before capture allocation can account for resources. Keep its progress coverage unknown; Linux reaches the capture root allocation and reports not-required resources. Assert the public typed failure preserves the selected temp path. The combined Electron/progress focused rerun passed 33 tests on macOS arm64 with Node 24.18.0. The seven progress cases passed; native Linux was not run. Static checks, docs checks and test discovery also passed on the final tree.
This commit is contained in:
1 parent
49e67aa1d9
commit
dc936f433c
1 file changed
+15
-4
@@ -289,7 +289,7 @@ itWithCaptureCapability(
|
||||
);
|
||||
|
||||
itWithCaptureCapability(
|
||||
"reports no acquired resources when temporary-root creation fails",
|
||||
"reports startup cleanup coverage when temporary storage is unavailable",
|
||||
async () => {
|
||||
const scenario = await writeScenario(
|
||||
"rea-process-progress-prepare-failed-",
|
||||
@@ -312,14 +312,25 @@ itWithCaptureCapability(
|
||||
});
|
||||
|
||||
expect(capture.exitCode).toBe(1);
|
||||
const error = analysisCliErrorEnvelopeSchema.parse(
|
||||
JSON.parse(capture.stdout),
|
||||
);
|
||||
expect(error).toMatchObject({
|
||||
code: "process_capture_failed",
|
||||
details: { execution_failure: expect.stringContaining(missingTempRoot) },
|
||||
});
|
||||
// Darwin prepares its native inspector before acquiring capture resources.
|
||||
// Other hosts reach the capture root allocation, whose failure is accounted.
|
||||
const cleanupState =
|
||||
process.platform === "darwin" ? "unverified" : "not_required";
|
||||
expect(capture.lines.at(-1)?.update).toMatchObject({
|
||||
phase: "cleanup",
|
||||
terminal: true,
|
||||
details: {
|
||||
disposition: "failed",
|
||||
owned_process_group: "not_required",
|
||||
terminal_renderer: "not_required",
|
||||
temporary_root: "not_required",
|
||||
owned_process_group: cleanupState,
|
||||
terminal_renderer: cleanupState,
|
||||
temporary_root: cleanupState,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user