Preserve source-free tasks and admitted storage choices

Keep task directories outside project provider preparation, and pass the resolved provider or explicit Core choice through source resolution, fresh-attempt checks and preparation. This prevents an installation during setup from changing the admitted storage contract.

Cover source-free project tasks, installation during setup, explicit policy preservation and managed preparation with focused heartbeat regressions. Server TypeScript check passes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Nicky LeachandPaperclip committed 2026-10-22 16:19:22 -07:00
1 parent efc54541f6
commit 336a5b0664
5 files changed
+53 -17

No files matched your search

+2
View File
@@ -185,6 +185,8 @@ export async function preparePluginWorkspace(
existing?.metadata?.workspaceProviderRemoval
)
throw conflict("Workspace storage is retired or awaiting cleanup");
// A source-free task directory has no project storage to prepare. Existing bindings still require their owner.
if (!existing && (!input.projectId || !input.projectWorkspaceId)) return null;
const saved = readWorkspaceProviderBinding(existing?.metadata);
const mode = existing?.mode ?? input.mode,
strategy = existing?.strategyType ?? input.strategy;