Private
Public Access
0
0
Files
manual_slop/src
ed 592d0e0c04 fix(models): restore legacy Metadata = TrackMetadata alias for backward compat
tests/test_track_state_schema.py imports 'from src.models import
Metadata' and uses it as a dataclass (e.g. 'Metadata(id=..., created_at=...)').
After Phase 5, models.Metadata was undefined and __getattr__ returned
the type alias from src.type_aliases (which is dict[str, Any]). The
test then failed with 'TypeError: dict.__init__() got an unexpected
keyword argument created_at'.

This commit restores the legacy 'Metadata = TrackMetadata' alias at
the top of models.py so 'from src.models import Metadata' resolves to
the TrackMetadata dataclass (the original behavior). New code should
import directly: 'from src.mma import TrackMetadata'.

Also removes the now-redundant __getattr__ entry for Metadata (it's
eager now).

Tests verified:
  tests/test_track_state_schema.py (5/5 PASS; was 2/5 before this fix)
2026-06-26 10:26:35 -04:00
..
2026-06-06 10:24:22 -04:00
2026-06-26 05:55:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 11:08:07 -04:00