fix(FN-5804): plumb scopedStore into planning resume routes

submitResponse/rewindSession/retrySession all accept a trailing store
arg but the routes omitted it, so sessions rehydrated after a restart
(session.store not persisted) threw 'Planning session has no task store
and cannot be resumed without project context'. Pass scopedStore so
resume-after-restart works.

Fusion-Task-Id: FN-5804
This commit is contained in:
gsxdsm
2026-05-31 23:06:30 -07:00
parent f6edf4a14f
commit a44b6102e3

View File

@@ -763,6 +763,7 @@ export function registerPlanningSubtaskRoutes(ctx: ApiRoutesContext, deps: Plann
responses,
scopedStore.getRootDir(),
settings.promptOverrides,
scopedStore,
);
res.json(result);
} catch (err: unknown) {
@@ -807,6 +808,7 @@ export function registerPlanningSubtaskRoutes(ctx: ApiRoutesContext, deps: Plann
sessionId,
scopedStore.getRootDir(),
settings.promptOverrides,
scopedStore,
);
res.json(rewound);
} catch (err: unknown) {
@@ -852,7 +854,7 @@ export function registerPlanningSubtaskRoutes(ctx: ApiRoutesContext, deps: Plann
const { store: scopedStore } = await getProjectContext(req);
const settings = await scopedStore.getSettings();
const { retrySession } = await import("../planning.js");
await retrySession(sessionId, scopedStore.getRootDir(), settings.promptOverrides);
await retrySession(sessionId, scopedStore.getRootDir(), settings.promptOverrides, scopedStore);
res.json({ success: true, sessionId });
} catch (err: unknown) {
if (err instanceof ApiError) {