test(process): serialize real CLI capture boundaries
This commit is contained in:
+3
-1
@@ -469,7 +469,9 @@ provider evidence.
|
|||||||
Each Vitest project uses up to two workers, bounded by available host parallelism.
|
Each Vitest project uses up to two workers, bounded by available host parallelism.
|
||||||
Default-group projects can run together. Only `process-boundary` runs in the
|
Default-group projects can run together. Only `process-boundary` runs in the
|
||||||
later sequence group and serializes its files because process-tree observations
|
later sequence group and serializes its files because process-tree observations
|
||||||
share host sampling resources. Acceptance and process-global files retain isolated
|
share host sampling resources. Tests that launch the real process harness belong
|
||||||
|
in `tests/boundary/process/`, including CLI command and environment tests.
|
||||||
|
Acceptance and process-global files retain isolated
|
||||||
forks but are not serialized; isolation does not imply serial scheduling. CI uses
|
forks but are not serialized; isolation does not imply serial scheduling. CI uses
|
||||||
the same per-project worker bound.
|
the same per-project worker bound.
|
||||||
The pure domain/contracts and recording-port service projects share one worker
|
The pure domain/contracts and recording-port service projects share one worker
|
||||||
|
|||||||
@@ -4,11 +4,14 @@ import { join } from "node:path";
|
|||||||
|
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
import { captureProcessScenarioFile } from "./application/process/ProcessCli.js";
|
import {
|
||||||
import { runCapabilityStatus } from "./composition/directAnalysis.js";
|
captureProcessScenarioFile,
|
||||||
import { probeProcessCaptureCapability } from "./process/capture/ProcessHarness.js";
|
isProcessCliFailure,
|
||||||
import { parseEvidence } from "./domain/evidence.js";
|
} from "../../../src/application/process/ProcessCli.js";
|
||||||
import { parseProcessCapture } from "./domain/process/processCapture.js";
|
import { runCapabilityStatus } from "../../../src/composition/directAnalysis.js";
|
||||||
|
import { probeProcessCaptureCapability } from "../../../src/process/capture/ProcessHarness.js";
|
||||||
|
import { parseEvidence } from "../../../src/domain/evidence.js";
|
||||||
|
import { parseProcessCapture } from "../../../src/domain/process/processCapture.js";
|
||||||
|
|
||||||
describe("the CLI takes its environment as an input", () => {
|
describe("the CLI takes its environment as an input", () => {
|
||||||
it("resolves from injected PATH and inherits injected env with scenario overrides", async ({
|
it("resolves from injected PATH and inherits injected env with scenario overrides", async ({
|
||||||
@@ -48,6 +51,10 @@ describe("the CLI takes its environment as an input", () => {
|
|||||||
REA_CAPTURE_INJECTED_MARKER: "injected-value",
|
REA_CAPTURE_INJECTED_MARKER: "injected-value",
|
||||||
REA_CAPTURE_SCENARIO_OVERRIDE: "host-value",
|
REA_CAPTURE_SCENARIO_OVERRIDE: "host-value",
|
||||||
});
|
});
|
||||||
|
if (isProcessCliFailure(result))
|
||||||
|
throw new Error(
|
||||||
|
`Process capture returned an error: ${JSON.stringify(result)}`,
|
||||||
|
);
|
||||||
const evidence = parseEvidence(result);
|
const evidence = parseEvidence(result);
|
||||||
const capture = parseProcessCapture(evidence.normalized_result);
|
const capture = parseProcessCapture(evidence.normalized_result);
|
||||||
expect(capture.frames.map(({ data }) => data).join("")).toContain(
|
expect(capture.frames.map(({ data }) => data).join("")).toContain(
|
||||||
Reference in New Issue
Block a user