feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
This commit is contained in:
@@ -38,29 +38,4 @@ describe("curated Windows test lane", () => {
|
||||
);
|
||||
expect(missing.filter((path) => path !== undefined)).toEqual([]);
|
||||
}, 10_000);
|
||||
|
||||
it("still covers Windows process ownership, installation, and capability reporting", async () => {
|
||||
const paths = await curatedPaths();
|
||||
const owned = paths.filter((path) => path.includes("ProcessOwnership"));
|
||||
expect(owned.length).toBeGreaterThan(0);
|
||||
expect(paths).toContain("src/ghidra/GhidraInstallation.test.ts");
|
||||
expect(paths).toContain(
|
||||
"tests/conformance/providers/ghidra/windowsCapabilities.test.ts",
|
||||
);
|
||||
}, 10_000);
|
||||
|
||||
it("excludes suites that need verified Windows native authority", async () => {
|
||||
const paths = await curatedPaths();
|
||||
// These require Job Object process ownership and private-runtime DACL
|
||||
// enforcement, which windows-latest does not provide by design. Adding them
|
||||
// here turns the lane red without adding real coverage; those claims belong
|
||||
// behind the real Ghidra Windows workflow instead.
|
||||
for (const excluded of [
|
||||
"src/ghidra/GhidraProvider.test.ts",
|
||||
"tests/boundary/providers/ghidra/ghidraClient.test.ts",
|
||||
"tests/boundary/process/providerProcess.test.ts",
|
||||
]) {
|
||||
expect(paths).not.toContain(excluded);
|
||||
}
|
||||
}, 10_000);
|
||||
});
|
||||
|
||||
@@ -1,78 +1,12 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { readdir } from "node:fs/promises";
|
||||
import { availableParallelism } from "node:os";
|
||||
import { join, relative, resolve } from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import vitestConfiguration from "../../vitest.config.js";
|
||||
|
||||
const execute = promisify(execFile);
|
||||
const EXPECTED_PROJECTS = [
|
||||
"acceptance",
|
||||
"adapters",
|
||||
"boundary",
|
||||
"composition",
|
||||
"conformance",
|
||||
"domain",
|
||||
"evaluation",
|
||||
"mcp-boundary",
|
||||
"process-boundary",
|
||||
"process-global",
|
||||
"services",
|
||||
];
|
||||
describe("Vitest project configuration", () => {
|
||||
it("keeps deterministic execution retry-free and parallelism bounded", () => {
|
||||
expect(vitestConfiguration.test?.coverage?.enabled).toBe(false);
|
||||
expect(vitestConfiguration.test?.reporters).toEqual(["default"]);
|
||||
expect(vitestConfiguration.test?.retry).toBe(0);
|
||||
// Local and CI deliberately share one worker budget so a green local run
|
||||
// implies the same concurrency CI will exercise.
|
||||
const expectedWorkers = Math.min(2, availableParallelism());
|
||||
expect(vitestConfiguration.test?.maxWorkers).toBe(expectedWorkers);
|
||||
const projects = (vitestConfiguration.test?.projects ?? []).flatMap(
|
||||
(project) =>
|
||||
typeof project === "object" && project !== null && "test" in project
|
||||
? [project.test]
|
||||
: [],
|
||||
);
|
||||
expect(projects).toHaveLength(EXPECTED_PROJECTS.length);
|
||||
expect(
|
||||
projects.every(({ maxWorkers }) => maxWorkers === expectedWorkers),
|
||||
).toBe(true);
|
||||
expect(projects.map(({ name }) => name).sort()).toEqual(EXPECTED_PROJECTS);
|
||||
expect(
|
||||
projects.every(({ name, isolate }) =>
|
||||
name === "domain" || name === "mcp-boundary" || name === "services"
|
||||
? isolate === false
|
||||
: isolate === undefined,
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("serialises only the projects that own host-level state", () => {
|
||||
const projects = (vitestConfiguration.test?.projects ?? []).flatMap(
|
||||
(project) =>
|
||||
typeof project === "object" && project !== null && "test" in project
|
||||
? [project.test]
|
||||
: [],
|
||||
);
|
||||
const serial = projects
|
||||
.filter(({ fileParallelism }) => fileParallelism === false)
|
||||
.map(({ name }) => name)
|
||||
.sort();
|
||||
// Acceptance drives the compiled CLI and MCP stdio surfaces;
|
||||
// process-global inspects the runner configuration itself;
|
||||
// process-boundary runs real PTY capture scenarios that contend for host
|
||||
// terminal resources and still schedule some actions by wall clock.
|
||||
expect(serial).toEqual([
|
||||
"acceptance",
|
||||
"process-boundary",
|
||||
"process-global",
|
||||
]);
|
||||
});
|
||||
|
||||
it("classifies every deterministic test in exactly one project", async () => {
|
||||
const { stdout } = await execute(
|
||||
process.execPath,
|
||||
|
||||
Reference in New Issue
Block a user