Skip to content

Remove four Config settings nothing reads - #165

Merged
dmccoystephenson merged 1 commit into
mainfrom
refactor/remove-dead-config-settings
Aug 2, 2026
Merged

Remove four Config settings nothing reads#165
dmccoystephenson merged 1 commit into
mainfrom
refactor/remove-dead-config-settings

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Removed Config.playerSaveFile, statsSaveFile, and timeServiceSaveFile — the multi-slot save layout resolves paths through SaveFileManager.get_save_path() instead, so these three have been dead since Multiple save files #51; a grep confirms every remaining match outside config.py/the test was a local as variable in fishE.py, never self.config.*.
  • Removed Config.initialEnergyplayer.py already documents that starting energy deliberately comes from the housing ladder, not a configured value, so the attribute had no reader. Updated that comment since it referenced the now-removed attribute by name.
  • Trimmed the matching assertions out of tests/config/test_config.py (they were pinning dead values) and dropped the now-unused os import.

Test plan

  • python3 -m compileall -q src
  • SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy python3 -m pytest — 729 passed
  • grep -rn '\.playerSaveFile\|\.statsSaveFile\|\.timeServiceSaveFile\|\.initialEnergy' --include='*.py' . — no remaining references anywhere
  • README/PLANNING.md grepped for the removed names — no doc drift

Closes #147


drafted by Claude on behalf of Daniel Stephenson

playerSaveFile, statsSaveFile and timeServiceSaveFile were made
obsolete by the multi-slot save layout (SaveFileManager composes
paths from the selected slot instead); initialEnergy was never wired
up since player.py deliberately sources starting energy from the
housing ladder. All four looked like live configuration but silently
did nothing if edited.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dmccoystephenson

dmccoystephenson commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

Self-review rubric:

  • Scope: PASS — only the three files needed to remove the four dead settings and update the one comment that named them.
  • Tests-new: N/A — this removes dead surface rather than adding behavior; nothing new needs its own test.
  • Tests-fix: N/A — not a bug fix.
  • Sibling structure: N/A — no new files.
  • Sibling renames: N/A — no renames.
  • Docs: PASS — README.md/PLANNING.md grepped for the four removed names, no hits.
  • Issue resolution: PASS — all four settings named in Config declares four settings nothing reads, and the tests assert they keep existing #147 (playerSaveFile, statsSaveFile, timeServiceSaveFile, initialEnergy) are removed, along with their test assertions, per the issue's suggested fix.
  • CI: PASS — test check green on f6b7ae0 (https://github.com/Stephenson-Software/FishE/actions/runs/30771347132).
  • Schema-sync: N/A — Config isn't a persisted model.
  • Money-format: N/A.
  • Deterministic-tests: N/A — no test touches random.
  • Headless-pygame: N/A.
  • camelCase: N/A — no new identifiers.

Summary: dead-code removal, all applicable items pass, CI green. Ready to merge.


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 4b0c3bb into main Aug 2, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the refactor/remove-dead-config-settings branch August 2, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config declares four settings nothing reads, and the tests assert they keep existing

1 participant