bug: read-only volume mount prevents scorecard tracker from persisting state #85
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#85
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem
The
data/directory is mounted read-only indocker-compose.yml:This protects the Google Sheets credentials file, but it also prevents runtime state files from being written.
ScorecardTracker.save_data()silently fails (caught by a bareexcept), so:unpublish_scorecard()removals are never persisted to diskscorecards.jsonindefinitely#live-sba-scoreschannel gets cleared and hidden on repeatSame issue likely affects other state files in
storage/:voice_channels.json,trade_channels.json,soak_data.json.How it was discovered
After the 2026.3.17 release, the live scorebug tracker kept updating despite no active games. Found 16 stale scorecard entries dating back to March 9. Cleared manually on akamai.
Fix
Split the volume mount so credentials are read-only but runtime state is writable. Two options:
Separate volumes: Mount credentials file directly (
:ro) and mount a writable volume for state filesMove state directory: Have trackers write to a different path (e.g.
/app/state/) with its own writable volume, keepingdata/entirely read-only for credentialsAlso: the
except Exceptioninsave_data()should at minimum log the error instead of silently swallowing it.PR #86 opened: #86
Fix approach: Split the single
:rodata volume into two separate mounts:./data/major-domo-service-creds.json→/app/data/major-domo-service-creds.json:ro)./storagevolume for all runtime state files (/app/storage:rw)All 5 tracker defaults updated (
scorecards.json,voice_channels.json,trade_channels.json,soak_data.json) to write tostorage/instead ofdata/. Thesave_data()methods already log errors properly — the:romount was the only thing preventing writes.Deployment action needed: Update
.envon akamai to setSHEETS_CREDENTIALS_HOST_PATH=./data/major-domo-service-creds.jsonand addSTATE_HOST_PATH=./storage.