From e707642c258f734d5efabe839be65d4e8127d6d6 Mon Sep 17 00:00:00 2001 From: Peter <304086198+peter-research@users.noreply.github.com> Date: Sat, 10 Oct 2026 11:33:55 +0200 Subject: [PATCH] fix: reuse validators for identical output schemas --- scripts/lib/real-hopper-boundaries.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/lib/real-hopper-boundaries.mjs b/scripts/lib/real-hopper-boundaries.mjs index ffcc037ff..69884012e 100644 --- a/scripts/lib/real-hopper-boundaries.mjs +++ b/scripts/lib/real-hopper-boundaries.mjs @@ -42,7 +42,11 @@ export async function verifyHopperBoundaryContracts( ajv.validateSchema(tool.outputSchema), `${tool.name} output schema`, ); - validators.set(tool.name, ajv.compile(tool.outputSchema)); + validators.set( + tool.name, + (tool.outputSchema?.$id && ajv.getSchema(tool.outputSchema.$id)) || + ajv.compile(tool.outputSchema), + ); } let successfulCalls = 0; let rejectedCalls = 0;