Skip to content

fix: backend Dockerfile missing COPY for canary/ package (a4eec13 breaks startup) #751

Closed

Description

@vybe

Summary

Commit a4eec13 (feat(#411): canary invariant harness Phase 1) added src/backend/canary/ but did not add a corresponding COPY line to docker/backend/Dockerfile. The backend container fails to start with:

File "/app/routers/canary.py", line 21, in <module>
    from canary import INVARIANTS
ModuleNotFoundError: No module named 'canary'

Root Cause

docker/backend/Dockerfile copies source directories explicitly. The new canary/ package was not added:

# Existing copies:
COPY ../../src/backend/routers /app/routers/
COPY ../../src/backend/services /app/services/
COPY ../../src/backend/db /app/db/
# Missing:
COPY ../../src/backend/canary /app/canary/   ← not present in a4eec13

Fix

Add to docker/backend/Dockerfile after the existing COPY block:

COPY ../../src/backend/canary /app/canary/

Impact

construct instance attempted to deploy a4eec13, backend failed to start, rolled back to 7b95c46. No data loss.

Reproduction

git checkout a4eec13
docker compose build --no-cache backend
docker compose up -d backend
docker logs trinity-backend   # ModuleNotFoundError: No module named 'canary'

Activity

  1. dolho commented on May 14, 2026

    @dolho
    Contributor

    Closing — already fixed by commit 62cc7495 ("fix(docker): add missing COPY for canary/ package in backend Dockerfile (#768)"). Same bug, different PR number. The current docker/backend/Dockerfile (line 57) has COPY ../../src/backend/canary /app/canary/ and the chmod block (lines 65–66) includes the package. Reopen if the breakage came back.

  2. reopened this on May 14, 2026
  3. added
    status-in-dev
    on May 14, 2026
  4. dolho commented on May 14, 2026

    @dolho
    Contributor

    Correction on the earlier comment — premature close. Fix 62cc7495 is merged to dev only, not yet to main. Reopening + relabeling status-in-dev per the team rule that issues close only on main merge (i.e. at release cut).

  5. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  6. removed
    status-in-dev
    on Jun 1, 2026
  7. added a commit that references this issue on Oct 7, 2026
  8. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions