Consume the immutable INT03 legacy market manifest - #87
Merged
Conversation
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 #86.
What changed
market-loader/1.0.0adapter that validates the exact Developmentmarket-bars/1manifest shape and recomputes its original producer hash.market-data.v1path unchanged; only an explicitmarket-bars/1manifest can select the legacy adapter.provider_version_id, and read every object with the exact S3VersionId.Root cause
Development contains one immutable adjusted January 2024 publication produced by the legacy loader. The worker reconstructed it as the canonical manifest shape, recomputed the wrong hash formula, discarded the S3 VersionIds, and only permitted quarter-aligned policy windows. As a result, no policy could truthfully bind the existing dataset and a replay could not prove it read the locked object versions.
Safety
The legacy route is fail-closed and recognizes only
market-bars/1, Alpaca SIP adjusted data, the loader's exact object-key grammar, a complete shard set, immutable S3 version evidence, and the original dataset hash. Any mutation in row count, shard binding, object kind, data layer, bucket, version, bytes, or Parquet metadata is rejected. The current canonical validator is still used for every non-legacy schema.Validation
ruff check src tests: passedmypy: passedpip-audit --progress-spinner off --desc: no known vulnerabilitiesgit diff --check: passedNo Development database write, S3 write, run creation, queue operation, worker restart, ASG change, root pointer change, or deployment was performed by this PR.
Related root tracking: Idea2Strategy/Idea2Strategy#471.