Skip to content

fix: adopt shared calendar intent in session-aware labeling - #95

Closed
stefan-jansen wants to merge 18 commits into
mainfrom
fix/labeling-shared-calendar-contract
Closed

stefan-jansen wants to merge 18 commits into
mainfrom
fix/labeling-shared-calendar-contract

Conversation

@stefan-jansen

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

Copy link
Copy Markdown
Contributor

Maintainer consolidation: this component is already normally integrated into existing PR98. Under the maintainer-directed batching policy, PR98 will qualify and land the complete temporal-contract consumer objective, including daily grids, labels and feature windows. This record stays open until that batch actually lands, then will close as consolidated with the verified merge reference. It is no longer an independent merge candidate. Superseded component CI has been requested cancelled, not claimed passing; every applicable final-batch gate remains required. The component evidence below retains its exact tested revision.

Refs #94. Implements the shared calendar contract, daily session-label inputs and scheduled-session holding periods in calendar_aware_labels. Current reviewed head: de4ab2a.

The latest commit corrects only an obsolete guide sentence claiming daily session labels are rejected. Executable documentation, strict docs, preserved old/new rendered anchors and commit hooks pass. Source and tests remain identical to 2259bae; the runtime results below retain their tested revisions.

Behavior

  • Canonical calendar selection is explicit argument, declared config selector, feed metadata, then NYSE. Explicit None labels observation rows without provider loading or chronological sorting.
  • Config JSON/YAML, copying, equality and explicit serialization projections preserve omitted versus null calendar declarations and shared FeedSpec metadata.
  • Expected-bar and session horizons validate the declared grid before labeling. Daily session-label identifiers retain their displayed dates; they are not treated as intraday instants.
  • A session horizon N expires on the final available bar of the Nth following scheduled session, censored at observed coverage end. It spans lunch/overnight/holiday boundaries using actual exchange schedules and the existing barrier engine.
  • A shortened session can legitimately have no bars when partial_bar_policy excludes them. It still counts as a scheduled session. The exit never advances beyond its deadline just to obtain a positive bar offset; a zero-bar timeout at entry is valid.
  • Empty filtered price tables retain portable String barrier labels and can be saved to Parquet. Empty grouped standalone calls also retain a typed result instead of concatenating no groups.
  • Timestamp-free legacy labels keep unknown durations null and portable rather than storing a Python Object column. Their numerical returns, holding bars and row-based label times do not change.
  • Legacy standalone numerical definitions, explicit custom calendars and auto-gap compatibility remain distinct from declared-grid completeness. Existing elapsed compatibility behavior is not silently redefined.

Dependencies and compatibility

PR104 supplies daily grid validation and should land first. PR102 separately owns published Specs adoption. Changes target next-minor 0.2, not the historical 0.1.7 patch; no release or deployment is requested. The old guide anchor is preserved.

Executed evidence

  • Original public resolver/config/row workflows fail against the base. New daily/session workflows add 15 failing acceptance cases with two positive controls before implementation.
  • Actual filtered-price output from the installed wheel reproduces ten empty-schema/group failures with six controls. The repair passes 403 labeling/contract cases.
  • An actual complete NYSE 5h grid with excluded partial bars reproduces four deadline extensions into a later session, while four two-session controls pass. The repair passes 411 labeling cases.
  • At 9dcc1f6, UTC/aware/declared-naive DST and overnight CME qualification passes 86 selected cases; hooks, push and remote verification pass.
  • At current 2259bae, the actual installed timestamp-free legacy export fails before repair; all twelve new empty/nonempty/grouped/dense/sparse/no-event cases fail against the producing code, then 427 labeling/contract cases pass after the Null-duration repair. Lint, types, hooks and remote verification pass. Combined PR98 at 85764b5 integrates this increment and passes 135 focused cases, 4,608 full tests in both normal and canonical coverage modes, and all critical coverage thresholds. Its exact installed wheel passes 262 public consumer cases plus six config cases on each supported Python, including all 28 empty/export regressions. All package bytes, origins, dependencies, executable docs, strict docs, builds and hooks pass. This integration evidence does not replace PR95's current-head hosted checks.
  • Earlier exact revision 6296d2b passed 4,505 full source tests and 91 installed cases on each supported Python. Those results retain their tested revision.
  • The earlier combined c8d603c, before the timestamp-free legacy export increment, passed 4,596 full tests twice and a different 250-case installed selection on each supported Python. Those results retain that tested revision.

AI assistance: Codex reproduced the actual public and serialized workflows, implemented and reviewed source/tests/docs, and ran the listed checks. Hosted checks remain required; no independent human review or broader harmonization is claimed.

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

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

Copy link
Copy Markdown
Contributor Author

Implemented through the maintainer-directed temporal batch #98, merged as b0d2027 after all 40 applicable checks passed. Original head de4ab2a is a normal ancestor of reviewed batch head c69845d; its shared labeling contract, regressions and documentation are retained, including subsequent physical-time corrections. Closing this component as consolidated, not discarding its work. AI assistance: Codex reviewed the integration, verified the original ancestry and matching tested/merged trees, and performed this maintainer consolidation.

@stefan-jansen
stefan-jansen deleted the fix/labeling-shared-calendar-contract branch October 18, 2026 02:25
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.

2 participants