feat(FN-4474): merge fusion/fn-4474

Commits merged:
- merge fusion/fn-4474

Files changed:
packages/core/src/__tests__/db-migrate.test.ts           |  4 ++--
 packages/engine/src/__tests__/branch-autocorrect.test.ts | 10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-4474

Fusion-Task-Lineage: 979782e1-c44d-4f35-aded-237bf33d0c9f
This commit is contained in:
Fusion
2026-05-14 09:08:22 -07:00
committed by gsxdsm
parent 765838cc15
commit f0a736bc01
2 changed files with 8 additions and 6 deletions

View File

@@ -689,7 +689,7 @@ describe("schema migration", () => {
db.close();
});
it("adds workflow_steps.gateMode and backfills prompt rows to advisory", () => {
it("adds workflow_steps.gateMode and backfills legacy rows by mode", () => {
const db = new Database(fusionDir);
db.exec("CREATE TABLE IF NOT EXISTS __meta (key TEXT PRIMARY KEY, value TEXT)");
db.exec(`
@@ -715,7 +715,7 @@ describe("schema migration", () => {
const rows = db.prepare("SELECT id, mode, gateMode FROM workflow_steps ORDER BY id ASC").all() as Array<{ id: string; mode: string; gateMode: string }>;
expect(rows).toEqual([
{ id: "WS-001", mode: "prompt", gateMode: "advisory" },
{ id: "WS-002", mode: "script", gateMode: "advisory" },
{ id: "WS-002", mode: "script", gateMode: "gate" },
]);
expect(db.getSchemaVersion()).toBe(77);