Skip to content

PR4 (data, DRAFT): delete slim writer + load_slim_cache API + fallbacks [merge-gated 5/23]#269

Draft
cipher813 wants to merge 1 commit into
mainfrom
chore/wave4-delete-slim-tier
Draft

PR4 (data, DRAFT): delete slim writer + load_slim_cache API + fallbacks [merge-gated 5/23]#269
cipher813 wants to merge 1 commit into
mainfrom
chore/wave4-delete-slim-tier

Conversation

@cipher813
Copy link
Copy Markdown
Owner

DRAFT — merge-gated on the 2026-05-23 Saturday-SF parity read. Terminal PR of the Wave-4 predictor/price_cache_slim/ deletion arc (data side).

Why draft / why gated

The migrated consumers (PR1a #267, PR1b #268, PR2 #226 — all merged) still run with slim + emit WAVE4_PARITY_METRIC until this merges. The slim writer must keep running through the 5/23 Saturday-SF so those parity streams produce the evidence. Merging this before 5/23 would delete the writer and the data-driven-cutover rationale in one stroke. So: code staged now, merge gated on reading one clean parity result (see WAVE4_SLIM_DELETION_RUNBOOK.md).

Code removed

  • collectors/slim_cache.py — the 2y-slice writer — deleted.
  • weekly_collector.py — slim import + # 3. Slim cache collect block + --only slim choice + docstrings.
  • store/parquet_loader.pyload_slim_cache + SLIM_CACHE_PREFIX + now-unused ThreadPoolExecutor. load_parquet_from_s3 kept — it's re-exported via features.compute._load_parquet_from_s3 and consumed by builders/backfill.py; my within-file grep missed that, the full suite caught it (import regression found + fixed before push — the audit-before-shipping discipline working as intended).
  • collectors/macro._load_breadth_prices → ArcticDB-only. No-null breadth contract preserved (None → key omitted) on ArcticDB failure, matching pre-Wave-4 single-source-unavailable behaviour.
  • features/compute._load_price_source → ArcticDB-only (universe + macro libs). No-data contract preserved.

Tests

  • test_macro_breadth / test_compute_price_source reworked to the ArcticDB-only terminal state (slim-fallback/parity tests retired).
  • test_wave4_slim_arctic_parity.py repurposed from migration scaffolding into a permanent regression guard: the functional slim surface (writer/loader def, call, or import) must never return. lib's own test_reconcile/test_arcticdb still cover the substrate.
  • Full data suite 1375 passing.

Runbook (not executed)

WAVE4_SLIM_DELETION_RUNBOOK.md — the gated, manual S3 prefix deletion: pre-deletion byte-equal backup (Wave-5 precedent) → aws s3 rm → verify-empty, with the explicit pass/stop gate criteria and rollback. Not run by CI or this PR.

Remaining Wave-4 (small, after this)

  • PR4-backtester: remove the slim leg from exit_timing._load_price_cache + delete the verified-dead spot_backtest.sh:528 slim sync (line 527 sector_map.json untouched — Wave-3 scope).
  • PR4-dashboard / cosmetic: the 2 deferred architecture-page slim labels + comment-only mentions in backfill.py/price_validator.py.

Audit trail: every PR in this arc was audit-first; this one's audit caught the _load_parquet_from_s3 cross-module re-export before it shipped.

🤖 Generated with Claude Code

…lbacks

PR4 (data) of the predictor/price_cache_slim deletion arc — TERMINAL
state. Staged as DRAFT: the slim writer must keep running through the
5/23 Saturday-SF so the WAVE4_PARITY_METRIC streams emit; merge is
gated on that parity read (see WAVE4_SLIM_DELETION_RUNBOOK.md).

Code removed:
- collectors/slim_cache.py (the 2y-slice writer) — deleted.
- weekly_collector.py — slim_cache import + the '# 3. Slim cache'
  collect block + the --only 'slim' choice + docstrings.
- store/parquet_loader.py — load_slim_cache + SLIM_CACHE_PREFIX +
  now-unused ThreadPoolExecutor import. load_parquet_from_s3 KEPT
  (re-exported via features.compute._load_parquet_from_s3, consumed by
  builders/backfill.py — caught by the suite, not the within-file grep).
- collectors/macro._load_breadth_prices — ArcticDB-only (slim fallback
  + parity dual-read removed); preserves the no-null breadth contract
  (None -> key omitted) on ArcticDB failure, matching pre-Wave-4
  single-source-unavailable behaviour.
- features/compute._load_price_source — ArcticDB-only (universe +
  macro libs); slim fallback + parity removed; no-data contract
  preserved.

Tests reworked to the ArcticDB-only terminal state; the PR0b
parity-harness/consumer-lock file is repurposed into a permanent
regression guard (slim functional surface must never return — lib's
own test_reconcile/test_arcticdb still cover the substrate). Full data
suite 1375 passing.

Added WAVE4_SLIM_DELETION_RUNBOOK.md — the gated, manual S3 prefix
deletion (byte-equal backup -> aws s3 rm, Wave-5 precedent). NOT
executed by CI or this PR.

DRAFT until 2026-05-23 Saturday-SF parity confirms slim<->ArcticDB
equivalence across breadth/compute/exit_timing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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