Skip to content

fix: classify daily gaps using declared exchange sessions - #90

Merged
stefan-jansen merged 2 commits into
mainfrom
fix/daily-session-gaps
Oct 17, 2026
Merged

stefan-jansen merged 2 commits into
mainfrom
fix/daily-session-gaps

Conversation

@stefan-jansen

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

Copy link
Copy Markdown
Contributor

Closes #89

Outcome

Daily GapDetector detection now counts authoritative exchange sessions strictly between observed daily labels. An NYSE holiday/weekend is not missing data, an early-close session is still one session, and an outage affecting every asset remains missing. Explicit calendar wins over shared FeedSpec metadata, then NYSE; None disables classification, while 24/7 is a real schedule. The resolver is imported from Specs, pinned to merged source 701bde68744035050ede386efce498234c661c21 rather than the unrelated active local Specs checkout.

Compatibility

Existing positional parameters remain supported. is_crypto=True selects 24/7 only absent an explicit/feed calendar. Default daily missing counts change intentionally to scheduled NYSE sessions. Legacy version-1 metadata null inherits, while version-2 explicit null disables checks. Daily Date/Datetime values retain session-label interpretation. Explicit event/bar-close semantics and intraday calendar declarations fail clearly instead of claiming support. Intraday legacy calls are unchanged.

Detection never fills or modifies the frame. Existing elapsed-grid filling and separate update-manager range planning are not claimed as calendar-aware; documentation states those limits. No release or deployment is requested. A future PyPI release must replace the immutable VCS dependency with a qualified released Specs version; this source qualification is not a claim of PyPI release readiness.

Executed evidence

  • Regression-only base 486f5c6 (production source identical to 28677d6): tests/test_daily_session_gaps.py, 13 failed/1 passed. The weekend and July closure regressions fail on incorrect missing counts, independently of new API keyword support.
  • Fix dc9344d: same provider regressions plus declaration, early-close, non-US, Date and error cases; 59 passed across tests/test_daily_session_gaps.py, tests/test_gaps.py and tests/test_utils_gaps.py.
  • Ruff check/format, ty, strict MkDocs, wheel/sdist build, actionlint and all pre-commit hooks pass.
  • Full offline suite: 3796 passed / 292 deselected, 85.97% coverage (85% required). Separate ResourceWarning and unraisable-exception error lane: 3796 passed / 292 deselected.
  • Isolated wheel and sdist installations pass dependency checks, silent imports, CLI and README quickstart. Installed-wheel behavioral probes pass with Polars 2.0.0 and exact Specs direct_url commit identity.
  • Public coverage, lint, docs, dependency audit/review and CodeQL passed; supported-platform and ecosystem matrices must complete before merge.

Review and assistance

AI-assisted code, tests and prose under maintainer direction. Reviewed the source diff, legacy call compatibility, schedule independence from observations, metadata semantics and input immutability. Calendar selection is shared, not reimplemented. No unrelated source/workflow changes or release artifacts are included.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 23:31

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 55b86e2 into main Oct 17, 2026
27 checks passed
@stefan-jansen
stefan-jansen deleted the fix/daily-session-gaps branch October 17, 2026 13:59
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: classify daily gaps against declared exchange sessions

2 participants