fix(contracts)!: require observed provider output metadata
Reject omitted segment bounds, procedure classification and body facts, unresolved-call observations, dossier facets, and Ghidra parameter flow metadata. Providers emit explicit nulls for unsupported facets. Verify those unknowns in the real Hopper workflow. BREAKING CHANGE: Provider analysis outputs must explicitly supply metadata previously repaired with defaults; unsupported nullable facets must be reported as null.
This commit is contained in:
@@ -58,6 +58,12 @@ async function verifyNavigation(
|
||||
procedure: address,
|
||||
});
|
||||
const info = await call("procedure_info", { procedure: address });
|
||||
assert.equal(info.classification, null);
|
||||
assert.equal(info.body.available, false);
|
||||
assert.match(
|
||||
info.body.reason,
|
||||
/public Python API does not expose complete function body ranges/u,
|
||||
);
|
||||
assert.ok(info.locals.length > 0, "fixture omitted real stack locals");
|
||||
for (const local of info.locals) {
|
||||
assert.equal(typeof local.name, "string");
|
||||
@@ -68,6 +74,18 @@ async function verifyNavigation(
|
||||
}
|
||||
const dossier = await call("analyze_function", { procedure: address });
|
||||
assert.deepEqual(dossier.procedure.locals, info.locals);
|
||||
assert.equal(dossier.procedure.classification, null);
|
||||
assert.equal(dossier.procedure.body.available, false);
|
||||
assert.match(
|
||||
dossier.procedure.body.reason,
|
||||
/public Python API does not expose complete function body ranges/u,
|
||||
);
|
||||
assert.equal(dossier.native_api, null);
|
||||
assert.equal(dossier.native_value_flow, null);
|
||||
assert.ok(
|
||||
Array.isArray(dossier.limitations) && dossier.limitations.length > 0,
|
||||
"function dossier omitted Hopper's unsupported-facet limitations",
|
||||
);
|
||||
const coordinates = instructions.instructions.map(
|
||||
(line) => /^0x[0-9a-f]+/u.exec(line)?.[0],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user