From 34b1690ea4c089a0486dbc7677da821ca4b35122 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 28 Apr 2026 15:42:20 +0200 Subject: [PATCH] fix(mana-ai): copy missing workspace deps into Docker installer stage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Dockerfile copied only @mana/shared-{hono,ai,logger}, but services/mana-ai/package.json also depends on @mana/shared-research and @mana/tool-registry (and @mana/tool-registry pulls in @mana/shared-crypto transitively). Without those, pnpm couldn't resolve the workspace symlinks and the container crashlooped on every restart with: error: ENOENT reading "/app/services/mana-ai/node_modules/@mana/tool-registry" Surfaced today after a manual `gh workflow run cd-macmini.yml -f service=mana-ai` — mana-ai had never been deployed because no commit since the CD pipeline started had touched its path. The first real deploy hit the missing-COPY immediately. Header comment in the Dockerfile now spells out direct + transitive workspace deps so future additions don't drift. Co-Authored-By: Claude Opus 4.7 (1M context) --- services/mana-ai/Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/mana-ai/Dockerfile b/services/mana-ai/Dockerfile index ebd89f3c5..9b2bf66be 100644 --- a/services/mana-ai/Dockerfile +++ b/services/mana-ai/Dockerfile @@ -5,12 +5,22 @@ RUN corepack enable && corepack prepare pnpm@9.15.0 --activate WORKDIR /app -# Copy workspace structure +# Copy workspace structure. Every workspace dep referenced (transitively +# included) by services/mana-ai/package.json must be present here, or +# pnpm leaves the symlink broken and the container crashloops with +# "ENOENT reading /app/services/mana-ai/node_modules/@mana/". +# +# Direct deps: @mana/shared-{ai,hono,research}, @mana/tool-registry +# Transitive deps: @mana/shared-logger (via shared-hono), +# @mana/shared-crypto (via tool-registry) COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ COPY services/mana-ai/package.json ./services/mana-ai/ COPY packages/shared-hono ./packages/shared-hono COPY packages/shared-ai ./packages/shared-ai COPY packages/shared-logger ./packages/shared-logger +COPY packages/shared-research ./packages/shared-research +COPY packages/mana-tool-registry ./packages/mana-tool-registry +COPY packages/shared-crypto ./packages/shared-crypto # Install only mana-ai and its workspace deps RUN pnpm install --filter @mana/ai-service... --no-frozen-lockfile --ignore-scripts