fix(ida): preserve native coverage and verify returned values (#2324)
Reject native callee successes without an explicit truncation marker while preserving provider failure reasons. Verify positive procedure inventory/search and function-result parity in the real-provider lane; support independent string/xref oracles and label their absence as unverified. Verified with Windows IDA Pro 9.3: eight normal production CLI/MCP checks passed, and six real-provider response-fault cases reproduced old false positives and validated the correction. Windows IDA Free was not used. No personal paths or license registration information are included. Repair inconsistent complete-file Ghidra test probe sizes after the shared ELF-header validation change, deriving sizes from the fixture buffers. Reproduced the three failures before the correction; 115 related installation/doctor and ELF tests pass afterward. Runtime parsing and installation behavior are unchanged; no real-Ghidra verification is claimed. 207 focused IDA tests and static/documentation checks passed. Automated review completed on d1e0b1095 without findings. CI run 38327862093 passed all 36 jobs, including Windows, all six test shards, coverage/timing, and real Apple CLI/MCP workflows. Follow-up to #1544.
This commit is contained in:
@@ -375,6 +375,42 @@ describe("native IDA query identity", () => {
|
||||
);
|
||||
});
|
||||
|
||||
describe("native IDA callee truncation", () => {
|
||||
it("rejects native successes without an explicit truncation marker and preserves upstream failures", async () => {
|
||||
const { client, producer } = await fixture();
|
||||
const previous = producer.overrideCall;
|
||||
try {
|
||||
producer.overrideCall = (name, args) =>
|
||||
name === "callees"
|
||||
? [{ callees: [], error: null }]
|
||||
: previous?.(name, args);
|
||||
for (const operation of [
|
||||
"procedure_callees",
|
||||
"analyze_function",
|
||||
] as const) {
|
||||
const result = await client.execute(operation, { procedure: "main" });
|
||||
expect(result.ok).toBe(false);
|
||||
if (!result.ok) {
|
||||
expect(result.error).toBeInstanceOf(AnalysisProtocolError);
|
||||
expect(result.error.message).toContain("truncation marker");
|
||||
}
|
||||
}
|
||||
producer.overrideCall = (name, args) =>
|
||||
name === "callees"
|
||||
? [{ callees: null, error: "callee database failure" }]
|
||||
: previous?.(name, args);
|
||||
const result = await client.execute("procedure_callees", {
|
||||
procedure: "main",
|
||||
});
|
||||
expect(result.ok).toBe(false);
|
||||
if (!result.ok)
|
||||
expect(result.error.message).toContain("callee database failure");
|
||||
} finally {
|
||||
await client.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("native IDA callee lookup batches", () => {
|
||||
it("batches unique callees and binds reordered replies to their source queries", async () => {
|
||||
const { client, producer } = await fixture();
|
||||
|
||||
Reference in New Issue
Block a user