Skip to content

v0.5.0 — A corrupt calendar record is P6's internal Standard

Choose a tag to compare

@danafitkowski danafitkowski released this 28 Oct 17:34
· 7 commits to main since this release

A minor release. A corrupt calendar record is read the way P6 schedules it: on P6's internal Standard calendar, not on the week the record declares. The screen is the one cpp-cpm-engine's parseXER applies.

Changed

  • A corrupt calendar record is P6's internal Standard. A record is corrupt when its week's shift slots are written finish-first, (f|HH:MM|s|HH:MM), and its clndr_type is not a legal P6 token (CA_Base, CA_Rsrc, CA_Project); the one seen in real exports says CT_Project. P6 cannot bind such a record and schedules its activities Monday to Friday, eight hours a day, no exceptions, as its own stored dates show. get_calendar_map now gives the record that calendar (hours_per_day 8 whatever day_hr_cnt says). v0.4.0 read it as declared, so a record declaring Monday to Saturday counted Saturdays P6 does not work.
  • Finish-first slots alone are not corruption. A record with a legal type decodes as declared, holidays included, as before.
  • A finish-first record with no clndr_type takes the fallback, as in the engine. A genuine P6 export always writes the type.

Added

  • p6_fallback and corrupt_record_alert (the calendar-corrupt-p6-fallback ALERT) on a corrupt record's calendar-map entry.
  • calendar_corrupt_fallbacks(cal_map) lists those alerts.
  • CalendarCorruptRecordWarning, raised once per corrupt record.
  • decode_clndr_data and decode_calendar_record, cpp-cpm-engine's decoder copied in unchanged, so the parser screens without the engine installed.

Why a minor release

Before 1.0 the minor number moves for a release that changes results a caller already reads: get_calendar_map's entry for a corrupt record changes. Nothing moves for any other record.

Testing

tests/test_corrupt_calendar_record_2026_10_28.py: 12 synthetic tests; 7 fail on v0.4.0, 4 pin what must not move, 1 compares the decoder with cpp-cpm-engine's when the engine is on sys.path. pytest tests/: 142 tests, 140 pass and 2 engine-parity tests skip without the engine; all 142 pass with it. CI 9/9.

See CHANGELOG.md.