From 5b243993872c2bcc70cb00060ffb79b347321370 Mon Sep 17 00:00:00 2001 From: Ysopwnable <161784452+N0zoM1z0@users.noreply.github.com> Date: Sat, 17 Oct 2026 14:47:06 +0800 Subject: [PATCH] test(kuna): preserve caller and producer graph failure context Align malformed call-graph retry assertions with caller-attributed errors while retaining the parser operation in diagnostics and the cause. Keep all malformed shapes, corrected-response retry, exact native-command count and owned-client cleanup coverage. Validation: clean main reproduces 3 failed / 14 passed; corrected complete Kuna boundary selection passes 266 tests across 26 files; full check:ci and complete current-head CI passed. Greptile 5/5; human owner reviewed the diff/evidence and explicitly declared readiness. Codex review remains unavailable due repository usage limits. Test-only; no production/schema/authority change or real-engine qualification. Fixes #4701. --- .../providers/kuna/kunaReferences.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/boundary/providers/kuna/kunaReferences.test.ts b/tests/boundary/providers/kuna/kunaReferences.test.ts index e1dbe3d84d..febd7fd7e9 100644 --- a/tests/boundary/providers/kuna/kunaReferences.test.ts +++ b/tests/boundary/providers/kuna/kunaReferences.test.ts @@ -268,16 +268,25 @@ it.each(["not-json", "miscounted", "with-bodies"] as const)( async (graph) => { const { open, kuna } = await session("rea-kuna-bad-graph-", { graph }); const client = open(); + const operation = "procedure_callees"; try { expect( - await client.execute("procedure_callees", { procedure: "main" }), + await client.execute(operation, { procedure: "main" }), ).toMatchObject({ ok: false, - error: { _tag: "AnalysisOutputError", operation: "kuna:call-graph" }, + error: { + _tag: "AnalysisOutputError", + operation, + diagnostics: { producer_operation: "kuna:call-graph" }, + cause: expect.objectContaining({ + _tag: "AnalysisOutputError", + operation: "kuna:call-graph", + }), + }, }); await setFakeKunaBehavior(kuna, { functions: FUNCTIONS }); expect( - (await run(client, "procedure_callees", { procedure: "main" })).result, + (await run(client, operation, { procedure: "main" })).result, ).toEqual(["0x1040"]); expect( (await fakeKunaCalls(kuna)).filter(