fix(android): reject invoke coverage without site evidence (#10679)

The JADX bridge emits or removes direct_invokes and direct_invokes_exhaustive together. A protocol item carrying only the coverage flag reached trace_android_references as a reference that claimed true or false coverage over a null site list, while the coverage summary counted it as unknown. The protocol schema now rejects that combination.

Rebased onto current main from morluto/rea#2850. The companion change that removed the null default from the result schema already landed on main.

Co-authored-by: LcokHcak <268763621+LcokHcak@users.noreply.github.com>
This commit is contained in:
David Muñoz ReyandLcokHcak authored and GitHub committed 2026-11-18 10:09:26 -05:00
1 parent c1c9783a9e
commit fbd6fd1c4f
2 files changed
+43 -21

No files matched your search

@@ -925,6 +925,17 @@ it.each([
).rejects.toThrow();
});
it.each([true, false])(
"rejects invoke coverage %s without the direct invoke site list",
async (exhaustive) => {
// The bridge always emits the list with its coverage; one without the
// other must not become a reference that claims coverage over no sites.
await expect(
traceWithReference({ direct_invokes_exhaustive: exhaustive }),
).rejects.toThrow("Invoke coverage requires a direct invoke site list");
},
);
it("preserves bounded instruction coverage separately from using-node coverage", async () => {
const result = await traceWithReference({
direct_invokes: [invokeSite],