fix(comparison): keep unsupported function facets unknown (#2450)

* fix(comparison): keep unsupported function facets unknown

* docs(comparison): explain function facet availability

* fix(analysis): preserve unavailable facets across Evidence consumers

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
GuoJun Tang
2026-10-13 22:15:01 +08:00
committed by GitHub
co-authored by morluto
parent 30e9b83a68
commit b17487f482
12 changed files with 318 additions and 4 deletions
+18
View File
@@ -15,6 +15,7 @@ const observe = (
readonly evidenceLimitations?: readonly string[];
readonly dossierLimitations?: readonly string[];
readonly relationshipCoverage?: RelationshipCoverage;
readonly calleeUnavailable?: string;
} = {},
): Evidence => {
const value = {
@@ -52,6 +53,13 @@ const observe = (
native_value_flow: null,
basic_blocks: [],
limitations: [...(options.dossierLimitations ?? [])],
...(options.calleeUnavailable === undefined
? {}
: {
facet_availability: {
callees: { available: false, reason: options.calleeUnavailable },
},
}),
} satisfies JsonValue;
return createEvidence(
{ path: "/tmp/a", sha256: "a".repeat(64), format: "mach-o" },
@@ -541,3 +549,13 @@ describe("call path evidence admission", () => {
);
});
});
it("keeps an absent path unknown when only callee facet availability is declared", () => {
const result = run([
observe("0x1000", [], "rea-workflow", {
calleeUnavailable: "Graph callees unavailable",
}),
]);
expect(result.status).toBe("unknown");
expect(result.limitations).toContain("Graph callees unavailable");
});