fix(evidence): preserve call coverage in function comparisons
Treat missing, partial, unknown, and unresolved call coverage as insufficient for call-set equality. Combine IDA caller/callee coverage without losing either explanation and recheck source coverage when verifying historical comparisons. Scope generated function-comparison unknowns with optional typed comparison/dimension facts, preserving legacy IDs and revision digests when absent. Keep unrelated dimensions conclusive, explicit dependencies applicable, and ambiguous function identity unknown. A confirmed change for matched functions remains a failure even if calls are incomplete. Validation: function/reconstruction/residual-unknown and bundle tests, recorded IDA protocol regression, public MCP comparison/verification, and advertised SDK JSON Schema checks. Real IDA provider execution was not verified. Fixes #2222
This commit is contained in:
@@ -4,7 +4,7 @@ import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
|
||||
const comparisonStatusSchema = z.enum(["unchanged", "changed", "unknown"]);
|
||||
const dimensionNameSchema = z.enum([
|
||||
export const functionComparisonDimensionNameSchema = z.enum([
|
||||
"identity",
|
||||
"pseudocode",
|
||||
"assembly",
|
||||
@@ -29,7 +29,7 @@ const textDeltaSchema = z.object({
|
||||
});
|
||||
|
||||
const functionDimensionContextShape = {
|
||||
dimension: dimensionNameSchema,
|
||||
dimension: functionComparisonDimensionNameSchema,
|
||||
left_count: z.number().int().min(0).nullable(),
|
||||
right_count: z.number().int().min(0).nullable(),
|
||||
evidence_links: z.array(evidenceIdSchema).min(2),
|
||||
@@ -98,4 +98,6 @@ export type FunctionComparisonResult = z.infer<
|
||||
typeof functionComparisonResultSchema
|
||||
>;
|
||||
export type FunctionDimension = z.infer<typeof functionDimensionSchema>;
|
||||
export type DimensionName = z.infer<typeof dimensionNameSchema>;
|
||||
export type DimensionName = z.infer<
|
||||
typeof functionComparisonDimensionNameSchema
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user