Skip to content

refactor(cleanup): remove dead code + no-op calibration dimension (P1.4, P1.6)#60

Merged
Jcstack merged 2 commits into
mainfrom
fix/p1-cleanup-deadcode-stubs
Jun 25, 2026
Merged

refactor(cleanup): remove dead code + no-op calibration dimension (P1.4, P1.6)#60
Jcstack merged 2 commits into
mainfrom
fix/p1-cleanup-deadcode-stubs

Conversation

@Jcstack

@Jcstack Jcstack commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Closes #50, closes #52.

#50 — dead code (all verified 0 production callers before removal)

  • src/quant/alternative_bars.py (+ test) — orphaned module.
  • RecStore.get_sector_win_rates — unused and buggy (GROUP BY style while the docstring claimed per-sector).
  • OvernightRiskProfile.to_context_str (+ test) — built but never called. (The live to_context_str on IntelChain, used by recommendation_service, is untouched.)
  • Deprecated PROFESSIONAL_ANALYSIS_FRAMEWORK / QUICK_ANALYSIS_FRAMEWORK prompt constants — superseded by the v7.0 seven-dimension framework.

#52 — stubs behind advertised features

  • ConfidenceCalibrator advertised a per-sector calibration dimension that always returned 0.0. Removed the dead dimension + method; kept the (now-reserved) sector param and documented it honestly. Behavior-preserving (it contributed exactly 0.0).
  • Made LiveBroker's simulation-only-by-design status explicit in its docstring + NotImplementedError messages.

Verified

ruff check + ruff format --check clean; import smoke + 366 related tests green (overnight-risk, recommendation, calibrator, broker, quant, prediction).

No behavior change. Simulation-only project; not investment advice.

Closes #50, #52 (P1.4, P1.6).

#50 dead code (verified 0 production callers):
- delete src/quant/alternative_bars.py (+ its test) — orphaned.
- delete RecStore.get_sector_win_rates — unused and buggy (GROUP BY style
  while the docstring/return claimed per-sector).
- delete OvernightRiskProfile.to_context_str (+ its test) — built but never
  called (the live to_context_str on IntelChain is unaffected).
- delete the DEPRECATED PROFESSIONAL_/QUICK_ANALYSIS_FRAMEWORK prompt
  constants — superseded by the v7.0 seven-dimension framework.

#52 stubs behind advertised features:
- ConfidenceCalibrator advertised a per-sector calibration dimension that
  always returned 0.0; remove the dead dimension and method, keep the
  (reserved) sector param, and document it honestly. Behavior-preserving
  (it contributed 0.0).
- make LiveBroker's simulation-only-by-design status explicit in its
  docstring and NotImplementedError messages.

ruff clean; affected suites (366 tests) green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Jcstack
Jcstack enabled auto-merge (squash) June 25, 2026 16:49
@Jcstack
Jcstack merged commit aa4725f into main Jun 25, 2026
6 checks passed
@Jcstack
Jcstack deleted the fix/p1-cleanup-deadcode-stubs branch June 25, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant