Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/cli/src/__tests__/cli-quiet-prompt-surfaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)\(/);
Expand Down
9 changes: 7 additions & 2 deletions packages/cli/src/__tests__/docs-screenshot-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading