You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/10/20 02:57:24 UTC

Re: [PR] fix(assistant): allocate a Host workspace when remote project resolution fails [maka]

Astro-Han commented on code in PR #6176:
URL: https://github.com/apache/maka/pull/6176#discussion_r4321012728


##########
apps/desktop/src/main/runtime-host-session-catalog-ipc-main.ts:
##########
@@ -155,10 +158,13 @@ export function registerRuntimeHostSessionCatalogIpc(
     pendingCleanup.add(sessionId);
   });
   ipcMain.handle('sessions:create', async (_event, input?: CreateSessionRequestInput) => {
-    const workspace = await deps.resolveCreateProject({
-      ...(input?.cwd === undefined ? {} : { cwd: input.cwd }),
-      ...(input?.projectId === undefined ? {} : { projectId: input.projectId }),
-    });
+    const workspace = await deps.resolveCreateProject(
+      {
+        ...(input?.cwd === undefined ? {} : { cwd: input.cwd }),
+        ...(input?.projectId === undefined ? {} : { projectId: input.projectId }),
+      },
+      input?.labels?.includes('personal-assistant') ? deps.allocateAssistantWorkspace : undefined,

Review Comment:
   [P3] Avoid retaining a fresh workspace when session creation definitely fails
   
   This callback allocates and registers the Host project before `createSession` validates whether a session can be created. With no default model configured, I ran three attempts through this handler/resolver and the production Host composition: all three session creations failed, but the catalog retained three new projects and the filesystem retained three empty task directories (zero sessions and no assistant binding). Repeated retries therefore accumulate unused projects. Consider preflighting definite prerequisites, or reclaiming/reusing allocations proven to be unused after a definite failure. Cleanup must account for an ambiguous response where session creation may already have committed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org