Repository navigation
feat(storage): reconstruct portable inputs and exchange legacy bundles - #130
Merged
Merged
Conversation
added 8 commits
October 21, 2026 00:11
Capture each source generation and declaration under its actual writer lock. Copy immutable Parquet files, preserve precision and missingness, hash canonical effective input/configuration separately from capture time and generation identifiers, and verify all files before parsing any table. Reject unsafe paths, credentials, incomplete declarations and conflicting immutable destinations without replacing prior valid results. Reuse the acquisition batch atomic-file helper unchanged. Native snapshot and focused Flat/Hive storage checks pass 170 cases with ResourceWarning errors. Batch 122 integration, docs and final gates remain unfinished.
…cation Three fresh-archive public regressions demonstrate that source-prefixed API keys, access tokens and client secrets escaped the initial declaration filter. Reject normalized credential suffixes before publication. Carry the owning acquisition PR shared helper repair so snapshots also flush writable staging handles on Windows. Focused native snapshot and storage checks pass 173 cases with ResourceWarning errors.
Use supported source readers, the existing history-compatible adjustment reader and Zipline standard writers. Preserve original sid namespaces, raw bars, payouts, source rows and indices, known lifetimes and contract terms; keep unknown publication, currency and merger terms explicit. Preserve distinct exchange identity versus canonical calendar names and right-labeled minute clocks. A real generated equity/minute/two-futures bundle passes native supplied-factor history, unchanged-source hashes and exact writer/reader re-import checks. This is a passing development checkpoint, not final batch 122 qualification.
…tion Reuse the existing captured CSV/Parquet migration recipes. Export six declared tables with actual source revisions, per-role units, separate identity namespaces and explicit preparation settings. Rebuild the same equity history and contract selections after five source generations prune the capture, the original futures file changes and the archive moves. The standalone workflow and native snapshot checks pass 35 cases; account execution is explicitly outside this recipe.
… publication Real standard-writer regressions reproduce empty-selection failure and a missing stock-payment recipient identity. Return typed empty tables before invoking readers that require an asset, and capture referenced payment metadata without fabricating its price coverage. Preserve per-table unknown as-of declarations and CSV-produced role/schema/unit/missing-cell facts. A real Parquet descriptor flush-failure control exposes publication before data fsync; reuse the shared atomic-file writer for copied/generated inputs and flush directory entries before publication. Native checks pass 37 cases; the real optional bundle exchange passes 11 cases with ResourceWarning errors.
…ndency Retain exact-source checks for the optional standard-reader/writer migration route and document the tested reconstruction stack and unknown identity declarations. Closes #122
added 2 commits
October 21, 2026 01:24
An actual isolated wheel run resolves installed files from uv archive layers outside sys.prefix. Validate distribution location, reject editable/source shadowing and retain full Git source and revision checks.
Actual CSV frame and committed-key exports without a separate FeedSpec lost default/declared calendar state and ignored explicit overrides. Capture default timestamp clocks through the shared versioned FeedSpec contract while leaving unclocked reference tables unchanged.
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.
Owning issue
Closes #122
Outcome
Retain and reconstruct explicit market-data input sets independently of mutable storage generations.
storage.SnapshotTable,InputSnapshot,export_snapshotandread_snapshot. Capture frames or protected committed storage keys, caller-supplied effective configuration, source/as-of/unit/revision declarations and existing Specs artifacts.compat.zipline.export_bundlethrough supported asset/bar/history readers, plus standard-writermake_bundle_ingestfor staged migration. Preserve raw daily/minute arrays, supplied factors, dated equities/futures, payout identities/indexes and rename lookup intervals. Reject lossy target price scales before invoking writers.Compatibility and numerical behavior
Existing provider, storage and adjustment defaults remain unchanged. New interfaces are opt-in; Zipline is required only in the optional conversion environment, never for native snapshots. Shared declarations use Specs and the canonical explicit calendar > feed metadata > NYSE precedence; explicit
Nonedisables calendars and24/7remains scheduled.Unknown publication times, quote currency, merger consideration and original listing endpoints are not invented. Source history factors retain their own method. Data prepares inputs, not runtime history, analytical cleaning or broker/account execution. A snapshot hash identifies bytes and declarations, not financial equivalence or authentication.
Verification
Final reviewed head:
f14de81177a407969a3ec2ede5923035bf5f91bd.50bbcf5(two failures). The final head passes all 39 focused cases, retaining default NYSE, metadata-only null/24/7 and explicit overrides through shared versioned FeedSpec declarations. Unclocked reference tables remain unclocked.d176600for an incompatible target scale while configured precision passes. The final installed route passes all 13 real standard bundle producer/export/native-factor/re-ingestion cases, including empty selection, stock-dividend recipient identities, daily/minute arrays and dated futures. Interrupted data-flush publication also has failing-base/passing-fix evidence.Qualified Data
0.2.2.dev30+gf14de8117, Specs0.2.0, Python3.12. Native latest uses pandas3.0.6/Polars2.0.0; selected floors use pandas2.3.3/Polars1.36.1/pandas-market-calendars5.4.0. Optional Zipline Reloaded3.2.0is pinned tocf649ac06fddce76f6caa2403cd8494ac84f72ad; Engineer toc69e7badaac012ad98b1c4b8aa9a67a952b08f5c, Diagnostic0.1.9, Backtest to12a2c483f8f1fda54244af187db8bf44e6f85fc9. Upstream deprecations remain visible; ResourceWarnings are errors.Wheel SHA256:
e95ed397a1b3a3580b2b6e013cee20418c045c4750a3b1c2e785226300a6b2bc.Source-distribution SHA256:
ae06fdedf276bac0dd19090d7e4082648794f60f4a15e7eeb48053adac25211e.AI assistance
Codex assisted with implementation, tests, documentation and evidence review. This submission has been substantively reviewed against its public contracts and independently expected values; it is not an import-only parity claim.
Documentation and release
Existing guides are preserved and extended with runnable migration steps, input requirements and ownership/qualification limits. This is unreleased source work. No release, tag, package publication, documentation deployment or announcement is part of this PR; published Data
0.2.1remains immutable.