fix(infra): fix backend Docker build cache invalidation and missing .dockerignore - #259
Merged
parthrohit22 merged 2 commits intoAug 7, 2026
Conversation
parthrohit22
added a commit
to parthrohit22/PARTHA
that referenced
this pull request
Aug 7, 2026
Published after this PR was opened -- caught it re-blocking PR Second-Origin#259, which branched from dev before this merged. Same pattern as the other four: patched version (3.3.17) is within the major already in use, no breaking change.
…n#258) apps/backend/Dockerfile copied app/ before running pip install, so Docker's content-addressed layer cache busted the dependency-install layer on nearly every build -- not just when requirements.txt changed. Reorder dependency install before source copy and add a BuildKit pip cache mount so a genuine dependency change doesn't re-fetch unchanged wheels either. Add the missing apps/backend/.dockerignore (frontend already has one) so the build context stops shipping .venv, caches, and egg-info -- none of it referenced by any COPY instruction, but all of it walked/transferred on every build without this.
Same fix as Second-Origin#257, plus nanoid (GHSA-2v37-7h3g-55p8, published after so it inherited all five now-blocking advisories. Bumped via overrides to the patched versions; all within the major version already in use.
parthrohit22
force-pushed
the
fix/258-docker-build-cache
branch
from
August 7, 2026 21:36
a0b5cd4 to
74cff1b
Compare
This was referenced Aug 7, 2026
parthrohit22
added a commit
to parthrohit22/PARTHA
that referenced
this pull request
Aug 7, 2026
Branched from dev before Second-Origin#257 merged, so this inherited the same still-open nanoid advisory blocking Second-Origin#259/Second-Origin#264's Frontend check. Same fix: patched version 3.3.17 is within the major already in use.
parthrohit22
added a commit
that referenced
this pull request
Aug 7, 2026
* security(deps): bump dompurify, js-yaml, brace-expansion, undici (#256) Four advisories published since dev's last CI run made the live npm-audit gate (scripts/dependency-audit.mjs) start blocking every open PR: brace-expansion (GHSA-rgw5-rvv9-x895), dompurify (GHSA-55q2-fjhq-7xh7, GHSA-c2j3-45gr-mqc4), js-yaml (GHSA-52cp-r559-cp3m, GHSA-5p4m-2wfm-xmqj), and undici (GHSA-4cwx-7wf7-3272 and others via jsdom). All four patches land within the already-used major version, so no override needed a major bump; undici is newly added to overrides since it was previously unpinned. * security(deps): also bump nanoid (GHSA-2v37-7h3g-55p8) Published after this PR was opened -- caught it re-blocking PR #259, which branched from dev before this merged. Same pattern as the other four: patched version (3.3.17) is within the major already in use, no breaking change.
parthrohit22
added a commit
that referenced
this pull request
Aug 7, 2026
* chore(ci): add scheduled dependency-audit scan against dev (#263) The Frontend job's live npm-audit gate blocks PRs on external advisory timing, not code changes -- three unrelated PRs went red today from newly published CVEs (#256, #258). This adds a daily scheduled workflow that re-runs the same audit against dev independent of any open PR, filing (or closing) a labelled issue so dev stays caught up and a PR rarely gets blindsided. Does not change ci.yml's existing per-PR gate at all -- same strictness, just an earlier warning. * security(deps): also bump nanoid (GHSA-2v37-7h3g-55p8) Branched from dev before #257 merged, so this inherited the same still-open nanoid advisory blocking #259/#264's Frontend check. Same fix: patched version 3.3.17 is within the major already in use.
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
`npm run partha` was slow on every run and could fail outright with `ENOSPC` under Colima. Root-caused to two fixable defects in `apps/backend/` (a third, unfixable-from-the-repo cause — the local Colima VM disk filling up — is documented in #258 but out of scope for a code change).
Linked issue
Closes #258
Roadmap alignment
This is infrastructure/developer-experience hygiene, not a product capability — it doesn't map onto a §23/§28 citation, same as #257 (the dependency-audit fix). Flagging honestly rather than forcing one.
What changed
Acceptance criteria completed
Testing performed
Not run: `npm run docker:validate` (the deeper acceptance script) — the manual verification above already exercises build + full stack readiness, and this change touches only build-time caching behavior, not runtime application behavior.
Screenshots
Not applicable — Dockerfile/build-context change, no UI impact.
Security and data considerations
None. Build-cache and build-context scoping only; no change to what ships in the final image (the `.dockerignore`-excluded paths were never `COPY`'d into the image by this Dockerfile before or after this change), no new dependency, no credentials or secrets touched.
Dependencies and blocked work
None.
Scope changes or remaining work
Per #258: this does not fix the Colima VM disk sizing itself (a local machine/operator concern, not something this repo can control) or add automated cleanup for stale `partha-launcher-test-*`-style images left behind by `scripts/validate-compose.mjs` runs. Both are flagged as candidate follow-ups in #258, not folded into this fix.
Contributor checklist