fix(docker): COPY patches/ into deps stage for pnpm patchedDependencies #283

Merged
james merged 1 commit from 282-dockerfile-patches-copy into main 2026-06-24 16:25:49 +00:00
Owner

Summary

  • #279 added pnpm.patchedDependencies pointing at patches/@react-native__gradle-plugin@0.85.3.patch, but the Dockerfile deps stage doesn't copy the patches/ directory before running pnpm install --frozen-lockfile. Result: every docker build fails with ENOENT: no such file or directory, open '/repo/patches/@react-native__gradle-plugin@0.85.3.patch'.
  • Breaking surface: release.yml (run #710), the pr.yml Trivy (image) job (run #705 job 10), and build-feature-image.yml — all three workflows do docker build against the root Dockerfile.
  • Fix: COPY patches/ patches/ after the lockfile copy, before pnpm install. One line.

Test plan

  • docker build --target deps -t carol-deps-test . succeeds locally — pnpm install completes and the patched @react-native/gradle-plugin is in the resolved tree.
  • Lefthook gitleaks + conventional-commits pass.
  • release.yml succeeds on merge (the real validation surface).
  • pr.yml Trivy (image) job succeeds on this PR.

Closes #282.

🤖 Generated with Claude Code

## Summary - #279 added `pnpm.patchedDependencies` pointing at `patches/@react-native__gradle-plugin@0.85.3.patch`, but the `Dockerfile` deps stage doesn't copy the `patches/` directory before running `pnpm install --frozen-lockfile`. Result: every docker build fails with `ENOENT: no such file or directory, open '/repo/patches/@react-native__gradle-plugin@0.85.3.patch'`. - Breaking surface: `release.yml` (run [#710](https://forge.wynning.tech/james/carol/actions/runs/710)), the `pr.yml` `Trivy (image)` job (run [#705](https://forge.wynning.tech/james/carol/actions/runs/705) job 10), and `build-feature-image.yml` — all three workflows do `docker build` against the root Dockerfile. - Fix: `COPY patches/ patches/` after the lockfile copy, before `pnpm install`. One line. ## Test plan - [x] `docker build --target deps -t carol-deps-test .` succeeds locally — `pnpm install` completes and the patched `@react-native/gradle-plugin` is in the resolved tree. - [x] Lefthook gitleaks + conventional-commits pass. - [ ] `release.yml` succeeds on merge (the real validation surface). - [ ] `pr.yml` `Trivy (image)` job succeeds on this PR. Closes #282. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(docker): COPY patches/ into deps stage so pnpm install can apply patchedDependencies (#282)
All checks were successful
Commits / Conventional Commits (pull_request) Successful in 8s
PR / OSV-Scanner (pull_request) Successful in 1m38s
PR / Lint (pull_request) Successful in 2m19s
PR / Static analysis (pull_request) Successful in 2m19s
PR / Client (web export smoke) (pull_request) Successful in 2m25s
PR / pnpm audit (pull_request) Successful in 2m49s
PR / Typecheck (pull_request) Successful in 3m0s
PR / OpenAPI (pull_request) Successful in 3m5s
PR / Package age policy (soft) (pull_request) Successful in 52s
Secrets / gitleaks (pull_request) Successful in 51s
PR / Test (sqlite) (pull_request) Successful in 3m24s
PR / Build (pull_request) Successful in 3m34s
PR / Test (postgres) (pull_request) Successful in 3m34s
PR / Coverage (soft) (pull_request) Successful in 2m59s
PR / Trivy (image) (pull_request) Successful in 5m9s
2e8f4aed4e
#279 added `pnpm.patchedDependencies` pointing at `patches/@react-native__gradle-plugin@0.85.3.patch`, but the Dockerfile's deps stage only copies the manifests + lockfile before running `pnpm install --frozen-lockfile`. Without `patches/` on disk, pnpm bails with `ENOENT: no such file or directory, open '/repo/patches/...'` — breaking `release.yml`, `build-feature-image.yml`, and the `pr.yml` Trivy (image) job.

Add a `COPY patches/ patches/` line right after the lockfile copy.

Verified locally with `docker build --target deps .` — install succeeds, patch is applied.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

📊 Test coverage

Patch coverage: no testable lines changed.

Overall (app/, lib/, db/, excluding UI per ADR-0019):

Metric Value Soft target
Lines 81.6% ≥ 50%
Branches 72.8% ⚠️ ≥ 75%
Functions 91.1% informational

Soft thresholds per ADR-0019. Coverage is informational and does not block merge.

<!-- coverage-comment --> ## 📊 Test coverage **Patch coverage:** no testable lines changed. **Overall** (`app/`, `lib/`, `db/`, excluding UI per ADR-0019): | Metric | Value | Soft target | |---|---|---| | Lines | 81.6% ✅ | ≥ 50% | | Branches | 72.8% ⚠️ | ≥ 75% | | Functions | 91.1% | informational | Soft thresholds per [ADR-0019](docs/adr/0019-coverage-soft-targets.md). Coverage is informational and does not block merge.
james merged commit ae5e231cac into main 2026-06-24 16:25:49 +00:00
james deleted branch 282-dockerfile-patches-copy 2026-06-24 16:25:49 +00:00
Sign in to join this conversation.
No description provided.