Skip to content

feat(coinmetrics): finish targeted spot candle recovery - #134

Merged
stefan-jansen merged 5 commits into
mainfrom
feat/coinmetrics-targeted-acquisition
Oct 25, 2026
Merged

stefan-jansen merged 5 commits into
mainfrom
feat/coinmetrics-targeted-acquisition

Conversation

@stefan-jansen

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

Copy link
Copy Markdown
Contributor

Closes #110.

Finish the remaining source-specific OHLCV acquisition with CoinMetricsProvider, integrated into typed configuration, discovery and DataManager. Generic stored-calendar reporting and Databento CME recovery are already merged and remain the shared detection and backfill mechanism. This repair adds spot-market candles; asset metrics and reference rates have separate schemas.

Request one exact exchange-base-quote-spot market with aware, half-open timestamps, native frequencies and UTC left labels. Preserve original filters across pagination and reject wildcards, foreign or altered continuation URLs, repeated tokens, malformed values and conflicting duplicates. The existing backfill merger preserves stored observations and metadata and reports residual gaps. Empty/no-trade responses never manufacture observations. Existing public Frequency enum values and canonical 10min metadata now map to the supported native intervals; five public-manager cases fail before this repair and pass afterward. A clean installed old wheel independently reproduces the five-minute incompatibility.

A real API-error workflow exposed an existing shared shutdown defect: an instrumented session can retain its provider until interpreter teardown, where finalizer logging through structlog into torn-down datetime state segfaults. BaseProvider now closes its HTTP session directly during interpreter finalization while retaining ordinary close behavior while Python is live. Both public subprocess cases fail on the producing base, then pass with the correction; the original credential-free live error workflow exits normally.

The official Coin Metrics candle response example exercises acquisition and actual FlatStorage/HiveStorage report/backfill workflows, including exact boundaries, empty and partial replies, unchanged stored rows/metadata and residual missing observations. Paid authenticated acquisition is not asserted: the observed community catalog is empty and candle access returns HTTP 403. Account-specific market/history entitlement remains a source constraint; no paid call was made.

PR133 is now merged as a213df5. A normal conflict-free merge preserves the existing Coin Metrics repair and its frequency fix, and incorporates qualified main, including both reviewed shared-policy callers and the audited filelock/GitPython repairs. No rebase or force push is used. Python 3.15 remains unsupported because current Databento 0.88.0 dependencies prevent a complete installation; issue #37 stays open under the reviewed Data-only exception.

At final integrated source 46d8c08493cd138543dc61e39955e12098d4084b, 152 focused Coin Metrics/Polymarket/registry/consistency cases pass with ResourceWarning errors. Both complete local lanes pass 4,583 tests, with 85.78% coverage; each has one optional legacy-conversion skip and 292 configured deselections. Ruff, formatting, ty, actionlint, all hooks, strict docs and package builds pass. Clean wheel and sdist installations pass dependency, CLI and README checks; an installed consumer verifies the official candle example and all five public frequency spellings. Both distributions match all 178 tracked source files.

All 28 final-head checks completed: 27 successful and the sole validated Python 3.15 exclusion. The original installed-bundle source fetch returned HTTP 403 before tests. Stefan authorized a retry of that failed job; the retry fetched the same URL and immutable Zipline source cf649ac06fddce76f6caa2403cd8494ac84f72ad successfully and passed all 13 installed conversion tests. No source substitution, permission change or gate bypass was used. Ordinary pinned-head merge completed as 42a3b1d2804b6ba0b7524157777f2f586f80b24f on 2026-10-25 at 21:31:57 UTC; issue #110 closed through the merge. The entire merged tree matches the reviewed and qualified head. Final main d4f33bcabcc038ff4b84b934b1cd5c0c764ff6d8 passed all five hosted workflows and stable 0.3.1 package, source-identity, clean-install and documentation qualification. The exact 0.3.1 candidate is prepared for a separate release decision. Published Data 0.3.0 remains immutable; no release or deployment is included.

AI assistance: Codex implemented and verified this maintainer-directed provider/lifecycle repair, regressions and documentation. The maintainer owns correctness and final qualification.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:32

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 insufficient remaining quota.

@stefan-jansen
stefan-jansen merged commit 42a3b1d into main Oct 25, 2026
40 of 41 checks passed
@stefan-jansen
stefan-jansen deleted the feat/coinmetrics-targeted-acquisition branch October 25, 2026 21:31
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: report stored calendar gaps before targeted source acquisition

2 participants