Improved execution configuration: updated passesPerRun to 3 and added validation of execution parameters

This commit is contained in:
2025-11-05 21:28:03 +01:00
parent 222e6fe4cf
commit dce1fcc193
3 changed files with 76 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ export class StartupValidator {
this.validateBrowserSettings(config)
this.validateNetworkSettings(config)
this.validateWorkerSettings(config)
this.validateExecutionSettings(config)
this.validateSearchSettings(config)
this.validateHumanizationSettings(config)
this.validateSecuritySettings(config)
@@ -484,6 +485,58 @@ export class StartupValidator {
}
}
private validateExecutionSettings(config: Config): void {
// Validate passesPerRun
const passes = config.passesPerRun ?? 1
if (passes < 1) {
this.addError(
'execution',
'passesPerRun must be at least 1',
'Set passesPerRun to 1 or higher in config.jsonc',
undefined,
true
)
}
if (passes > 5) {
this.addWarning(
'execution',
`passesPerRun is set to ${passes} (very high)`,
'Running multiple passes per day may trigger Microsoft detection. Recommended: 1-2 passes max',
'docs/config-reference.md'
)
}
if (passes > 1) {
this.addWarning(
'execution',
'passesPerRun > 1: Job-state skip is disabled',
'All accounts will run on every pass, even if already completed. This is intentional for multiple passes.',
'docs/jobstate.md'
)
}
// Validate clusters
if (config.clusters < 1) {
this.addError(
'execution',
'clusters must be at least 1',
'Set clusters to 1 or higher in config.jsonc',
undefined,
true
)
}
if (config.clusters > 10) {
this.addWarning(
'execution',
`clusters is set to ${config.clusters} (very high)`,
'Too many clusters may cause resource exhaustion. Recommended: 1-4 clusters'
)
}
}
private validateSearchSettings(config: Config): void {
const search = config.searchSettings