mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
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.
|
||||
Default-group projects can run together. Only `process-boundary` runs in the
|
||||
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
|
||||
the same per-project worker bound.
|
||||
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 { captureProcessScenarioFile } from "./application/process/ProcessCli.js";
|
||||
import { runCapabilityStatus } from "./composition/directAnalysis.js";
|
||||
import { probeProcessCaptureCapability } from "./process/capture/ProcessHarness.js";
|
||||
import { parseEvidence } from "./domain/evidence.js";
|
||||
import { parseProcessCapture } from "./domain/process/processCapture.js";
|
||||
import {
|
||||
captureProcessScenarioFile,
|
||||
isProcessCliFailure,
|
||||
} from "../../../src/application/process/ProcessCli.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", () => {
|
||||
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_SCENARIO_OVERRIDE: "host-value",
|
||||
});
|
||||
if (isProcessCliFailure(result))
|
||||
throw new Error(
|
||||
`Process capture returned an error: ${JSON.stringify(result)}`,
|
||||
);
|
||||
const evidence = parseEvidence(result);
|
||||
const capture = parseProcessCapture(evidence.normalized_result);
|
||||
expect(capture.frames.map(({ data }) => data).join("")).toContain(
|
||||
Reference in New Issue
Block a user