diff --git a/packages/cli/src/__tests__/cli-quiet-prompt-surfaces.test.ts b/packages/cli/src/__tests__/cli-quiet-prompt-surfaces.test.ts index 64cdab85e3..ed52d0cc02 100644 --- a/packages/cli/src/__tests__/cli-quiet-prompt-surfaces.test.ts +++ b/packages/cli/src/__tests__/cli-quiet-prompt-surfaces.test.ts @@ -35,7 +35,9 @@ describe("CLI quiet prompt and result source contracts", () => { }); it("keeps all audited result writers attached to the output seam", () => { - for (const file of ["task.ts", "org-import.ts", "workflow.ts", "research.ts", "experiment-finalize.ts", "update.ts"]) { + // FN-9331 (74ffa19ef) removed the `fn research` CLI, so research.ts no longer exists and must + // not be audited here. Listing it made this test die with ENOENT on a removed source file. + for (const file of ["task.ts", "org-import.ts", "workflow.ts", "experiment-finalize.ts", "update.ts"]) { const source = readFileSync(join(cliRoot, "commands", file), "utf8"); expect(source, file).toMatch(/import\s*\{[^}]*\bresult\b[^}]*\}\s*from\s*["']\.\.\/output\.js["']/); expect(source, file).toMatch(/(?:result|outputResult)\(/); diff --git a/packages/cli/src/__tests__/docs-screenshot-links.test.ts b/packages/cli/src/__tests__/docs-screenshot-links.test.ts index 5ce6610b6b..1aeba13a30 100644 --- a/packages/cli/src/__tests__/docs-screenshot-links.test.ts +++ b/packages/cli/src/__tests__/docs-screenshot-links.test.ts @@ -63,10 +63,15 @@ describe("docs screenshot links", () => { } } - // FN-9295: artifacts-doc-edit.png and artifacts-gallery.png are not referenced by any - // markdown files; removed from expected list to match actual docs. + // FN-9295 removed artifacts-doc-edit.png and artifacts-gallery.png from this list because no + // markdown referenced them at the time. docs/dashboard-guide.md has since referenced both + // again (Artifacts gallery, Artifact document viewer with edit mode), so the references are + // real and the expected list must carry them again — otherwise this assertion fails on + // origin/main with "expected [ ...(18) ] to deeply equal [ ...(16) ]". expect(screenshotReferences.map(({ repoPath }) => repoPath).sort()).toEqual([ "docs/screenshots/agents-view.png", + "docs/screenshots/artifacts-doc-edit.png", + "docs/screenshots/artifacts-gallery.png", "docs/screenshots/chat-view.png", "docs/screenshots/dashboard-overview.png", "docs/screenshots/dashboard-overview.png", diff --git a/packages/cli/src/__tests__/extension-experiment-finalize.test.ts b/packages/cli/src/__tests__/extension-experiment-finalize.test.ts index 5e843e3c06..d97a9de925 100644 --- a/packages/cli/src/__tests__/extension-experiment-finalize.test.ts +++ b/packages/cli/src/__tests__/extension-experiment-finalize.test.ts @@ -64,6 +64,11 @@ vi.mock("@fusion/core", () => ({ formatRoleMismatchReason: vi.fn(() => ""), resolveAgentProvisioningPolicy: vi.fn(() => ({ approvalMode: "auto" })), TASK_PRIORITIES: ["low", "normal", "high", "urgent"], + // extension.ts reads MAX_TASK_MESSAGE_LENGTH while registering the refine tool's zod schema. + // A full-replacement mock that omits it fails at registration, before any assertion runs, so the + // mock has to carry the real constant or this whole file errors with + // 'No "MAX_TASK_MESSAGE_LENGTH" export is defined on the @fusion/core mock'. + MAX_TASK_MESSAGE_LENGTH: 100_000, getProjectRootFromWorktree: vi.fn(() => null), // FNXC:ToolPermissionGates 2026-07-26-14:55: fn_experiment_finalize is now withheld from agent // principals; the guard resolves the caller principal via the session-identity registry.