@@ -220,6 +220,13 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
220220 actual : typeof config . turnProtection . turns ,
221221 } )
222222 }
223+ if ( typeof config . turnProtection . turns === "number" && config . turnProtection . turns < 1 ) {
224+ errors . push ( {
225+ key : "turnProtection.turns" ,
226+ expected : "positive number (>= 1)" ,
227+ actual : `${ config . turnProtection . turns } ` ,
228+ } )
229+ }
223230 }
224231
225232 const commands = config . commands
@@ -292,6 +299,16 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
292299 } )
293300 }
294301
302+ if (
303+ typeof tools . settings . nudgeFrequency === "number" &&
304+ tools . settings . nudgeFrequency < 1
305+ ) {
306+ errors . push ( {
307+ key : "tools.settings.nudgeFrequency" ,
308+ expected : "positive number (>= 1)" ,
309+ actual : `${ tools . settings . nudgeFrequency } (will be clamped to 1)` ,
310+ } )
311+ }
295312 if (
296313 tools . settings . protectedTools !== undefined &&
297314 ! Array . isArray ( tools . settings . protectedTools )
@@ -433,7 +450,17 @@ export function validateConfigTypes(config: Record<string, any>): ValidationErro
433450 actual : typeof strategies . purgeErrors . turns ,
434451 } )
435452 }
436-
453+ // Warn if turns is 0 or negative - will be clamped to 1
454+ if (
455+ typeof strategies . purgeErrors . turns === "number" &&
456+ strategies . purgeErrors . turns < 1
457+ ) {
458+ errors . push ( {
459+ key : "strategies.purgeErrors.turns" ,
460+ expected : "positive number (>= 1)" ,
461+ actual : `${ strategies . purgeErrors . turns } (will be clamped to 1)` ,
462+ } )
463+ }
437464 if (
438465 strategies . purgeErrors . protectedTools !== undefined &&
439466 ! Array . isArray ( strategies . purgeErrors . protectedTools )
0 commit comments