refactor(domain): encode comparison and lifecycle states exactly (#473)
* refactor(domain): encode comparison states exactly * refactor(domain): make evidence lifecycles explicit * refactor(browser): parse capture states once * test: prefer behavior over implementation seams * chore: refresh schema-derived metadata * test(process): preserve lifecycle cleanup coverage * test(hopper): bind rename cache coverage to dispatch
This commit is contained in:
@@ -93,6 +93,16 @@ describe("call path reconstruction", () => {
|
||||
expect(callPathResultSchema.parse(result)).toEqual(result);
|
||||
expect(result.status).toBe("found");
|
||||
expect(result.shortest_hops).toBe(2);
|
||||
expect(
|
||||
callPathResultSchema.safeParse({ ...result, shortest_hops: null })
|
||||
.success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
callPathResultSchema.safeParse({
|
||||
...result,
|
||||
paths: { ...result.paths, total: null },
|
||||
}).success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
result.paths.items.map((path) =>
|
||||
path.nodes.map(({ address }) => address),
|
||||
@@ -118,9 +128,14 @@ describe("call path reconstruction", () => {
|
||||
});
|
||||
|
||||
it("only reports not_found for exhaustive closure", () => {
|
||||
expect(run([observe("0x1000", []), observe("0x4000", [])]).status).toBe(
|
||||
"not_found",
|
||||
);
|
||||
const notFound = run([observe("0x1000", []), observe("0x4000", [])]);
|
||||
expect(notFound.status).toBe("not_found");
|
||||
expect(
|
||||
callPathResultSchema.safeParse({
|
||||
...notFound,
|
||||
search_scope: { ...notFound.search_scope, exhaustive: false },
|
||||
}).success,
|
||||
).toBe(false);
|
||||
const unknown = run([observe("0x1000", ["0x2000"])]);
|
||||
expect(unknown.status).toBe("unknown");
|
||||
expect(unknown.limitations).toContain(
|
||||
|
||||
Reference in New Issue
Block a user