@@ -243,6 +243,13 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
243243 actual : typeof config . turnProtection . turns ,
244244 } )
245245 }
246+ if ( typeof config . turnProtection . turns === "number" && config . turnProtection . turns < 1 ) {
247+ errors . push ( {
248+ key : "turnProtection.turns" ,
249+ expected : "positive number (>= 1)" ,
250+ actual : `${ config . turnProtection . turns } ` ,
251+ } )
252+ }
246253 }
247254
248255 // Commands validator
@@ -326,6 +333,16 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
326333 actual : typeof tools . settings . nudgeFrequency ,
327334 } )
328335 }
336+ if (
337+ typeof tools . settings . nudgeFrequency === "number" &&
338+ tools . settings . nudgeFrequency < 1
339+ ) {
340+ errors . push ( {
341+ key : "tools.settings.nudgeFrequency" ,
342+ expected : "positive number (>= 1)" ,
343+ actual : `${ tools . settings . nudgeFrequency } (will be clamped to 1)` ,
344+ } )
345+ }
329346 if (
330347 tools . settings . protectedTools !== undefined &&
331348 ! Array . isArray ( tools . settings . protectedTools )
@@ -497,6 +514,17 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
497514 actual : typeof strategies . purgeErrors . turns ,
498515 } )
499516 }
517+ // Warn if turns is 0 or negative - will be clamped to 1
518+ if (
519+ typeof strategies . purgeErrors . turns === "number" &&
520+ strategies . purgeErrors . turns < 1
521+ ) {
522+ errors . push ( {
523+ key : "strategies.purgeErrors.turns" ,
524+ expected : "positive number (>= 1)" ,
525+ actual : `${ strategies . purgeErrors . turns } (will be clamped to 1)` ,
526+ } )
527+ }
500528 if (
501529 strategies . purgeErrors . protectedTools !== undefined &&
502530 ! Array . isArray ( strategies . purgeErrors . protectedTools )
0 commit comments