feat: Add warning for unconfigured risk management policies in StartupValidator

This commit is contained in:
2025-11-11 13:44:46 +01:00
parent 8b3d2224a2
commit 4d9ad85682

View File

@@ -244,14 +244,15 @@ export class StartupValidator {
// Risk management validation
if (config.riskManagement?.enabled === true) {
if (config.riskManagement.stopOnCritical === true) {
// If risk management is enabled, notify the user to ensure policies are configured.
// This avoids an empty-block lint/compile error and provides actionable guidance.
this.addWarning(
'config',
'Risk management will stop execution if critical risk is detected',
'Bot will halt all accounts if risk score becomes too high'
'riskManagement',
'Risk management is enabled but no specific policies were validated here',
'Review and configure riskManagement settings (throttles, maxRestarts, detection thresholds)',
'docs/config.md'
)
}
}
// Search delays validation
const minDelay = typeof config.searchSettings.searchDelay.min === 'string'