test(FN-4223): complete Step 5 — lock disambiguation copy assertions
Fusion-Task-Id: FN-4223 Fusion-Task-Lineage: bc114ff2-ee0f-4e96-b1d2-6ba3112a48e4
This commit is contained in:
@@ -1971,6 +1971,21 @@ describe("fn pi extension (runnable structured-output regression slice)", () =>
|
||||
});
|
||||
|
||||
describe("research tools", () => {
|
||||
it.each([
|
||||
"fn_research_run",
|
||||
"fn_research_list",
|
||||
"fn_research_get",
|
||||
"fn_research_cancel",
|
||||
"fn_research_retry",
|
||||
])("%s uses disambiguated cited-research wording", (toolName) => {
|
||||
const tool = api.tools.get(toolName)!;
|
||||
expect(tool.description).toMatch(/cited-research pipeline/i);
|
||||
expect(tool.description).not.toMatch(/\bautonomous experiment loop\b/i);
|
||||
if (/experiment loop/i.test(tool.description)) {
|
||||
expect(tool.description).toMatch(/not\s+an?\s+.*experiment loop/i);
|
||||
}
|
||||
});
|
||||
|
||||
it("fn_research_run treats builtin as configured when no provider is explicitly set", async () => {
|
||||
const store = new TaskStore(tmpDir);
|
||||
await store.init();
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("research commands", () => {
|
||||
it("creates a run", async () => {
|
||||
await runResearchCreate({ query: "hello" });
|
||||
expect(orchestratorMock.createRun).toHaveBeenCalled();
|
||||
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Created research run"));
|
||||
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Created cited-research run"));
|
||||
});
|
||||
|
||||
it("creates a run when provider is unset by defaulting to builtin", async () => {
|
||||
@@ -116,7 +116,7 @@ describe("research commands", () => {
|
||||
it("fails show on missing run", async () => {
|
||||
researchStoreMock.getRun.mockReturnValue(undefined);
|
||||
await expect(runResearchShow("RR-404")).rejects.toThrow("process.exit:1");
|
||||
expect(errorSpy).toHaveBeenCalledWith("Error: Research run not found: RR-404");
|
||||
expect(errorSpy).toHaveBeenCalledWith("Error: Cited-research run not found: RR-404");
|
||||
});
|
||||
|
||||
it("exports with explicit output path", async () => {
|
||||
|
||||
@@ -1666,7 +1666,7 @@ export default function kbExtension(pi: ExtensionAPI) {
|
||||
pi.registerTool({
|
||||
name: "fn_research_retry",
|
||||
label: "fn: Retry Research Run",
|
||||
description: "Cited-research pipeline: retry a failed run when lifecycle marks it retryable (not an autonomous experiment loop retry)."
|
||||
description: "Cited-research pipeline: retry a failed run when lifecycle marks it retryable (not an autonomous experiment loop retry).",
|
||||
parameters: Type.Object({ id: Type.String({ description: "Research run ID" }) }),
|
||||
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
||||
const store = await getStore(ctx.cwd);
|
||||
|
||||
Reference in New Issue
Block a user