Skip to content

cleanup(storage): phase 4 retire legacy path/config helpers after normalization #472

@Orinks

Description

@Orinks

Summary

Phase 3 should leave AccessiWeather with one active runtime storage contract. After that, we should clean up the parallel legacy path/config machinery that still exists in the repo.

This issue is intentionally after storage-root normalization, not before.

Phase 4 goal

Retire legacy path/config/state helpers that are no longer part of the active runtime model, while preserving read compatibility where needed.

In scope

1) Remove or quarantine legacy path callers/helpers

Audit and clean up:

  • src/accessiweather/config_utils.py
  • src/accessiweather/location.py
  • src/accessiweather/notifications/weather_notifier.py
  • src/accessiweather/logging_config.py
  • any tests that only validate deprecated get_config_dir() / old storage semantics

Expected result:

  • one obvious path for storage resolution in the codebase
  • no active module silently writing to old .accessiweather / ad hoc roots
  • no dead persistence paths left looking authoritative

2) Trim compatibility fallbacks that were only needed during refactor rollout

Examples:

  • old legacy-path fallbacks once Phase 3 has shipped safely
  • duplicate startup/path logic that exists only to bridge old codepaths

3) Align docs/tests with the actual storage model

Update only the docs/tests that still describe or assert stale behavior, especially around:

  • portable mode markers / layout
  • config/cache/log/state locations
  • migration expectations

Optional pre-work / soak gate

Before closing this issue, do one short observation pass on a real installed build and a portable build to confirm:

  • Phase 3 path routing is stable
  • no surprise writes happen outside the canonical root
  • old users are not losing config/state across upgrade

Out of scope

  • new product features
  • re-architecting unrelated config models
  • changing alert/runtime-state schema beyond removing dead compatibility code
  • aggressive cleanup of historical docs that are not user/developer facing

Done looks like

  • engineers no longer need to ask whether a module should use Paths, config_utils.get_config_dir(), or ConfigManager.config_dir
  • the answer is obvious from one canonical storage helper / contract

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions