Potential orphaned risk engine implementation
While reviewing the risk-analysis code paths, I noticed that backend/risk_engine.py appears to be disconnected from the current production implementation.
Findings
1. No production references
I searched the repository for references to risk_engine and found only a single import in:
backend/tests/test_risk_engine.py
I found no references in:
backend/app.py
backend/conjunction_service.py
backend/analytics_service.py
backend/tle_parser.py
- GitHub Actions workflows
- Docker / Render deployment configuration
- README or CHANGELOG documentation
2. Duplicated helper implementations
Several utility functions appear to duplicate implementations already present in backend/app.py, including:
This means similar logic currently exists in multiple locations.
3. Separate production risk pipelines
The logic in risk_engine.py appears independent from the active production paths:
- Individual object risk scoring is performed through
calculate_risk_score(...) in app.py.
- Conjunction screening is performed through
conjunction_service.py.
As a result, modifying risk_engine.py does not appear to affect production behavior.
Potential Impact
The presence of a standalone risk engine that is only referenced by tests may create confusion for future contributors, who may reasonably expect changes to this module to affect live risk calculations.
Question
Is risk_engine.py intentionally retained for future work, or has it become orphaned after the risk and conjunction logic was migrated elsewhere?
If it is no longer part of the active architecture, it may be worth consolidating or removing to reduce maintenance overhead and contributor confusion.
Potential orphaned risk engine implementation
While reviewing the risk-analysis code paths, I noticed that
backend/risk_engine.pyappears to be disconnected from the current production implementation.Findings
1. No production references
I searched the repository for references to
risk_engineand found only a single import in:backend/tests/test_risk_engine.pyI found no references in:
backend/app.pybackend/conjunction_service.pybackend/analytics_service.pybackend/tle_parser.py2. Duplicated helper implementations
Several utility functions appear to duplicate implementations already present in
backend/app.py, including:safe_floatget_firstThis means similar logic currently exists in multiple locations.
3. Separate production risk pipelines
The logic in
risk_engine.pyappears independent from the active production paths:calculate_risk_score(...)inapp.py.conjunction_service.py.As a result, modifying
risk_engine.pydoes not appear to affect production behavior.Potential Impact
The presence of a standalone risk engine that is only referenced by tests may create confusion for future contributors, who may reasonably expect changes to this module to affect live risk calculations.
Question
Is
risk_engine.pyintentionally retained for future work, or has it become orphaned after the risk and conjunction logic was migrated elsewhere?If it is no longer part of the active architecture, it may be worth consolidating or removing to reduce maintenance overhead and contributor confusion.