signal_aggregator + chart_patterns: drop dead parameters and shadowed literals (no behaviour change)

- analyze_pair(context=...): no caller ever supplied it (main, telegram_bot,
  pair_signals, tests), so the value was always None; the parameter and the
  pass-through to analyze_from_dataframes go (analyze_from_dataframes keeps
  its own context parameter).
- The three specific "SELL FILTER: quality|volatility|regime" stale-prefix
  entries were shadowed by the general "SELL FILTER: " entry in the same
  startswith() tuple; every emitter carries the general prefix.
- chart_patterns: the detectors never read the Open series, so the `o`
  parameter is dropped from the three detectors, the PATTERN_DETECTORS
  lambdas and the dispatcher.
- Corrected the pb_funnel/cp_funnel comment: nothing reads those counters
  (the "read by backtest tooling" claim was stale); they stay as cheap
  diagnostics.

Parity: 12-month M5 and H1 books regenerated byte-identical
(md5 a28fed4becd056466c26d6a947e1a0e5 / d20405ef64f069770c258bb9bed1ac90).
Suite: 461 passed, 0 failed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0156YhogLytzj9P2iH1skGbL
This commit is contained in:
Harwinder Sekhon
2026-09-06 16:55:26 -04:00
parent 9c2ea41f3d
commit 0577c4ecd8
2 changed files with 13 additions and 18 deletions
+3 -7
View File
@@ -150,8 +150,9 @@ class SignalReport:
class SignalAggregator:
"""Master aggregator for live signal analysis."""
# Diagnostic funnel for the M5 pullback route (shared across
# instances; read by backtest tooling, harmless in live use).
# Diagnostic rejection counters for the M5 pullback route (class-level,
# shared across instances). Nothing in the repo reads them; they are
# cheap and kept for ad-hoc inspection from a REPL.
pb_funnel: Dict[str, int] = {}
# Same, for the chart-pattern route (XAU_CP).
cp_funnel: Dict[str, int] = {}
@@ -172,7 +173,6 @@ class SignalAggregator:
def analyze_pair(
self,
symbol: Optional[str] = None,
context: Optional[FundamentalContext] = None,
log_source: Optional[str] = None,
) -> SignalReport:
"""Live-mode entry: fetch all needed timeframes then delegate.
@@ -244,7 +244,6 @@ class SignalAggregator:
report = self.analyze_from_dataframes(
symbol=symbol,
dfs=dfs,
context=context,
use_news=True,
)
@@ -919,9 +918,6 @@ class SignalAggregator:
"EXHAUSTION BLOCK",
"EXHAUSTED TREND FILTER:",
"MTF OPPOSITION:",
"SELL FILTER: quality",
"SELL FILTER: volatility",
"SELL FILTER: regime",
"SELL FILTER: ",
"M5 FILTER: |score|",
"M5 FILTER: no MTF agreement",