docs: consolidation plan (scope-only, from read-only mapping workflow)

Prioritized P0->P2 plan to make the system cleaner + easier to troubleshoot,
produced by a 4-agent read-only mapping pass (no code changed). Key findings:

- Single-Postgres migration is FUNCTIONALLY COMPLETE at the connection layer
  (all live code -> storage/db.py -> db_pg -> one DATABASE_URL Postgres; no
  live duckdb.connect). Datastore work is cleanup, not architecture.
- The real architectural item is the TWO entry paths. The live (auto) path is
  missing five fast-path-only gates: extension, day-extension, halt-guard,
  liquidity-sizing, rank — a REAL current gap (47/47 of today's fills were
  approved_by="auto"). Root cause: the ready-signal snapshot carries no live
  price/day_open/volume/rank. Fix sequenced behind a flag, reversibly.
- Dead-code/cleanup: core/ + telemetry/ packages (zero callers), archive/ tree
  + 232MB zip (gitignored), dead schwab/ integration, an orphaned mem_ test
  schema left in prod Postgres.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
momentum devandClaude Opus 4.8 committed 2026-06-23 16:38:54 -04:00
1 parent 59e296a736
commit fb3f771935
2 files changed
+188 -9

No files matched your search

+11 -9
View File
@@ -802,17 +802,19 @@ def main(argv: list[str] | None = None) -> int:
if client else None
)
print(f"[boot] exit management: {exit_cfg.describe()}")
print(
f"[boot] entry gates: VWAP {'ENFORCED' if exec_settings.require_above_vwap else 'shadow-only'}"
f", daily-cap {exec_settings.max_fresh_entries_per_day or 'off'}"
f", risk-cap ${exec_settings.max_risk_dollars:.0f}"
)
if exec_settings.concentrate_top_n > 0:
_es = rt["execution"].settings if rt["execution"] is not None else None
if _es is not None:
print(
"[boot] WARNING: TRADING_CONCENTRATE_TOP_N>0, but rank-concentration is "
"enforced ONLY on the dead fast-trigger path, NOT the live auto-approval "
"path — it will not affect live entries (see entry-path-fast-vs-auto)."
f"[boot] entry gates: VWAP {'ENFORCED' if _es.require_above_vwap else 'shadow-only'}"
f", daily-cap {_es.max_fresh_entries_per_day or 'off'}"
f", risk-cap ${_es.max_risk_dollars:.0f}"
)
if _es.concentrate_top_n > 0:
print(
"[boot] WARNING: TRADING_CONCENTRATE_TOP_N>0, but rank-concentration is "
"enforced ONLY on the dead fast-trigger path, NOT the live auto-approval "
"path — it will not affect live entries (see entry-path-fast-vs-auto)."
)
# Telegram push alerts — gated, decoupled (polls the event store), and
# fire-and-forget so it can never impede trading.