fix(ida): preserve non-x86 call edges and workflow uncertainty (#1906)

* test(ida): expect callee edges from the call graph on non-x86 targets

* fix(ida): read callee edges from the call graph on non-x86 targets

* test(ida): pin address order of call graph additions

* docs(ida): describe the call graph source for non-x86 callees

* test(ida): pin the x86 baseline, the call graph reader and its failure modes

* fix(ida): check the call graph root, scope truncation to the root and degrade without callgraph

* test(ida): expect managed PE off the x86 path, possible-truncation wording and a complete ARM64 traversal

* fix(ida): keep managed PE and x86 reads off the call graph path and qualify truncation

* test(ida): answer only expected leaf roots and assert the requested call graph roots

* test(ida): expect a call graph the producer cannot give consistently to fail the callee read

* fix(ida): fail the callee read when the call graph cannot be obtained consistently

* fix(ida): preserve call edge authority and workflow uncertainty

* fix(ida): preserve explicit root call graph caps

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
Mykola Dementiev
2026-10-12 04:10:22 +08:00
committed by GitHub
co-authored by morluto
parent c2cf7dcb86
commit 0ae38e1e31
17 changed files with 1410 additions and 32 deletions
+32 -9
View File
@@ -85,15 +85,13 @@ export const modernPageSchema = z
)
.length(1);
export const modernLookupSchema = z
.array(
z.object({
query: z.string(),
fn: idaFunctionSchema.nullable(),
error: z.string().nullable(),
}),
)
.length(1);
const modernLookupRowSchema = z.object({
query: z.string(),
fn: idaFunctionSchema.nullable(),
error: z.string().nullable(),
});
export const modernLookupBatchSchema = z.array(modernLookupRowSchema);
export const modernLookupSchema = modernLookupBatchSchema.length(1);
const instructionSchema = z.union([
z.object({
@@ -182,6 +180,31 @@ export const modernCalleesSchema = z
}),
)
.length(1);
/** Depth-one `callgraph` reply: one row per root, with function-only call edges. */
export const modernCallGraphSchema = z
.array(
z
.object({
root: z.string(),
error: z.string().optional(),
nodes: z.array(
z.object({ addr: idaAddressSchema, name: z.string().nullable() }),
),
edges: z.array(
z.object({
from: idaAddressSchema,
to: idaAddressSchema,
type: z.string(),
}),
),
truncated: z.boolean().optional(),
limit_reason: z.string().nullable().optional(),
max_edges_per_func: z.number().int().positive().optional(),
per_func_capped: z.boolean().optional(),
})
.passthrough(),
)
.length(1);
export const legacyCalleesSchema = z.array(
z.object({ address: idaAddressSchema, name: z.string() }).passthrough(),
);