fix: unbreak docker compose build after husky devDep#39
Merged
Conversation
atomicmemory-core PR #33 added husky as a devDep with a \`"prepare": "husky"\` lifecycle script. That broke \`docker compose build app\`: Dockerfile runs \`npm ci --omit=dev\`, npm still invokes the prepare script, husky isn't installed (devDep was omitted), and the build fails with exit code 127. The image on disk has been 40 hours stale — nobody could rebuild it after #33 merged. Two-line fix: - package.json: \`"prepare": "husky || true"\` — husky still installs the hooks during local \`pnpm install\`, and silently skips when it's missing (Docker, CI, --omit=dev installs). - Dockerfile: \`RUN HUSKY=0 npm ci ...\` as belt-and-suspenders, skipping hook init even if husky ever ends up in the production install tree. Caught while rebuilding core to verify the Add Context regression test in Atomicmem-webapp PR #22. Without this the running container was 40 hours old (pre-snake-case-wire-flip) and returned camelCase response bodies that the rebuilt SDK no longer translated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #33 added `husky` as a devDep with `"prepare": "husky"` in the root scripts. That broke `docker compose build app`: the Dockerfile runs `npm ci --omit=dev`, npm still invokes the prepare script, husky isn't installed (devDep was omitted), and the build fails with exit code 127. Nobody's been able to rebuild the image since #33 merged — the running container I encountered today was 40 hours stale (pre-snake-case-wire-flip) and still emitting camelCase response bodies.
Fix (two lines)
How I caught this
Running the new Add Context regression test (Atomicmem-webapp #22) against the local core instance. The container needed rebuilding to pick up the snake_case formatters from PR #32, but `docker compose build` failed. This PR fixes the build; after it lands, `docker compose up -d --force-recreate` picks up the latest main cleanly.
Test plan