Skip to content

Refactor schedule mapping#312

Merged
MTrab merged 2 commits intomasterfrom
codex/schedule-refactor
Feb 11, 2026
Merged

Refactor schedule mapping#312
MTrab merged 2 commits intomasterfrom
codex/schedule-refactor

Conversation

@MTrab
Copy link
Owner

@MTrab MTrab commented Feb 11, 2026

Summary:

  • move schedule parsing to a slots-first model so both protocol 0 d arrays and protocol 1 slots keep every run in schedules["slots"] while Schedule, ScheduleInfo and DeviceHandler base progress/next calculations on those slots instead of primary/secondary.
  • expose the richer slot metadata (duration_extended/end/source/party_mode/one_time flags) on the public device APIs and keep the raw cfg/dat dumps aligned.
  • refresh documentation (README.md, DATA_MAPPING.md) and scripts/dump_mapping.py so the reference fixtures describe the new mapping and the script tolerates multiple payload entries per fixture.

Changes:

  • refactored ScheduleParser, Schedule and DeviceHandler to drop primary/secondary and consume only slots, plus updated schedules metadata keys.
  • updated docs to explain the slot-first approach, including the new metadata fields and source tags.
  • made scripts/dump_mapping.py decode fixtures with multiple payloads so the visual dump mirrors what DeviceHandler exposes.

Testing:

  • bash scripts/prepare_test_fixtures.sh
  • source .venv/bin/activate && pytest tests/test_device_decode.py -q
  • source .venv/bin/activate && python scripts/dump_mapping.py

@MTrab MTrab added enhancement New feature or request major Major version release labels Feb 11, 2026
@MTrab MTrab merged commit cc5de1a into master Feb 11, 2026
3 checks passed
@MTrab MTrab deleted the codex/schedule-refactor branch February 11, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major Major version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant