Files
fusion/packages/dashboard/app/components/__tests__/workflow-setting-display.test.ts
gsxdsm 637854ad36 FN-8932: add durable memory consolidation agent
Add a provisioned memory agent that consolidates durable recall material through idempotent heartbeat ticks.

- Provision and configure the durable memory agent with an enabled workflow setting.
- Add consolidation adapters, material collection, recall graph references, and run-audit metadata.
- Expose the setting in the dashboard and document the memory-agent behavior.
- Cover provisioning, heartbeat, consolidation, audit, and recall graph behavior with tests.

Files changed:
 .changeset/fn-8932-memory-agent.md                 |   7 ++
 AGENTS.md                                          |   1 +
 docs/agents.md                                     |  10 ++
 docs/settings-reference.md                         |   1 +
 docs/storage.md                                    |   2 +-
 .../memoryConsolidationEnabled-default.test.ts     |  22 ++++
 .../memory-recall-graph-cross-reference.pg.test.ts | 115 +++++++++++++++++++++
 .../__tests__/memory-agent-provisioning.test.ts    |  31 ++++++
 packages/core/src/agents/agent-store.ts            |  85 +++++++++++++++
 packages/core/src/agents/memory-agent-defaults.ts  |  30 ++++++
 packages/core/src/index.gate.ts                    |   2 +
 packages/core/src/index.ts                         |   9 ++
 packages/core/src/memory/recall/index.ts           |   1 +
 packages/core/src/memory/recall/recall-dedup.ts    |   3 +
 packages/core/src/memory/recall/recall-store.ts    |  35 ++++++-
 .../src/workflows/builtin-workflow-settings.ts     |  14 +++
 .../src/workflows/workflow-settings-resolver.ts    |  12 ++-
 .../__tests__/WorkflowSettingsPanel.test.tsx       |   8 ++
 .../__tests__/workflow-setting-display.test.ts     |   6 ++
 .../app/components/workflow-setting-display.ts     |   5 +
 .../memory-consolidation-heartbeat-hook.test.ts    |  92 +++++++++++++++++
 .../__tests__/memory-consolidation-ports.test.ts   |  34 ++++++
 ...memory-consolidation-run-audit-metadata.test.ts |  19 ++++
 .../__tests__/memory-consolidation-tick.test.ts    |  62 +++++++++++
 packages/engine/src/agent-heartbeat.ts             |  55 ++++++++++
 packages/engine/src/index.ts                       |   1 +
 packages/engine/src/memory/index.ts                |   3 +
 .../src/memory/memory-consolidation-adapters.ts    |  29 ++++++
 .../src/memory/memory-consolidation-material.ts    |  22 ++++
 packages/engine/src/memory/memory-consolidation.ts |  41 ++++++++
 packages/engine/src/util/run-audit.ts              |  10 ++
 31 files changed, 764 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-8932

Fusion-Task-Lineage: b4fdec50-1f42-4120-af17-0b6f3a94586e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-11 03:53:11 -07:00

31 lines
1.5 KiB
TypeScript

import { describe, expect, it } from "vitest";
import type { WorkflowSettingDefinition } from "../../api";
import { getWorkflowSettingDisplay, groupWorkflowSettings } from "../workflow-setting-display";
describe("workflow setting display ownership", () => {
it("places the memory consolidation switch in Oversight", () => {
const setting: WorkflowSettingDefinition = { id: "memoryConsolidationEnabled", name: "ignored custom label", type: "boolean", default: true };
expect(getWorkflowSettingDisplay(setting)).toMatchObject({ group: "oversight", label: "Memory consolidation enabled" });
expect(groupWorkflowSettings([setting])).toEqual([{ group: "oversight", settings: [setting] }]);
});
it("does not classify title summarizer keys as workflow model settings", () => {
const titleSettings: WorkflowSettingDefinition[] = [
{ id: "titleSummarizerProvider", name: "Title summarizer provider", type: "string" },
{ id: "titleSummarizerModelId", name: "Title summarizer model", type: "string" },
{ id: "titleSummarizerFallbackProvider", name: "Title summarizer fallback provider", type: "string" },
{ id: "titleSummarizerFallbackModelId", name: "Title summarizer fallback model", type: "string" },
];
for (const setting of titleSettings) {
expect(getWorkflowSettingDisplay(setting)).toMatchObject({
group: "advanced",
label: setting.name,
});
}
expect(groupWorkflowSettings(titleSettings)).toEqual([{ group: "advanced", settings: titleSettings }]);
});
});