test: remove stale limits and handoff expectations

This commit is contained in:
morluto
2026-09-29 17:00:16 +08:00
parent ecf3ed8bdb
commit acf33d6df2
22 changed files with 206 additions and 156 deletions
@@ -82,7 +82,6 @@ describe("Ghidra MCP evidence parity", () => {
normalized_result: expect.stringContaining("return 42"),
limitations: expect.arrayContaining([
expect.stringContaining("not text-equivalent to Hopper"),
expect.stringContaining("30-second native deadline"),
]),
});
+8 -4
View File
@@ -10,6 +10,7 @@ import { ARTIFACT_COMPARISON_EXAMPLE } from "../../../src/contracts/artifactComp
import { PROCESS_CAPTURE_REFERENCE } from "../../../src/contracts/investigationExamples.js";
import { createEvidence } from "../../../src/domain/evidence.js";
import { createArtifactInspection } from "../../../src/domain/artifactInspection.js";
import { artifactInventoryResultSchema } from "../../../src/domain/artifactGraph.js";
import { jsonValueSchema } from "../../../src/domain/jsonValue.js";
import { createPromptCompletionSource } from "../../../src/server/promptCompletion.js";
import { observed } from "../../fixtures/analysisExecution.js";
@@ -76,6 +77,9 @@ describe("guided prompt completion from investigation records", () => {
const inventoryInspection = createArtifactInspection(
ARTIFACT_COMPARISON_EXAMPLE.left,
);
const inventory = artifactInventoryResultSchema.parse(
ARTIFACT_COMPARISON_EXAMPLE.left.normalized_result,
);
const inspectionEvidence = createEvidence(undefined, fixtureProvider, {
operation: "inspect_artifact",
parameters: {},
@@ -111,11 +115,11 @@ describe("guided prompt completion from investigation records", () => {
PROCESS_CAPTURE_REFERENCE.evidence_id,
]);
expect(await completion.complete("manifest", "agm_")).toEqual([
`agm_${"0".repeat(64)}`,
]);
expect(await completion.complete("occurrence", "occ_")).toEqual([
`occ_${"0".repeat(64)}`,
inventory.manifest.manifest_id,
]);
expect(await completion.complete("occurrence", "occ_")).toEqual(
inventory.occurrences.map(({ occurrence_id }) => occurrence_id),
);
expect(await completion.complete("unknown", "unk_")).toEqual([
unknown.value.unknown_id,
]);
+2 -1
View File
@@ -70,7 +70,8 @@ describe("guided prompts over MCP", () => {
if (content?.type !== "text") throw new Error("missing prompt text");
expect(content.text).toContain('"feature":"license validation"');
expect(content.text).toContain("`trace_feature`");
expect(content.text).toContain("incomplete pagination");
expect(content.text).toContain("Use Evidence returned inline");
expect(content.text).toContain("do not fetch a bundle or resource");
const audit = await client.getPrompt({
name: "audit_residual_unknowns",
arguments: { audit_scope: "all active release blockers" },
+2 -4
View File
@@ -239,11 +239,9 @@ describe("live server identity over MCP", () => {
const assertLiveIdentity = async (client: Client): Promise<void> => {
const instructions = client.getInstructions();
expect(instructions).toContain(
"For standalone JavaScript or ASAR analysis, use analyze_javascript_application",
);
expect(instructions).toContain(
"For an archive or application package, open_binary(path) binds the active target; use inspect_artifact when its graph and findings help",
"Use the tool that directly answers the question",
);
expect(instructions).toContain("Tool results include inline Evidence");
const identity = await client.callTool({
name: "binary_session",
arguments: {},
+7 -6
View File
@@ -188,10 +188,11 @@ it("records approved capture disagreement as a contradicted unknown", async () =
const mismatched = await client.callTool({
name: "compare_process_captures",
arguments: {
left_evidence_id: leftEvidence.evidence_id,
left: right,
right_evidence_id: rightEvidence.evidence_id,
right,
left: {
...leftEvidence,
normalized_result: rightEvidence.normalized_result,
},
right: rightEvidence,
},
});
expect(mismatched.isError).toBe(true);
@@ -199,8 +200,8 @@ it("records approved capture disagreement as a contradicted unknown", async () =
const compared = await client.callTool({
name: "compare_process_captures",
arguments: {
left_evidence_id: leftEvidence.evidence_id,
right_evidence_id: rightEvidence.evidence_id,
left: leftEvidence,
right: rightEvidence,
},
});
expect(compared.isError).not.toBe(true);
+5 -5
View File
@@ -49,26 +49,26 @@ it("advertises the native function discovery-to-dossier workflow", async () => {
});
expect(client.getInstructions()).toContain(
"use search_procedures or list_procedures to choose a function",
"Search or list symbols when discovery is needed",
);
expect(client.getInstructions()).toContain(
"Call binary_overview when target metadata or inventory counts are useful",
"analyze_function provides a function dossier",
);
const tools = new Map(
(await client.listTools()).tools.map((tool) => [tool.name, tool]),
);
expect(tools.get("binary_overview")?.description).toContain(
"Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect",
"Return native-binary metadata",
);
expect(tools.get("analyze_function")?.description).toContain(
"typically selected from search_procedures or list_procedures",
"Build a dossier for one native function",
);
expect(tools.get("analyze_function")?.inputSchema.properties).toHaveProperty(
"procedure",
);
expect(tools.get("inspect_native_api")?.description).toContain(
"use analyze_function for a general function dossier",
"Analyze a native API boundary in one function",
);
});
+1 -2
View File
@@ -116,12 +116,11 @@ describe("target-free MCP workflow", () => {
const beforeTools = (await mcp.listTools()).tools;
const beforeNames = beforeTools.map(({ name }) => name);
expect(mcp.getInstructions()).toContain(
"For an archive or application package, open_binary(path) binds the active target; use inspect_artifact when its graph and findings help",
"Use the tool that directly answers the question",
);
expect(
beforeTools.find(({ name }) => name === "inspect_artifact")?.description,
).toContain("Returns the complete content-addressed artifact graph");
expect(beforeNames).not.toContain("inventory_artifact");
expect(beforeNames).toContain("open_binary");
expect(beforeNames).toContain("binary_session");
expect(beforeNames).toContain("current_document");
-2
View File
@@ -65,7 +65,6 @@ describe("tool result projection", () => {
strategy: "user-mount-namespace",
fallback_reason: null,
xvfb_stderr_bytes: 512,
xvfb_stderr_truncated: false,
}),
),
contract,
@@ -79,7 +78,6 @@ describe("tool result projection", () => {
mount_read_only: true,
wsl: true,
strategy: "user-mount-namespace",
xvfb_stderr_truncated: false,
},
},
},