feat: sync latest ARR implementation

This commit is contained in:
Wyndham ARR
2026-07-31 15:11:42 +08:00
parent d6f8a747fa
commit bf7939dd1a
185 changed files with 17527 additions and 2260 deletions

View File

@@ -245,6 +245,11 @@ def build_monthly_report(
raise MonthlyReportError(ErrorCode.SOURCE_INVALID, "monthly source rows are duplicated")
for fact in facts:
_validate_fact(fact, start, as_of_date)
if facts and max(fact.arrival for fact in facts) != as_of_date:
raise MonthlyReportError(
ErrorCode.SOURCE_INVALID,
"monthly as-of date must equal the greatest included ARRIVAL",
)
pins = _validate_pins(facts, snapshot.daily_versions, start, as_of_date)
_validate_observations(facts, snapshot.channel_observations, pins)
ordered_channels = channel_order(snapshot)