Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(ci): avoid redundant PE acceptance initialization
Bind SDK calls to the current named tool definitions so validation prepares
only the selected output schemas. Reuse the bounded compiled CLI for the
stateless matrix while retaining fresh wrapper checks for both PE formats
and raw-padding rejection. Keep all fixture, identity, output and cleanup
assertions, the independent MCP connection and the original 30s deadline.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
  • Loading branch information
gensokyo-dev committed Oct 21, 2026
commit 36eca066f1638edda07553d02c374ab94d542618
5 changes: 5 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ and retain representative compiled CLI parity checks. Every distinct source
scenario still runs through the public workflow; session-lifecycle scenarios
need their own sessions and cleanup assertions.

When a matrix already holds a named tool definition from live `tools/list`,
pass that definition through the SDK's `toolDefinition` call option. This keeps
the selected output-schema validation without eagerly compiling unrelated
catalog schemas. Re-read definitions if the server advertises a changed list.

Report unavailable authority as a named skip. Await owned cleanup before a
verifier reports success. Native process inspectors are released at Vitest
worker teardown; fork termination does not run Node exit hooks, and per-file
Expand Down
21 changes: 15 additions & 6 deletions tests/acceptance/applications/peResources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { peResourcesSchema } from "../../../src/domain/native/peResources.js";
import { peResourceFixture } from "../../../src/native/pe/PeResources.fixture.js";
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
import { parseMcpToolError } from "../../fixtures/mcpToolError.js";
import { cliTest, type TestCli } from "../../support/cli/cliFixture.js";
import {
cliTest,
runFileCli,
type TestCli,
} from "../../support/cli/cliFixture.js";

type PeResourceCall = (
arguments_: Record<string, unknown>,
Expand All @@ -22,7 +26,7 @@ const expectPeInputFailureAcrossAdapters = async (input: {
readonly reason: "invalid_format" | "invalid_value";
}) => {
const { cli, call, path, reason } = input;
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-pe-resources", path, "--json"],
});
expect(result.exitCode).toBe(1);
Expand Down Expand Up @@ -105,7 +109,7 @@ const expectPeWordAlignedRecordsAcrossAdapters = async (input: {
);
const path = join(root, `word-aligned-${plus}-${index}.exe`);
await writeFile(path, fixture.bytes);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-pe-resources", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
Expand Down Expand Up @@ -196,7 +200,7 @@ const expectPeMappingOwnershipAcrossAdapters = async (
});
continue;
}
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-pe-resources", path, "--json"],
});
expect(result.exitCode, name).toBe(0);
Expand Down Expand Up @@ -249,9 +253,14 @@ const expectPeInventoriesAcrossAdapters = async (
`resource${plus ? "64" : "32"}${empty ? "-empty" : ""}.exe`,
);
await writeFile(path, fixture.bytes);
const result = await cli.run({
const invocation = {
arguments: ["inspect-pe-resources", path, "--json"],
});
};
// Keep an independent public-wrapper process for both PE32 and PE32+.
// The empty-payload variants reuse only compiled-command startup.
const result = await (empty
? runFileCli(cli, invocation)
: cli.run(invocation));
expect(result.exitCode).toBe(0);
const evidence = contract.outputSchema.parse(result.json);
const report = peResourcesSchema.parse(evidence.normalized_result);
Expand Down
Loading