@@ -122,6 +122,12 @@ pub struct NightwatchConfig {
122122 /// Drift percentage threshold for Critical correction.
123123 #[ serde( default = "default_critical_threshold" ) ]
124124 pub critical_threshold : f64 ,
125+ /// Hour (0-23) when nightwatch evaluation starts. Default: 0 (midnight).
126+ #[ serde( default ) ]
127+ pub active_start_hour : u8 ,
128+ /// Hour (0-23) when nightwatch evaluation ends. Default: 24 (always active).
129+ #[ serde( default = "default_active_end_hour" ) ]
130+ pub active_end_hour : u8 ,
125131}
126132
127133impl Default for NightwatchConfig {
@@ -132,6 +138,8 @@ impl Default for NightwatchConfig {
132138 moderate_threshold : default_moderate_threshold ( ) ,
133139 severe_threshold : default_severe_threshold ( ) ,
134140 critical_threshold : default_critical_threshold ( ) ,
141+ active_start_hour : 0 ,
142+ active_end_hour : default_active_end_hour ( ) ,
135143 }
136144 }
137145}
@@ -151,6 +159,9 @@ fn default_severe_threshold() -> f64 {
151159fn default_critical_threshold ( ) -> f64 {
152160 0.70
153161}
162+ fn default_active_end_hour ( ) -> u8 {
163+ 24
164+ }
154165
155166/// Compound review settings.
156167#[ derive( Debug , Clone , Serialize , Deserialize ) ]
0 commit comments