fix(routines): address Greptile review findings

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-04-02 12:09:02 -05:00
parent 38a0cd275e
commit fd6cfc7149
5 changed files with 77 additions and 21 deletions
+5 -9
View File
@@ -7,7 +7,10 @@ import {
ROUTINE_TRIGGER_SIGNING_MODES,
ROUTINE_VARIABLE_TYPES,
} from "../constants.js";
import { issueExecutionWorkspaceSettingsSchema } from "./issue.js";
import {
ISSUE_EXECUTION_WORKSPACE_PREFERENCES,
issueExecutionWorkspaceSettingsSchema,
} from "./issue.js";
const routineVariableValueSchema = z.union([z.string(), z.number().finite(), z.boolean()]);
@@ -104,14 +107,7 @@ export const runRoutineSchema = z.object({
idempotencyKey: z.string().trim().max(255).optional().nullable(),
source: z.enum(["manual", "api"]).optional().default("manual"),
executionWorkspaceId: z.string().uuid().optional().nullable(),
executionWorkspacePreference: z.enum([
"inherit",
"shared_workspace",
"isolated_workspace",
"operator_branch",
"reuse_existing",
"agent_default",
]).optional().nullable(),
executionWorkspacePreference: z.enum(ISSUE_EXECUTION_WORKSPACE_PREFERENCES).optional().nullable(),
executionWorkspaceSettings: issueExecutionWorkspaceSettingsSchema.optional().nullable(),
});