feat(FN-1201): store workflow steps in dedicated SQLite table
- Add schema v16 migration that creates workflow_steps and backfills rows from legacy config.workflowSteps data - Update legacy file-to-SQLite migration to insert workflow step definitions into workflow_steps while preserving nextWorkflowStepId - Refactor TaskStore workflow step create/list/get/update/delete paths to read and write workflow_steps instead of config JSON - Adjust db migration tests and AGENTS.md storage docs to reflect the new workflow_steps table model
This commit is contained in:
@@ -159,6 +159,18 @@ describe("migrateFromLegacy", () => {
|
||||
expect(row.nextWorkflowStepId).toBe(3);
|
||||
expect(JSON.parse(row.settings).maxConcurrent).toBe(4);
|
||||
expect(JSON.parse(row.workflowSteps)).toHaveLength(1);
|
||||
|
||||
const workflowRows = db.prepare("SELECT * FROM workflow_steps ORDER BY id ASC").all() as any[];
|
||||
expect(workflowRows).toHaveLength(1);
|
||||
expect(workflowRows[0]).toMatchObject({
|
||||
id: "WS-001",
|
||||
name: "Test",
|
||||
description: "Test step",
|
||||
mode: "prompt",
|
||||
phase: "pre-merge",
|
||||
prompt: "test",
|
||||
enabled: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user