@@ -597,12 +597,12 @@ accountTokenIt.instance("resolves env templates in account config with account t
597597 } ) ,
598598)
599599
600- it . instance ( "validates config schema and throws on invalid fields " , ( ) =>
600+ it . instance ( "validates config schema and throws on invalid values " , ( ) =>
601601 Effect . gen ( function * ( ) {
602602 const test = yield * TestInstance
603603 yield * writeConfigEffect ( test . directory , {
604604 $schema : "https://opencode.ai/config.json" ,
605- invalid_field : "should cause error" ,
605+ model : 42 ,
606606 } )
607607 const exit = yield * Config . use . get ( ) . pipe ( Effect . exit )
608608 expect ( Exit . isFailure ( exit ) ) . toBe ( true )
@@ -1331,7 +1331,7 @@ it.instance("permission config preserves user key order", () =>
13311331 } ) ,
13321332)
13331333
1334- test ( "config parser preserves permission order while rejecting unknown top-level keys" , ( ) => {
1334+ test ( "config parser preserves permission order while ignoring unknown top-level keys" , ( ) => {
13351335 const config = ConfigParse . schema (
13361336 ConfigV1 . Info ,
13371337 {
@@ -1340,18 +1340,13 @@ test("config parser preserves permission order while rejecting unknown top-level
13401340 "*" : "deny" ,
13411341 edit : "ask" ,
13421342 } ,
1343+ plugins : [ "example" ] ,
13431344 } ,
13441345 "test" ,
13451346 )
13461347
13471348 expect ( Object . keys ( config . permission ! ) ) . toEqual ( [ "bash" , "*" , "edit" ] )
1348- try {
1349- ConfigParse . schema ( ConfigV1 . Info , { invalid_field : true } , "test" )
1350- throw new Error ( "expected config parse to fail" )
1351- } catch ( err ) {
1352- const error = err as { data ?: { issues ?: Array < { code ?: string ; keys ?: string [ ] ; path ?: string [ ] } > } }
1353- expect ( error . data ?. issues ?. [ 0 ] ) . toMatchObject ( { code : "unrecognized_keys" , keys : [ "invalid_field" ] , path : [ ] } )
1354- }
1349+ expect ( config ) . not . toHaveProperty ( "plugins" )
13551350} )
13561351
13571352// MCP config merging tests
0 commit comments