Skip to content

fix: preserve calendar declarations through ingestion and updates - #98

Merged
stefan-jansen merged 14 commits into
mainfrom
fix/ingestion-calendar-declarations
Oct 17, 2026
Merged

stefan-jansen merged 14 commits into
mainfrom
fix/ingestion-calendar-declarations

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #97

Outcome

Carry canonical calendar and shared FeedSpec declarations through DataManager load, import, initial update and incremental update. Explicit selection overrides supplied/stored declarations, then NYSE. Version-2 omission stays absent, explicit null disables downstream detection, and a legacy version-1 null remains inheritance unless explicitly overridden. Persist supported timezone, timestamp and grid fields without inventing another resolver.

Incremental gap detection receives the effective stored/feed declaration rather than an asset-class switch. Disabled calendars cannot trigger filling of an old outage. Frequency/bar-type contradictions, invalid calendars and invalid stored temporal declarations fail before publishing a replacement generation. Exchange remains descriptive. Model-to-FeedSpec projection uses a physical frequency instead of legacy unknown/event-count labels.

This PR targets main after session/Metadata PR94 merged atda7d259. Currentcf8b559cba4d560b650deaa8c2f412300e9472b3 integrates that qualified source without rewriting published history and includes provider-reuse PR96. Review the focused six-file ingestion diff against main. Every applicable main-target workflow must qualify this exact combined head; old stacked-base trigger exclusions are not full qualification.

Executed evidence

  • Production base1f979aa8ee216c62dc9092b7cc2b68209e0304c8, regression-only373ba63b1871044ab1c3524470aa829627733d06:14 failed across both storage backends. Existing calendar=None import/load/update calls reproduce changed downstream schedule and imputation; new feed arguments also demonstrate the missing boundary API. The latter TypeErrors are not counted as existing numerical reproductions.
  • Currentcf8b559cba4d560b650deaa8c2f412300e9472b3:140 focused ingestion/storage/session/provider-reuse cases pass in13.70s, ResourceWarning as error, all native threads capped1. Earlier7993b90 passed127 cases in10.98s. These checks completed before the strict replacement hold; no further local checks or hooks will run during that hold.
  • Ruff lint/format, ty, diff checks and normal commit hooks pass. Hosted full CI/docs/package/platform/resource qualification remains required, not claimed complete.

Compatibility and remaining scope

Continuous data must declare24/7 rather than rely on asset-class inference. Explicit None is row mode, not a continuous schedule. Non-null session-start overrides are rejected by the native adapter. Intraday expected-grid and explicit daily event/close interpretation remain unsupported pending separate repairs; use fill_gaps=False for those updates. Detection and filling remain distinct: enabled general forward fill still uses the legacy elapsed grid and can insert closed dates around a real gap. This PR does not claim calendar-aware imputation or complete harmonization.

AI-assisted code/tests/prose under maintainer direction. Owner reviewed actual diff, old positional signatures, shared version semantics, both storage backends, atomic failures, metadata projection, precedence and legacy preservation. No independent reviewer claimed. Published0.2.1 unchanged; no release/deploy.

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

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.

Base automatically changed from fix/session-calendar-contract to main October 17, 2026 17:16
…r-declarations

# Conflicts:
#	docs/user-guide/sessions.md
#	src/ml4t/data/core/models.py
#	src/ml4t/data/managers/storage_manager.py
#	src/ml4t/data/sessions/assigner.py
#	src/ml4t/data/sessions/completer.py
#	tests/test_session_calendar_contract.py
@stefan-jansen
stefan-jansen merged commit e6568c0 into main Oct 17, 2026
27 checks passed
@stefan-jansen
stefan-jansen deleted the fix/ingestion-calendar-declarations branch October 17, 2026 17:35
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: preserve calendar declarations across ingestion and updates

2 participants