From df2df165319e1cdc6c771e4538d04ec4e0462268 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 21 Apr 2026 15:52:54 +0000 Subject: [PATCH] fix(worker): create overlay dirs in git-clone init container The worker container overlay mounts (deliverables, scratchpad, playwright-cli) failed because /repo is read-only and the overlay mountpoints at /repo/.shannon/* didn't exist. The init container now creates these directories after cloning the repo. Co-Authored-By: Claude Opus 4.6 --- apps/api/src/services/job-builder.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/api/src/services/job-builder.ts b/apps/api/src/services/job-builder.ts index ff641b4..53b2bdc 100644 --- a/apps/api/src/services/job-builder.ts +++ b/apps/api/src/services/job-builder.ts @@ -72,8 +72,10 @@ export function buildJobSpec(params: JobParams): k8s.V1Job { initContainers.push({ name: 'git-clone', image: 'alpine/git:latest', - command: ['git'], - args: cloneArgs, + command: ['sh', '-c'], + args: [ + `git clone --depth 1 "${params.gitUrl}" "${REPO_MOUNT_PATH}" && mkdir -p "${REPO_MOUNT_PATH}/.shannon/deliverables" "${REPO_MOUNT_PATH}/.shannon/scratchpad" "${REPO_MOUNT_PATH}/.shannon/.playwright-cli"`, + ], volumeMounts: [{ name: 'repo', mountPath: REPO_MOUNT_PATH }], }); } else if (params.repoPath) {