fix: correct native inventories and bridge error classification (#503)

* fix(hopper): preserve normalized inventory addresses

* test(hopper): isolate real inventory verification

* fix(native): preserve otool addresses and section alignment

* fix: preserve address spaces in call path evidence

* fix(hopper): distinguish request validation from provider faults

* fix(native): retain tool inventory facts and reject failed signatures
This commit is contained in:
morluto
2026-10-04 17:25:09 +08:00
committed by GitHub
parent 4fbc501121
commit 405732a7f5
34 changed files with 1009 additions and 161 deletions
+20
View File
@@ -147,6 +147,26 @@ describe("call path reconstruction", () => {
);
});
it("preserves address spaces and encoded names when normalizing offsets", () => {
const result = run(
[
observe("0x1000", ["EXTERNAL:0x001000"]),
observe("EXTERNAL:0x1000", ["overlay%3Atext:0x00004000"]),
],
{
goal: { address: "overlay%3Atext:0X004000" },
},
);
expect(
result.paths.map((path) => path.nodes.map(({ address }) => address)),
).toEqual([["0x1000", "EXTERNAL:0x1000", "overlay%3Atext:0x4000"]]);
expect(() =>
run([observe("0x1000", [])], {
goal: { address: "overlay%ZZ:0x4000" },
}),
).toThrow();
});
it("requires an observed start function", () => {
expect(() => run([observe("0x2000", [])])).toThrow(
/supplied for start 0x1000/u,