Skip to content

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

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'

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