fix(engine): stop creating nested .fusion/.fusion directory

RoutineStore's constructor appends ".fusion" to its rootDir argument,
but InProcessRuntime was passing taskStore.getFusionDir() (already the
.fusion path), producing <projectRoot>/.fusion/.fusion/fusion.db. Pass
the project root instead, matching AutomationStore's construction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-30 04:24:07 -07:00
parent c5f35ab349
commit 33d6aea1ab

View File

@@ -613,7 +613,7 @@ export class InProcessRuntime
const { RoutineStore: RoutineStoreClass } = await import("@fusion/core");
// Verify RoutineStore actually has the expected methods (FN-1519 complete)
if (typeof RoutineStoreClass.prototype.getDueRoutines === "function") {
const routineStore = new RoutineStoreClass(this.taskStore.getFusionDir());
const routineStore = new RoutineStoreClass(this.config.workingDirectory);
await routineStore.init();
this.routineStore = routineStore;