@@ -256,3 +256,29 @@ describe("inferred failures", () => {
256256 expect ( doc . packages [ "@nativescript/android" ] . versions [ "9.1.1" ] . inferred ) . toBeUndefined ( ) ;
257257 } ) ;
258258} ) ;
259+
260+ describe ( "failure attribution" , ( ) => {
261+ it ( "blames only the toolchain no successful build of the release used" , ( ) => {
262+ const doc = buildDocument ( {
263+ generatedAt : "2026-09-09T00:00:00.000Z" ,
264+ toolchains : { xcode : [ ] , cocoapods : [ ] , compileSdk : [ { version : "37" } ] , buildTools : [ { version : "37.0.0" } ] , jdk : [ { version : "25" } , { version : "21" } ] , node : [ ] } ,
265+ packages : [
266+ {
267+ spec : { name : "@nativescript/android" , toolchains : [ "compileSdk" , "buildTools" , "jdk" ] , keep : 5 } ,
268+ document : { distTags : { } , manifests : [ { version : "9.1.1" , requirements : { jdk : ">=17" } } , { version : "9.0.5" , requirements : { jdk : ">=17" } } ] } ,
269+ } ,
270+ ] ,
271+ overrides : { requirements : [ ] , advisories : [ ] } ,
272+ verified : [
273+ { package : "@nativescript/android" , version : "9.1.1" , toolchains : { compileSdk : "37" , buildTools : "37.0.0" , jdk : "25" } , with : { nativescript : "9.1.1" , node : "24" } , outcome : "failure" , attempts : 2 , recordedAt : "2026-09-09T00:00:00Z" } ,
274+ { package : "@nativescript/android" , version : "9.1.1" , toolchains : { compileSdk : "37" , buildTools : "37.0.0" , jdk : "21" } , with : { nativescript : "9.1.1" , node : "24" } , recordedAt : "2026-09-09T00:00:00Z" } ,
275+ ] ,
276+ } ) ;
277+ const v911 = doc . packages [ "@nativescript/android" ] . versions [ "9.1.1" ] ;
278+ expect ( v911 . failed ) . toEqual ( { jdk : [ "25" ] } ) ;
279+ expect ( v911 . verified ) . toEqual ( { compileSdk : [ "37" ] , buildTools : [ "37.0.0" ] , jdk : [ "21" ] } ) ;
280+ expect ( cellFor ( doc , "@nativescript/android" , "9.0.5" , "compileSdk" , "37" ) . state ) . toBe ( "unverified" ) ;
281+ expect ( cellFor ( doc , "@nativescript/android" , "9.0.5" , "buildTools" , "37.0.0" ) . state ) . toBe ( "unverified" ) ;
282+ expect ( cellFor ( doc , "@nativescript/android" , "9.0.5" , "jdk" , "25" ) . state ) . toBe ( "unsupported" ) ;
283+ } ) ;
284+ } ) ;
0 commit comments