@@ -25,7 +25,7 @@ import {
2525const driver = ProviderDriverKind . make ( "codex" ) ;
2626const policy : ProviderCompatibilityPolicy = {
2727 driver,
28- t3CodeRange : ">=0.0.42 <0.1. 0" ,
28+ t3CodeRange : ">=0.0.0" ,
2929 recommendedVersion : "2.0.0" ,
3030 recommendedRange : ">=2.0.0 <3.0.0" ,
3131 ranges : [
@@ -222,7 +222,19 @@ describe("provider compatibility", () => {
222222 ] as const ) {
223223 assert . strictEqual ( resolveProviderCompatibility ( [ policy ] , driver , version ) ?. status , expected ) ;
224224 }
225- assert . isUndefined ( resolveProviderCompatibility ( [ policy ] , driver , "0.9.0" , "0.1.0" ) ) ;
225+ } ) ;
226+
227+ it ( "applies policies only within their T3 Code version range" , ( ) => {
228+ const scopedPolicy = { ...policy , t3CodeRange : ">=0.0.42 <0.1.0" } ;
229+ for ( const version of [ "0.0.42" , "0.0.45" ] ) {
230+ assert . strictEqual (
231+ resolveProviderCompatibility ( [ scopedPolicy ] , driver , "0.9.0" , version ) ?. status ,
232+ "broken" ,
233+ ) ;
234+ }
235+ for ( const version of [ "0.0.41" , "0.1.0" ] ) {
236+ assert . isUndefined ( resolveProviderCompatibility ( [ scopedPolicy ] , driver , "0.9.0" , version ) ) ;
237+ }
226238 } ) ;
227239
228240 it ( "supports every driver without inventing policies for uncovered adapters" , ( ) => {
@@ -253,7 +265,7 @@ describe("provider compatibility", () => {
253265 assert . strictEqual ( supported . status , "error" ) ;
254266 assert . strictEqual ( supported . message , "Authentication failed" ) ;
255267 assert . strictEqual (
256- applyProviderCompatibility ( supported , [ { ...policy , t3CodeRange : ">=9 .0.0" } ] , [ policy ] )
268+ applyProviderCompatibility ( supported , [ { ...policy , t3CodeRange : "<0 .0.0" } ] , [ policy ] )
257269 . compatibilityAdvisory ?. status ,
258270 "broken" ,
259271 ) ;
@@ -280,11 +292,11 @@ describe("provider compatibility", () => {
280292 ranges : [ { range : ">=v2.0 <v3" , status : "supported" } ] ,
281293 } ) ;
282294 assert . strictEqual (
283- resolveProviderCompatibility ( [ prefixed ] , driver , "2.0.0" ) ?. status ,
295+ resolveProviderCompatibility ( [ prefixed ] , driver , "2.0.0" , "0.0.45" ) ?. status ,
284296 "supported" ,
285297 ) ;
286298 assert . strictEqual (
287- resolveProviderCompatibility ( [ prefixed ] , driver , "3.0.0" ) ?. status ,
299+ resolveProviderCompatibility ( [ prefixed ] , driver , "3.0.0" , "0.0.45" ) ?. status ,
288300 "unknown" ,
289301 ) ;
290302 for ( const invalid of [
0 commit comments