Repository navigation
fix: preserve calendar declarations and session boundary semantics - #94
Merged
Merged
Conversation
added 12 commits
October 17, 2026 10:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #93
Outcome
Session APIs now resolve the canonical calendar through shared FeedSpec: explicit selection, declared feed metadata, then NYSE. Explicit None preserves observations unchanged with no session column or grid expansion. The constructor's old positional/calendar_name forms and explicit exchange selector remain supported, but conflicting explicit selectors fail. Descriptive metadata exchange is not inferred as a selector.
Data Metadata preserves version-2 omitted calendar versus explicit null through JSON/copy/shared projection, with version-1 null inheritance retained. Temporal normalization and serialization use Specs, not a second resolver. Declared timezone, timestamp semantics and grid fields survive metadata bridges.
Provider-driven updates retain explicit null in the metadata payload and reject invalid temporal declarations atomically instead of silently dropping them. The calendar-disable storage round trip is a positive control on the old implementation because the backend already preserves it; the two invalid-declaration mutations are the reproduced update defects. Provider reuse itself is a separate finding and is not hidden behind a broad ValueError assertion here: these update tests explicitly select the real synthetic provider.
Event intervals use [open,close), selecting the new session at continuous midnight. Close-labeled bars use (open,close], including exchange close and break start; explicit declarations override frequency/midnight heuristics. Lunch breaks and declared calendar interruptions are excluded using the same tradable intervals in assignment and completion. Daily labels remain unique when a session contains multiple tradable intervals. Session labels retain civil dates. Naive instants use existing UTC unless a timezone is declared; ambiguous local clocks fail. Existing outside-session null/raise/drop behavior remains.
DataManager's session operations now use one implementation with and without storage. fill_gaps=False assigns without expansion. Minute completion remains the existing open-labeled operation, rejects unsupported close/session-label metadata and honors calendar=None. This is not a claim of general intraday completeness or roll-calendar conformance.
Executed verification
Review and assistance
AI-assisted implementation, regressions and prose under maintainer direction. Owner reviewed actual source diff, shared contract/version semantics, old signatures, non-mutating disabled behavior, continuous/close/break interval boundaries, facade parity and metadata serialization. No independent reviewer is claimed. Separate range-planner PR92 changes different implementation files; remaining general intraday-grid, ingestion propagation and futures-roll work stays explicit. No release/deployment or change to published0.2.1; Specs source pin remains701bde68744035050ede386efce498234c661c21.