mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 20:46:28 +01:00
fix(server): preserve runtime and provisioning settings in pre-realization workspace intent
Carry environmentId, workspaceRuntime, provisionCommand, and teardownCommand from the parent's workspace settings when building the pre-realization intent for accepted-plan children, so children run in the same environment as the parent configured rather than falling back to project or default runtime. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 file changed
+4
@@ -249,12 +249,16 @@ function buildPreRealizationExecutionWorkspaceSettings(raw: unknown): Record<str
|
||||
: null;
|
||||
const next: Record<string, unknown> = {};
|
||||
if (mode) next.mode = mode;
|
||||
if (settings.environmentId) next.environmentId = settings.environmentId;
|
||||
if (settings.workspaceRuntime) next.workspaceRuntime = settings.workspaceRuntime;
|
||||
if (settings.workspaceStrategy) {
|
||||
next.workspaceStrategy = {
|
||||
type: settings.workspaceStrategy.type,
|
||||
...(settings.workspaceStrategy.baseRef ? { baseRef: settings.workspaceStrategy.baseRef } : {}),
|
||||
...(settings.workspaceStrategy.branchTemplate ? { branchTemplate: settings.workspaceStrategy.branchTemplate } : {}),
|
||||
...(settings.workspaceStrategy.worktreeParentDir ? { worktreeParentDir: settings.workspaceStrategy.worktreeParentDir } : {}),
|
||||
...(settings.workspaceStrategy.provisionCommand ? { provisionCommand: settings.workspaceStrategy.provisionCommand } : {}),
|
||||
...(settings.workspaceStrategy.teardownCommand ? { teardownCommand: settings.workspaceStrategy.teardownCommand } : {}),
|
||||
};
|
||||
}
|
||||
return Object.keys(next).length > 0 ? next : null;
|
||||
|
||||
Reference in new issue
Block a user