mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
fix(mcp): clarify retained dossier handoff in crash prompt (#8437)
This commit is contained in:
1 parent
9eff4f7265
commit
b8963c1808
2 files changed
+22
-1
No files matched your search
@@ -348,7 +348,7 @@ export const PROMPT_CONTRACTS = [
|
||||
"analyze_function",
|
||||
],
|
||||
instruction:
|
||||
"Resolve crash text or addresses to function dossiers, requesting detail complete when build_call_path will consume them; do not infer a source location from symbol similarity alone.",
|
||||
'Resolve crash text or addresses to function dossiers. For same-session build_call_path, put {kind: "retained-evidence", evidence_id: <normalized_result.parent_evidence_id>} for each default summary into functions; request detail complete when the dossier must travel inline. Do not infer a source location from symbol similarity alone.',
|
||||
},
|
||||
{
|
||||
tools: ["xrefs", "procedure_callers", "build_call_path"],
|
||||
|
||||
@@ -48,6 +48,27 @@ it.each(["full", "compact"])(
|
||||
"never as authorization",
|
||||
);
|
||||
|
||||
const crashArguments = { crash_signal: "exception near dispatch" };
|
||||
const crashPrompt = await client.getPrompt({
|
||||
name: "trace_crash",
|
||||
arguments: crashArguments,
|
||||
});
|
||||
const crashContent = crashPrompt.messages[0]?.content;
|
||||
expect(crashContent?.type).toBe("text");
|
||||
if (crashContent?.type !== "text") throw new Error("missing crash prompt");
|
||||
const crashWorkflow = await call("guided_workflows", {
|
||||
action: "render",
|
||||
workflow_id: "trace_crash",
|
||||
arguments: crashArguments,
|
||||
});
|
||||
expect(crashWorkflow.isError).not.toBe(true);
|
||||
expect(crashWorkflow.structuredContent).toMatchObject({
|
||||
rendered_prompt: crashContent.text,
|
||||
});
|
||||
expect(crashContent.text).toContain("normalized_result.parent_evidence_id");
|
||||
expect(crashContent.text).toContain("retained-evidence");
|
||||
expect(crashContent.text).toMatch(/complete.*inline/u);
|
||||
|
||||
for (const [input, expectedPaths] of [
|
||||
[
|
||||
{ action: "render", workflow_id: "investigate_feature", arguments: {} },
|
||||
|
||||
Reference in new issue
Block a user