fix: update chart_service path from data/ to storage/ #119
No reviewers
Labels
No Label
ai-changes-requested
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
in-next-release
status/in-progress
status/pr-open
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-v2#119
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/chart-service-storage-path"
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
PR #86 moved state files from
data/tostorage/but missedchart_service.py. The/chartscommand autocomplete shows no results because the code reads from/app/data/charts.jsonwhile the file is at/app/storage/charts.json.Changes
services/chart_service.py:CHARTS_FILEpath changed fromdata/charts.jsontostorage/charts.jsonTesting
One-line path change. Verified no other
data/references remain that should bestorage/.🤖 Generated with Claude Code
AI Code Review
Files Reviewed
services/chart_service.py(modified)Findings
Correctness
CHARTS_FILEis nowPath(__file__).parent.parent / "storage" / "charts.json", which resolves to/app/storage/charts.jsonin the container — matching therwvolume mount introduced in PR #86._save_charts()callsself.CHARTS_FILE.parent.mkdir(parents=True, exist_ok=True), so thestorage/directory is created automatically on first write if the volume mount is absent (consistent with the pattern used by the five other trackers updated in PR #86).data/references remain that should bestorage/" — verified this is accurate. The only remainingdata/references in.pyfiles are:config.py:93—sheets_credentials_path: str = "/app/data/major-domo-service-creds.json"tests/test_services_draft_sheet.py:39— setsconfig.sheets_credentials_path = "/app/data/test-creds.json":rocredential mount at/app/data/(not a state file, correctly excluded from this migration).Security
Style & Conventions
# Ensure data directory existsshould read# Ensure storage directory existsnow that the path has changed. Minor — does not affect behaviour.Suggestions
# Ensure data directory existsto# Ensure storage directory existsto stay in sync with the new path. Trivial but keeps the code self-consistent.Verdict: COMMENT
The path fix is correct and complete. The PR body's claim that no other
data/paths were missed has been independently verified. The one stale comment is cosmetic and does not block merging.Automated review by Claude PR Reviewer
f024757e2eto3c453c89ceAI Code Review
Files Reviewed
services/chart_service.py(modified)Findings
Correctness
CHARTS_FILEupdated from'data' / 'charts.json'→"storage" / "charts.json", consistent with thestorage/volume introduced in PR #86._save_charts()already callsself.CHARTS_FILE.parent.mkdir(parents=True, exist_ok=True), so thestorage/directory is created automatically even on a fresh container — no deployment risk.data/references in the codebase are for the credentials file (major-domo-service-creds.json) which is intentionally still atdata/per PR #86's file-level credential mount design.Security
Style & Conventions
Suggestions
commands/utilities/CLAUDE.mdstill referencesdata/charts.jsonat lines 166 and 197 — stale doc from before PR #86. Worth a follow-up cleanup alongside thecommands/gameplay/CLAUDE.mdandcommands/voice/CLAUDE.mddoc debt already noted from PR #86.Verdict: APPROVED
One-line bug fix with correct mechanics. The storage directory is auto-created, no migration needed. Cosmetic linter changes are noise-free.
Automated review by Claude PR Reviewer