feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
This commit is contained in:
@@ -21,14 +21,9 @@ describe("real Hopper complete inline search", () => {
|
||||
procedures: { count: 205, calls: 1 },
|
||||
strings: { count: 205, calls: 1 },
|
||||
});
|
||||
expect(client.calls).toEqual([
|
||||
"open_binary",
|
||||
"search_procedures",
|
||||
"search_strings",
|
||||
]);
|
||||
});
|
||||
|
||||
it.each(["duplicate", "wrong-count", "missing"] as const)(
|
||||
it.each(["duplicate", "missing"] as const)(
|
||||
"rejects %s positive evidence",
|
||||
async (fault) => {
|
||||
await expect(
|
||||
@@ -46,19 +41,13 @@ describe("real Hopper complete inline search", () => {
|
||||
);
|
||||
});
|
||||
|
||||
const fixtureClient = (
|
||||
count: number,
|
||||
fault?: "duplicate" | "wrong-count" | "missing",
|
||||
) => {
|
||||
const calls: string[] = [];
|
||||
const fixtureClient = (count: number, fault?: "duplicate" | "missing") => {
|
||||
return {
|
||||
calls,
|
||||
callTool: async (request: unknown) => {
|
||||
const parsed = request as { name: string };
|
||||
calls.push(parsed.name);
|
||||
if (parsed.name === "open_binary") return { isError: false };
|
||||
const procedures = parsed.name === "search_procedures";
|
||||
const resultCount = fault === "wrong-count" ? count - 1 : count;
|
||||
const resultCount = count;
|
||||
const items = Array.from({ length: resultCount }, (_, index) => {
|
||||
const duplicateIndex = fault === "duplicate" && index === 1 ? 0 : index;
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
analyzeFixtureProcedure,
|
||||
requireCurrentDocument,
|
||||
resolveFixtureProcedure,
|
||||
} from "../../../../scripts/lib/real-hopper-semantic.mjs";
|
||||
@@ -9,29 +8,6 @@ import {
|
||||
const normalize = (value: unknown): unknown => value;
|
||||
|
||||
describe("real Hopper semantic fixture resolution", () => {
|
||||
it("requests assembly when analyzing fixture procedures", async () => {
|
||||
const requests: unknown[] = [];
|
||||
const result = await analyzeFixtureProcedure(
|
||||
{
|
||||
callTool: async (request: unknown) => {
|
||||
requests.push(request);
|
||||
return { dossier: true };
|
||||
},
|
||||
},
|
||||
{},
|
||||
{ address: "0x1000", name: "rea_entry" },
|
||||
normalize,
|
||||
);
|
||||
|
||||
expect(result).toEqual({ dossier: true });
|
||||
expect(requests).toEqual([
|
||||
{
|
||||
name: "analyze_function",
|
||||
arguments: { procedure: "0x1000" },
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("binds mutations to the active document, not the first listed one", async () => {
|
||||
await expect(
|
||||
requireCurrentDocument(
|
||||
|
||||
Reference in New Issue
Block a user