@@ -144,6 +144,27 @@ func TestRuntimeConfigValidate(t *testing.T) {
144144 }).Validate (); err == nil {
145145 t .Fatal ("expected validation error for assets.max_session_assets_total_bytes=-1" )
146146 }
147+
148+ if err := (RuntimeConfig {
149+ MaxNoProgressStreak : 1 ,
150+ MaxRepeatCycleStreak : 1 ,
151+ MaxTurns : 1 ,
152+ Verification : VerificationConfig {
153+ DefaultTaskPolicy : "unknown" ,
154+ MaxNoProgress : 1 ,
155+ MaxRetries : 0 ,
156+ Verifiers : map [string ]VerifierConfig {
157+ "todo_convergence" : {FailOpen : true , FailClosed : true },
158+ },
159+ ExecutionPolicy : VerificationExecutionPolicyConfig {
160+ Mode : "non_interactive" ,
161+ DefaultTimeout : 1 ,
162+ DefaultOutputCap : 1 ,
163+ },
164+ },
165+ }).Validate (); err == nil {
166+ t .Fatal ("expected validation error for invalid verification config" )
167+ }
147168}
148169
149170func TestRuntimeAssetsConfigZeroValuesResolveToDefaults (t * testing.T ) {
@@ -171,3 +192,47 @@ func TestRuntimeAssetsConfigZeroValuesResolveToDefaults(t *testing.T) {
171192 )
172193 }
173194}
195+
196+ func TestRuntimeConfigVerificationDefaultsApplied (t * testing.T ) {
197+ t .Parallel ()
198+
199+ defaults := defaultRuntimeConfig ()
200+ cfg := RuntimeConfig {}
201+ cfg .ApplyDefaults (defaults )
202+ if ! cfg .Verification .EnabledValue () {
203+ t .Fatalf ("expected verification enabled by default" )
204+ }
205+ if ! cfg .Verification .FinalInterceptValue () {
206+ t .Fatalf ("expected verification final intercept enabled by default" )
207+ }
208+ if cfg .Verification .MaxNoProgress <= 0 {
209+ t .Fatalf ("expected max_no_progress > 0, got %d" , cfg .Verification .MaxNoProgress )
210+ }
211+ if len (cfg .Verification .Verifiers ) == 0 {
212+ t .Fatal ("expected default verifiers to be populated" )
213+ }
214+ }
215+
216+ func TestRuntimeConfigVerificationExplicitFalsePreserved (t * testing.T ) {
217+ t .Parallel ()
218+
219+ defaults := defaultRuntimeConfig ()
220+ cfg := RuntimeConfig {
221+ Verification : VerificationConfig {
222+ Enabled : boolPtrTest (false ),
223+ FinalIntercept : boolPtrTest (false ),
224+ },
225+ }
226+ cfg .ApplyDefaults (defaults )
227+ if cfg .Verification .EnabledValue () {
228+ t .Fatalf ("expected explicit verification.enabled=false to be preserved" )
229+ }
230+ if cfg .Verification .FinalInterceptValue () {
231+ t .Fatalf ("expected explicit verification.final_intercept=false to be preserved" )
232+ }
233+ }
234+
235+ func boolPtrTest (value bool ) * bool {
236+ v := value
237+ return & v
238+ }
0 commit comments