chore: remove dead functions and write-only state (no behaviour change)
Zero callers anywhere (tests included), verified by grep/AST: - dashboard_publisher.DashboardPublisher.publish_all (run_cycle inlines both publishes) - signal_log.SignalLogger.advance_with_bars (the backfill script uses backfill_seeds / resolve_from_store / reseed_unresolvable) and the never-read SignalLogger.path property plus its write-only self._path - llm_client.reset_llm_client (tests reset the singleton by assignment) - market_outlook._last_run_ts, residue of the old "now - last < 3600" dedup; _last_run_hour (the UTC hour bucket) is the live key - news_engine FundamentalContext.event_impact_on_pairs: written once, read by nothing; its only feeder NewsEngine._get_affected_pairs and that helper's unit test go with it - position_sizing.LIVE_DEPTH_BARS (referenced only by its own docstring, which now states the depths inline), the unused Iterable import and the unused atr_ok parameter of _fill_geometry - analyze_signal_log: unused `field` import and the unused `rows` parameter of persona_scorecard / news_outcome_buckets (both read the DB directly) The two backfill/label scripts' --db help text now names the config.json setting it actually falls back to. Suite: 463 passed, 0 failed (one test removed with its subject). Claude-Session: https://claude.ai/code/session_0156YhogLytzj9P2iH1skGbL
This commit is contained in:
@@ -806,7 +806,6 @@ class SignalLogger:
|
||||
the daemon's thread pool."""
|
||||
|
||||
def __init__(self, path: str):
|
||||
self._path = path
|
||||
parent = os.path.dirname(path)
|
||||
if parent:
|
||||
os.makedirs(parent, exist_ok=True)
|
||||
@@ -860,10 +859,6 @@ class SignalLogger:
|
||||
raise
|
||||
time.sleep(delay * (attempt + 1))
|
||||
|
||||
@property
|
||||
def path(self) -> str:
|
||||
return self._path
|
||||
|
||||
def _migrate_signal_columns(self) -> None:
|
||||
"""Add newer signal columns to pre-existing tables (idempotent)."""
|
||||
existing = {r[1] for r in self._conn.execute("PRAGMA table_info(signals)")}
|
||||
@@ -1291,27 +1286,6 @@ class SignalLogger:
|
||||
rowid, exc_info=True)
|
||||
return written
|
||||
|
||||
def advance_with_bars(self, rowid: int, bars: Iterable[Dict[str, Any]],
|
||||
evidence: str = "external_bars") -> str:
|
||||
"""Advance ONE pending outcome from caller-supplied bars (backfill
|
||||
from provider history). Returns the resulting status."""
|
||||
with self._lock:
|
||||
row = self._conn.execute(
|
||||
"SELECT advisory_outcome_status, advisory_outcome_json"
|
||||
" FROM signals WHERE id=?", (rowid,)).fetchone()
|
||||
if row is None or row[0] != "PENDING" or not row[1]:
|
||||
return str(row[0]) if row else "MISSING"
|
||||
state = advance_outcome(json.loads(row[1]), list(bars))
|
||||
state["evidence"] = evidence
|
||||
status = state.get("status", "UNRESOLVABLE")
|
||||
self._conn.execute(
|
||||
"UPDATE signals SET advisory_outcome_status=?,"
|
||||
" advisory_r_multiple=?, advisory_outcome_json=?"
|
||||
" WHERE id=? AND advisory_outcome_status='PENDING'",
|
||||
(status, canonical_r(state), _dumps(state), rowid))
|
||||
self._conn.commit()
|
||||
return status
|
||||
|
||||
def backfill_seeds(self, limit: Optional[int] = None) -> Dict[str, int]:
|
||||
"""Assign setup_key / advisory_event_id to legacy setup rows and
|
||||
seed the canonical ones that carry no outcome yet. Existing
|
||||
|
||||
Reference in New Issue
Block a user