Files
momentum-system/plans/002-deletions.log
T
momentum devandClaude Fable 5 af8137dfd7 delete: dead DDL (10 tables), dead projections, pinned dead code; README/pyproject prune
pg_schema.sql: drop CREATE TABLE for 10 zero-reference tables (operator DROP
list in plans/002-deletions.log — production tables untouched until run).
projections.py: remove 4 zero-consumer query functions.
Clear all 'plan 002' ruff pins from the CI gate (files now F-clean);
api/main.py:F821 pin remains for plan 007. README repo-map/test-count fixed;
pydantic-settings removed (zero imports). Full receipts: plans/002-deletions.log

Suite: 351 passed (16 schwab/dead-module tests removed), 15 failures = the
known WSL-loopback dashboard set only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 21:09:35 -04:00

48 lines
3.6 KiB
Plaintext

# Plan 002 deletions log — 2026-07-13, branch milestone-2026-07
Every deletion was grep-gated: `grep -rn "<name>" --include="*.py" --include="*.yml" --include="*.sh"` excluding the target itself, plans/, docs/. "clear" = zero live references.
## Deleted (grep receipts)
- schwab/ (23 tracked files) — clear (README prose + .env.example keys only; both cleaned). Commit message of d54a2a9 claimed this deletion; it never happened.
- tests/unit/schwab/ — tests of the deleted module.
- milestone3_verify.py — schwab-only walk-through; clear.
- comprehensive_backtest.py — crashes on import (research/connection.py absent); clear.
- strategy/universe.py + UniverseConfig — clear.
- strategy/backtest/outcomes.py (+ its exports in strategy/backtest/__init__.py) — clear.
- detect_momentum_ignition in strategy/evaluation/ignition.py — clear; **kept `_last_higher_low`** (imported by runner.py:33, premarket_setup.py:32, liquid_breakout.py:44). tests/unit/test_ignition.py trimmed to the kept helper.
- grafana/ (standalone stack) — pointed at decommissioned pre-migration DB. **Provisioning dashboards MOVED** to deploy/compose/grafana/dashboards/ and docker-compose.yml bind-mount re-pointed (the in-compose grafana service keeps working). SECURITY NOTE: the deleted datasource YAML carried committed dev Postgres credentials (values not reproduced here); they remain in git history — rotate that DB user's password if the old 5432 instance still runs.
- telemetry/ — contained only stale __pycache__ (untracked); removed from disk.
- .github/workflows/docker-publish.yml — fired on nonexistent `main` + stale artifact branch; pushed wrong image name (momentum-system).
- uv.lock — DuckDB-era lockfile; requirements.txt is the real manifest.
- SCHWAB_* keys from .env.example.
- pydantic-settings from pyproject.toml — zero imports repo-wide.
- Dead intra-file code (the CI ruff pins annotated "plan 002", all removed and pins dropped from docker.yml): unused imports in research/gapper_history.py, storage/event_store.py, strategy/evaluation/structure.py; empty f-string + dead `orb` query in research/labeler.py; dead `closes` assignment in structure.py.
## Dead DDL removed from storage/pg_schema.sql (10 tables, zero code references)
backtest_runs, halt_events, market_context, paper_missed_trades, paper_sessions,
short_interest, simulated_fills, simulated_orders, strategy_runs, telemetry_events
## Dead projections removed from storage/projections.py (zero consumers)
query_event_timeline, query_positions_view, query_settings_snapshot, query_symbol_status
(private helpers _evt_window/_hist_window/_latest_event_payload/_state_until/_sum_position_unrealized all have internal callers — kept)
## Kept (grep hit live code, or disposition elsewhere)
- strategy/evaluation/ignition.py `_last_higher_low` — live (3 importers).
- quote_snapshots, float_cache — created by CODE (run_live_paper.py, research/ingestion/float_cache.py), no pg_schema DDL to remove; write-only today; disposition in plan 006.
- dilution_events — pg_schema DDL kept; disposition in plan 006.
## FOR THE OPERATOR — run only after plan 001's backup exists + one session soak
```sql
DROP TABLE IF EXISTS backtest_runs;
DROP TABLE IF EXISTS halt_events;
DROP TABLE IF EXISTS market_context;
DROP TABLE IF EXISTS paper_missed_trades;
DROP TABLE IF EXISTS paper_sessions;
DROP TABLE IF EXISTS short_interest;
DROP TABLE IF EXISTS simulated_fills;
DROP TABLE IF EXISTS simulated_orders;
DROP TABLE IF EXISTS strategy_runs;
DROP TABLE IF EXISTS telemetry_events;
```
These were removed from pg_schema.sql only; the production database still holds the (empty/stale) tables until you run the DROPs.