refactor(process): remove redundant schema version markers
This commit is contained in:
@@ -138,7 +138,6 @@ function createMultiSourceScenario(root: string, script: string) {
|
||||
},
|
||||
],
|
||||
reactive: {
|
||||
version: 1,
|
||||
initial_state: "ready",
|
||||
deadline_ms: 8_000,
|
||||
states: [
|
||||
|
||||
@@ -19,7 +19,6 @@ function createInteractiveScenario(root: string, script: string) {
|
||||
arguments: [script],
|
||||
working_directory: root,
|
||||
reactive: {
|
||||
version: 1,
|
||||
initial_state: "waiting",
|
||||
deadline_ms: 5_000,
|
||||
states: [
|
||||
@@ -311,7 +310,6 @@ it("records target loss before post-exit settlement can win the deadline race",
|
||||
working_directory: root,
|
||||
settle_ms: 500,
|
||||
reactive: {
|
||||
version: 1,
|
||||
initial_state: "waiting",
|
||||
deadline_ms: 5_000,
|
||||
states: [
|
||||
|
||||
@@ -43,7 +43,6 @@ const buildTerminalScenario = (root: string, script: string) =>
|
||||
},
|
||||
],
|
||||
reactive: {
|
||||
version: 1,
|
||||
initial_state: "waiting_for_shim",
|
||||
deadline_ms: 5_000,
|
||||
states: [
|
||||
|
||||
@@ -38,7 +38,6 @@ const request = async (
|
||||
entryExport: string,
|
||||
arguments_: readonly unknown[],
|
||||
) => ({
|
||||
schemaVersion: 1,
|
||||
left: {
|
||||
modules: [
|
||||
{
|
||||
@@ -68,7 +67,6 @@ const request = async (
|
||||
describe("disposable JavaScript replay worker", () => {
|
||||
it("rejects malformed runtime-hop requests before loading modules", async () => {
|
||||
const result = await runWorker({
|
||||
schemaVersion: 1,
|
||||
left: { modules: "not-an-array", entryAlias: "entry", entryExport: "x" },
|
||||
cases: [],
|
||||
determinism: { clockIso: "2000-01-01T00:00:00.000Z", randomSeed: 7 },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { readdir, readFile } from "node:fs/promises";
|
||||
import { readdir } from "node:fs/promises";
|
||||
import { availableParallelism } from "node:os";
|
||||
import { join, relative, resolve } from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
@@ -24,14 +24,6 @@ const EXPECTED_PROJECTS = [
|
||||
"process-global",
|
||||
"services",
|
||||
];
|
||||
const ALLOWED_DIRECT_TEMPORARY_ROOTS = new Set([
|
||||
"tests/support/workspace/workspaceFixture.ts",
|
||||
"tests/acceptance/setup/packageInstallWorkflow.test.ts",
|
||||
"tests/boundary/filesystem/temporaryDirectory.test.ts",
|
||||
"tests/boundary/filesystem/referenceSourceReader.test.ts",
|
||||
"tests/boundary/process/providerProcess.test.ts",
|
||||
]);
|
||||
|
||||
describe("Vitest project configuration", () => {
|
||||
it("keeps deterministic execution retry-free and locally quiet", () => {
|
||||
expect(vitestConfiguration.test?.coverage?.enabled).toBe(false);
|
||||
@@ -91,20 +83,6 @@ describe("Vitest project configuration", () => {
|
||||
).toEqual([]);
|
||||
expect([...classified.keys()].sort()).toEqual(repositoryTests);
|
||||
}, 20_000);
|
||||
|
||||
it("keeps direct temporary-root creation behind the workspace seam", async () => {
|
||||
const violations: string[] = [];
|
||||
for (const path of await repositoryTypeScriptFiles("tests")) {
|
||||
const source = await readFile(path, "utf8");
|
||||
if (
|
||||
/\b(?:mkdtemp|tmpdir)\s*\(/u.test(source) &&
|
||||
!ALLOWED_DIRECT_TEMPORARY_ROOTS.has(path)
|
||||
) {
|
||||
violations.push(path);
|
||||
}
|
||||
}
|
||||
expect(violations).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
const parseProjects = (output: string): Map<string, string[]> => {
|
||||
@@ -133,16 +111,3 @@ const testFiles = async (root: string): Promise<string[]> => {
|
||||
}
|
||||
return files;
|
||||
};
|
||||
|
||||
const repositoryTypeScriptFiles = async (root: string): Promise<string[]> => {
|
||||
const files: string[] = [];
|
||||
for (const entry of await readdir(root, { withFileTypes: true })) {
|
||||
const path = join(root, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
files.push(...(await repositoryTypeScriptFiles(path)));
|
||||
} else if (entry.isFile() && entry.name.endsWith(".ts")) {
|
||||
files.push(relative(process.cwd(), path));
|
||||
}
|
||||
}
|
||||
return files;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user