From 107c5db52ef136f4e2283ea4be73007278bce10e Mon Sep 17 00:00:00 2001 From: LightZirconite Date: Wed, 5 Nov 2025 22:04:16 +0100 Subject: [PATCH] Improved start validation: replace warnings with informational messages for TOTP users and clarify the intended behavior of passesPerRun. --- src/util/StartupValidator.ts | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/util/StartupValidator.ts b/src/util/StartupValidator.ts index 20e2752..55eaa37 100644 --- a/src/util/StartupValidator.ts +++ b/src/util/StartupValidator.ts @@ -317,13 +317,11 @@ export class StartupValidator { ) } - // Time sync warning for TOTP users + // Time sync info for TOTP users (informational, not a problem) if (process.platform === 'linux') { - this.addWarning( - 'environment', - 'Linux detected: Ensure system time is synchronized', - 'Run: sudo timedatectl set-ntp true (required for TOTP to work correctly)' - ) + // This is just informational - not displayed as warning + log('main', 'VALIDATION', '💡 Linux detected: Ensure system time is synchronized for TOTP') + log('main', 'VALIDATION', ' Suggestion: Run: sudo timedatectl set-ntp true (required for TOTP to work correctly)') } } @@ -509,12 +507,10 @@ export class StartupValidator { } 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' - ) + // This is intentional behavior confirmation, not a warning + log('main', 'VALIDATION', `✓ [OK] passesPerRun = ${passes}: Job-state skip is disabled (intentional)`) + log('main', 'VALIDATION', ' Suggestion: All accounts will run on every pass, even if already completed. This is intentional for multiple passes.') + log('main', 'VALIDATION', ' Docs: docs/jobstate.md') } // Validate clusters @@ -739,16 +735,18 @@ export class StartupValidator { if (this.errors.length === 0 && this.warnings.length === 0) { log('main', 'VALIDATION', chalk.green('✅ All validation checks passed!')) } else { - log('main', 'VALIDATION', `Found: ${this.errors.length} error(s) | ${this.warnings.length} warning(s)`) + const errorLabel = this.errors.length === 1 ? 'error' : 'errors' + const warningLabel = this.warnings.length === 1 ? 'warning' : 'warnings' + log('main', 'VALIDATION', `[${this.errors.length > 0 ? 'ERROR' : 'OK'}] Found: ${this.errors.length} ${errorLabel} | ${this.warnings.length} ${warningLabel}`) if (this.errors.length > 0) { log('main', 'VALIDATION', 'Bot will continue, but issues may cause failures', 'warn') - } else { + log('main', 'VALIDATION', 'Full documentation: docs/index.md') + await new Promise(resolve => setTimeout(resolve, 3000)) + } else if (this.warnings.length > 0) { log('main', 'VALIDATION', 'Warnings detected - review recommended', 'warn') + await new Promise(resolve => setTimeout(resolve, 2000)) } - - log('main', 'VALIDATION', 'Full documentation: docs/index.md') - await new Promise(resolve => setTimeout(resolve, 3000)) } } }