fix: explicitly exclude cogs/gameplay_legacy.py from Docker image (#42) #52
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#52
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-discord-42"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
cogs/gameplay_legacy.py(4700+ lines) is not in theCOGSlist inpaperdynasty.pybut was present in the Docker image, importing live production dependencies and posing an accidental-activation risk if cog auto-discovery were ever added.The
.dockerignorealready contained a wildcard*_legacy.pypattern (added in an earlier catchup commit) which should cover this file, but relying solely on a wildcard pattern left the exclusion implicit. This PR adds an explicitcogs/gameplay_legacy.pyentry to make the exclusion unambiguous and self-documenting.Files Changed
.dockerignore— added explicitcogs/gameplay_legacy.pyentry alongside existing*_legacy.pywildcardTest Results
No test suite. Verified the
.dockerignorenow contains the explicit entry and the existing wildcard pattern is preserved.Other observations
cogs/gameplay_legacy.pystill exists in the repository and imports live dependencies (api_calls,db_calls_gameplay, etc.). If it is no longer needed, deleting it entirely would eliminate the risk more completely — but that's a larger decision for human review.AI Code Review
Files Reviewed
.dockerignore(modified)Findings
Correctness
paperdynasty.pylines 50–56 confirmcogs.gameplay_legacyis absent from theCOGSlist — the PR's premise is accurate.cogs/gameplay_legacy.pyexists on disk and is not loaded at runtime, but would be present in the Docker image without this exclusion..dockerignoreentry is syntactically correct and placed logically adjacent to the existing*_legacy.pywildcard.Security
Style & Conventions
Suggestions
.dockerignoreuses Gofilepath.Matchsemantics where*does not cross path separators. This means*_legacy.pymay only match root-level files and may not have been coveringcogs/gameplay_legacy.pyat all — making this explicit entry potentially functional rather than merely cosmetic. The outcome (add the explicit entry) is correct either way.cogs/gameplay_legacy.pyfrom the repo entirely (as the PR author notes). At 4700+ lines with live production imports, the file is an ongoing maintenance burden. Excluding it from Docker is a good short-term fix; removal is the clean solution.Verdict: APPROVED
The
.dockerignorechange is correct, low-risk, and strictly improves safety. The explicit entry definitively excludescogs/gameplay_legacy.pyfrom Docker builds regardless of how Docker resolves the wildcard against subdirectory paths. Ready to merge.Automated review by Claude PR Reviewer