Skip to content

fix(reporting): align source timezone days to local midnight - #1926

Open
rachitm022 wants to merge 1 commit into
nextfrom
rachitm022/sdk-reporting-local-days-next
Open

rachitm022 wants to merge 1 commit into
nextfrom
rachitm022/sdk-reporting-local-days-next

Conversation

@rachitm022

Copy link
Copy Markdown
Collaborator

Why

Part of AI-22388's calendar prerequisite: source-timezone daily reporting must follow the source's civil day, including DST transitions. This change does not provide package-grain full coverage.

What changed

  • Anchor source-timezone periods at local midnight and use the same calendar for consumer status validation.
  • Admit production schedules using the effective account-resolved source timezone, while preserving existing UTC, account-timezone, and custom-timezone semantics.
  • Cover DST, Kolkata, period retry identity, and real production admission.

Validation

  • SDK focused reporting tests: 98 passed, 88 skipped. Ruff, Black, mypy, and generated-code validation passed.
  • Full local make ci-local with six pytest workers: 22,075 passed, 3,031 skipped, seven Mac-only failures in process cleanup and Linux interop tests that require /proc or /etc/os-release. CI on Linux remains the release gate.
  • ESA process-local PYTHONPATH override to this next-based SDK source: 128 calendar/source unit tests and 52 reporting lifecycle integration tests passed.

Activation

ESA still pins SDK 10.0.0b19; it must move to a released SDK containing this fix before activation. No ESA dependency change is included here.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve.

Clean timezone-alignment fix. Anchors source_timezone daily periods at local midnight (naive datetime(1970,1,1) in _schedule_clock) and routes consumer-status validation through the same clock, eliminating the prior epoch-UTC phase that misaligned local days. The source_timezone alignment joins an already-existing wire vocabulary (_ALIGNMENTS, resolution.py, offerings.py referenced it at base), so this is additive under fix: — no semver signal issue and no new version-translation pathway owed. Production admission correctly relaxes zone verification only when the source offering is account-resolved (source_timezone is None); fixed offerings still reject a mismatched config zone (BINDING_MISMATCH). Test coverage is strong (DST spring/fall, Kolkata half-hour offset, period-key retry identity, unchanged-phase regression guard, requires-zone/no-anchor negative).

No critical/high/medium findings. One Low (bare ValueError ordering before LedgerConflictError, dead for already-admitted configs) is omitted. high_risk false, gated_paths false, no author team gate. Falls through to row 9.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant