Skip to content

fix(calendar)!: use UTC daily crypto sessions and maintenance - #103

Merged
stefan-jansen merged 1 commit into
mainfrom
fix/crypto-daily-session-contract
Oct 17, 2026
Merged

stefan-jansen merged 1 commit into
mainfrom
fix/crypto-daily-session-contract

Conversation

@stefan-jansen

Copy link
Copy Markdown
Contributor

Closes #100.

Use the existing authoritative PandasMarketCalendar 24/7 adapter for CryptoCalendar. Enumerate one daily UTC session open rather than treating every hour as a session. Normalize membership and annotations to UTC, subtract explicit half-open maintenance windows including overnight windows, and return strict adjacent session boundaries rather than arbitrary immediate instants or intraday maintenance reopens. Canonical calendar='24/7' and the existing CRYPTO_24_7 alias select the continuous schedule; None belongs to calendar-free consumers and is rejected on a concrete schedule object.

This intentionally changes legacy helper outputs on the next-minor 0.2 development line. It is not part of the historical 0.1.7 patch. Existing maintenance constructor arguments/name remain; invalid windows fail before constructing a misleading schedule. The calendars extra is now required rather than silently manufacturing a schedule. The existing feature guide explains units, boundary/maintenance/timezone changes and row-mode migration. No new wire format or annualization rule.

Evidence at f61ae28, tree ac9e5f0be5888692d5591ffa0e05d63d08d2a677:

  • New public helper regressions on unchanged base9364c86: 29 failed/1 passed in 0.48s. The same cases against a normally installed b95fb29 wheel with the unchanged producer: 29 failed/1 passed in 0.34s. These exercise actual session enumeration, UTC/Tokyo/New York membership, overnight duration, original-row annotations and boundary calls, not copied schedule logic.
  • Initial repair passed 28/30; exact-midnight previous-close cases exposed insufficient backward lookup. Fixed the lookup, retaining both tests.
  • Final new/existing helper suite: 90 passed in 4.61s. Normal installed wheel: 90 passed on Python3.12/3.13/3.14 in 4.22s/8.03s/4.77s. Actual installed origin and changed producer bytes match the wheel. Python3.12 dependency consistency passes all31packages.
  • Full clean source suite: 4414 passed, 57 deselected, 17 warnings in 93.08s. Whole Ruff/format/ty, all-file hooks and plain commit hooks pass.
  • Executable documentation workflows, strict MkDocs2.93s, wheel/sdist builds and Twine metadata checks pass. Candidate manifest binds this source/tree/version and both hashes.
  • Wheel SHA256 a69511f27369e9154f5f9a290ff64f92e4c32b77a1a359e8b3e9aeb3ea2b7db6. Sdist SHA256 1e70078c1ff5399fb2215c0c03824d7c5ec0476efcba6b48ea2aa47c6e291cbc.

Current-head supported hosted gates remain required before ordinary merge. This branch still honestly uses the existing immutable Specs qualification dependency; published dependency adoption is independently qualified in PR102. Remaining daily feature grids and session/elapsed consumers are not claimed complete by this helper repair. No release/tag/docs deployment.

AI assistance: Codex reproduced the actual source/installed workflows, implemented and reviewed the focused repair and migration text, and executed the listed checks. No independent human review is claimed.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 19:56

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit 8b58114 into main Oct 17, 2026
31 checks passed
@stefan-jansen
stefan-jansen deleted the fix/crypto-daily-session-contract branch October 17, 2026 22:16
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.

fix: distinguish continuous exchange sessions from hourly crypto observations

2 participants