-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add SOXL/TQQQ clean-cutover snapshots #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$vocabulary": {"https://json-schema.org/draft/2020-12/vocab/format-assertion": true}, | ||
| "$id": "https://quantstrategylab.github.io/schemas/soxl_tqqq_clean_cutover_snapshot.v1.schema.json", | ||
| "title": "Offline SOXL/TQQQ clean-cutover snapshot manifest", | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "schema", "pair_id", "symbols", "payload_sha256", "calendar_sha256", "timezone", "coverage", | ||
| "adjustment_semantics", "evidence_generation", "plugin", "offline_fixture", "source_identity", | ||
| "producer_identity", "producer_contract_version", "materialized_at", "materialization_receipt", "compatibility", "size" | ||
| ], | ||
| "properties": { | ||
| "schema": {"const": "soxl_tqqq_clean_cutover_snapshot.v1"}, | ||
| "pair_id": {"enum": ["QQQ_TQQQ", "SOXX_SOXL"]}, | ||
| "symbols": {"type": "array", "items": {"type": "string"}, "minItems": 2, "maxItems": 2, "uniqueItems": true}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a downstream consumer validates a manifest only against this new schema, Useful? React with 👍 / 👎. |
||
| "payload_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, | ||
| "calendar_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, | ||
| "timezone": {"const": "America/New_York"}, | ||
| "coverage": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["first_available_session", "last_available_session", "completed_sessions", "row_count", "per_symbol_counts"], | ||
| "properties": { | ||
| "first_available_session": {"type": "string", "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"}, | ||
| "last_available_session": {"type": "string", "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"}, | ||
| "completed_sessions": {"type": "array", "items": {"type": "string", "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"}, "minItems": 1, "uniqueItems": true}, | ||
| "row_count": {"type": "integer", "minimum": 2}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For either supported pair, every completed session contains exactly two symbols, but this schema accepts an odd Useful? React with 👍 / 👎. |
||
| "per_symbol_counts": {"type": "object", "additionalProperties": {"type": "integer", "minimum": 1}} | ||
| } | ||
| }, | ||
| "adjustment_semantics": {"const": "adjusted_close"}, | ||
| "evidence_generation": {"const": "clean_cutover_v1"}, | ||
| "plugin": {"const": "ABSENT_DISABLED"}, | ||
| "offline_fixture": {"const": true}, | ||
| "source_identity": {"type": "string", "minLength": 1}, | ||
| "producer_identity": {"type": "string", "minLength": 1}, | ||
| "producer_contract_version": {"const": "soxl_tqqq_clean_cutover_snapshot.materializer.v1"}, | ||
| "materialized_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"}, | ||
| "materialization_receipt": {"const": "offline_fixture"}, | ||
| "compatibility": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["legacy_read", "legacy_write", "dual_read", "auto_migration", "fallback", "side_by_side_namespace"], | ||
| "properties": { | ||
| "legacy_read": {"const": "historical_read_only"}, | ||
| "legacy_write": {"const": "forbidden"}, | ||
| "dual_read": {"const": "forbidden"}, | ||
| "auto_migration": {"const": "forbidden"}, | ||
| "fallback": {"const": "forbidden"}, | ||
| "side_by_side_namespace": {"const": "required_new_namespace"} | ||
| } | ||
| }, | ||
| "size": {"const": 0} | ||
| }, | ||
| "allOf": [ | ||
| { | ||
| "if": {"properties": {"pair_id": {"const": "QQQ_TQQQ"}}, "required": ["pair_id"]}, | ||
| "then": { | ||
| "properties": { | ||
| "symbols": {"const": ["QQQ", "TQQQ"]}, | ||
| "coverage": { | ||
| "properties": { | ||
| "per_symbol_counts": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["QQQ", "TQQQ"], | ||
| "properties": { | ||
| "QQQ": {"type": "integer", "minimum": 1}, | ||
| "TQQQ": {"type": "integer", "minimum": 1} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "if": {"properties": {"pair_id": {"const": "SOXX_SOXL"}}, "required": ["pair_id"]}, | ||
| "then": { | ||
| "properties": { | ||
| "symbols": {"const": ["SOXX", "SOXL"]}, | ||
| "coverage": { | ||
| "properties": { | ||
| "per_symbol_counts": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["SOXX", "SOXL"], | ||
| "properties": { | ||
| "SOXX": {"type": "integer", "minimum": 1}, | ||
| "SOXL": {"type": "integer", "minimum": 1} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a downstream consumer uses an ordinary Draft 2020-12 validator without separately installing and enabling a format checker,
formatremains annotation-only because$schemaselects the standard meta-schema; declaring$vocabularyin this instance schema does not activate assertion behavior. Dates such as2026-02-30therefore satisfy the regex and pass schema validation, while the test masks this by explicitly supplyingFORMAT_CHECKER; select a meta-schema that declares the assertion vocabulary or otherwise make the validator requirement enforceable.Useful? React with 👍 / 👎.