Skip to content

chore(canonical-key): retire legacy {date}.parquet/{date}.json fallback shims (ROADMAP L178)#271

Merged
cipher813 merged 1 commit into
mainfrom
chore/retire-canonical-key-fallback
May 19, 2026
Merged

chore(canonical-key): retire legacy {date}.parquet/{date}.json fallback shims (ROADMAP L178)#271
cipher813 merged 1 commit into
mainfrom
chore/retire-canonical-key-fallback

Conversation

@cipher813
Copy link
Copy Markdown
Owner

ROADMAP: L178 — Retire canonical-key backward-compat shims (Wave-1 cleanup, P2)

Gate fired 2026-05-18. Per the 2026-05-16 close-out DECISION, the weekend Saturday SF completed for gating purposes. Canonical latest.json sidecars produced on 2026-05-16 ~08:17–08:20 UTC for all three Wave-1 substrates (news_aggregates / analyst_revisions / insider_transactions). Zero legacy log emissions in the research-runner Lambda over the last 7 days.

Removed

  • data/derived/news_aggregates.py::read_news_aggregates_parquet — legacy {aggregate_date}.parquet fallback branch + now-unused aggregate_date kwarg.
  • data/snapshotter/analyst_daily.py::read_snapshot_document — legacy {ticker}/{date}.json fallback.
  • data/snapshotter/analyst_daily.py::s3_key_for — dead helper (zero callers in or outside this repo; docstring lied — returned legacy shape labeled "Canonical").
  • data/derived/analyst_revisions.py::load_snapshot_time_series — "Tolerates the legacy {ticker}/{date}.json shape" docstring claim (code body is shape-agnostic — indexes by snapshot_date parsed from JSON body).

Added

  • 2 regression-guard tests pinning canonical-only behavior:
    • test_legacy_date_keyed_parquet_is_ignored — plants {prefix}/{date}.parquet with no latest.json sidecar; asserts the reader returns empty.
    • test_legacy_date_keyed_json_is_ignored — plants {prefix}/{ticker}/YYYY-MM-DD.json (pre-migration shape); asserts read_snapshot_document returns None.

Cross-repo blast radius

$ for repo in research predictor backtester dashboard alpha-engine; do
    cd ~/Development/alpha-engine-${repo} && git grep -n read_news_aggregates_parquet load_snapshot_time_series read_snapshot_document s3_key_for
  done

Zero hits. No external consumer touches these functions — the research substrate reader (data/substrate/reader.py) does its own S3 I/O.

Tests

Suite 1389 passed (+2 regression guards), 1 skipped, 7 unrelated FutureWarnings.

Composes with

🤖 Generated with Claude Code

…ck shims (ROADMAP L178)

Wave-1 canonical-shape gate fired 2026-05-18: `latest.json` sidecars
produced for all three substrates on 2026-05-16 (~08:17–08:20 UTC); zero
`legacy` log emissions in the research-runner Lambda over the last 7 days.
Safe to drop the fallback branches.

Removed:
- `read_news_aggregates_parquet` legacy date-key fallback branch + the
  now-unused `aggregate_date` param.
- `read_snapshot_document` legacy `{ticker}/{date}.json` fallback.
- `s3_key_for` dead helper (zero callers in or outside this repo; its
  docstring lied — returned legacy shape labeled 'Canonical').
- "Tolerates the legacy {ticker}/{date}.json shape" docstring claim on
  `load_snapshot_time_series` (code body was already shape-agnostic —
  reads by snapshot_date field inside the JSON body).

Added:
- 2 regression-guard tests pinning canonical-only behavior:
  `test_legacy_date_keyed_parquet_is_ignored` (news_aggregates) and
  `test_legacy_date_keyed_json_is_ignored` (analyst_substrate).

Suite: 1389 passed (+2), 1 skipped.

Cross-repo blast radius verified zero: no caller of the three readers
outside this repo, and no caller of `s3_key_for` anywhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 121b7c7 into main May 19, 2026
1 check passed
@cipher813 cipher813 deleted the chore/retire-canonical-key-fallback branch May 19, 2026 22:56
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.

1 participant