@@ -388,6 +388,86 @@ it.layer(layerTest)("CodexDriver", (it) => {
388388 { name : "an unavailable native channel" , tag : "rust-v0.163.0" , status : 503 , expected : null } ,
389389 { name : "malformed native metadata" , tag : "not-a-version" , status : 200 , expected : null } ,
390390 { name : "a newer native release" , tag : "rust-v0.164.0" , status : 200 , expected : "0.164.0" } ,
391+ {
392+ name : "missing platform assets" ,
393+ tag : "rust-v0.163.0" ,
394+ status : 200 ,
395+ expected : null ,
396+ assets : [ ] ,
397+ } ,
398+ {
399+ name : "a missing checksum manifest" ,
400+ tag : "rust-v0.163.0" ,
401+ status : 200 ,
402+ expected : null ,
403+ assets : [ "codex-package-aarch64-apple-darwin.tar.gz" ] ,
404+ } ,
405+ {
406+ name : "an invalid asset digest" ,
407+ tag : "rust-v0.163.0" ,
408+ status : 200 ,
409+ expected : null ,
410+ digest : "invalid" ,
411+ } ,
412+ {
413+ name : "the legacy npm archive" ,
414+ tag : "rust-v0.163.0" ,
415+ status : 200 ,
416+ expected : "0.163.0" ,
417+ assets : [ "codex-npm-darwin-arm64-0.163.0.tgz" ] ,
418+ } ,
419+ {
420+ name : "Linux x64 packages" ,
421+ tag : "rust-v0.163.0" ,
422+ status : 200 ,
423+ expected : "0.163.0" ,
424+ platform : "linux" as const ,
425+ architecture : "x64" as const ,
426+ assets : [ "codex-package-x86_64-unknown-linux-musl.tar.gz" , "codex-package_SHA256SUMS" ] ,
427+ } ,
428+ {
429+ name : "Linux arm64 packages" ,
430+ tag : "rust-v0.163.0" ,
431+ status : 200 ,
432+ expected : "0.163.0" ,
433+ platform : "linux" as const ,
434+ architecture : "arm64" as const ,
435+ assets : [ "codex-package-aarch64-unknown-linux-musl.tar.gz" , "codex-package_SHA256SUMS" ] ,
436+ } ,
437+ {
438+ name : "Windows x64 packages" ,
439+ tag : "rust-v0.163.0" ,
440+ status : 200 ,
441+ expected : "0.163.0" ,
442+ platform : "win32" as const ,
443+ architecture : "x64" as const ,
444+ assets : [ "codex-package-x86_64-pc-windows-msvc.tar.gz" , "codex-package_SHA256SUMS" ] ,
445+ } ,
446+ {
447+ name : "Windows arm64 packages" ,
448+ tag : "rust-v0.163.0" ,
449+ status : 200 ,
450+ expected : "0.163.0" ,
451+ platform : "win32" as const ,
452+ architecture : "arm64" as const ,
453+ assets : [ "codex-package-aarch64-pc-windows-msvc.tar.gz" , "codex-package_SHA256SUMS" ] ,
454+ } ,
455+ {
456+ name : "Intel macOS packages" ,
457+ tag : "rust-v0.163.0" ,
458+ status : 200 ,
459+ expected : "0.163.0" ,
460+ platform : "darwin" as const ,
461+ architecture : "x64" as const ,
462+ assets : [ "codex-package-x86_64-apple-darwin.tar.gz" , "codex-package_SHA256SUMS" ] ,
463+ } ,
464+ {
465+ name : "assets for another platform" ,
466+ tag : "rust-v0.163.0" ,
467+ status : 200 ,
468+ expected : null ,
469+ assets : [ "codex-package-x86_64-unknown-linux-musl.tar.gz" , "codex-package_SHA256SUMS" ] ,
470+ } ,
391471 {
392472 name : "an explicit release" ,
393473 tag : "rust-v0.164.0" ,
@@ -421,7 +501,21 @@ it.layer(layerTest)("CodexDriver", (it) => {
421501 request ,
422502 request . url . includes ( "registry.npmjs.org" )
423503 ? Response . json ( { version : "0.164.0" } )
424- : Response . json ( { tag_name : fixture . tag } , { status : fixture . status } ) ,
504+ : Response . json (
505+ {
506+ tag_name : fixture . tag ,
507+ assets : (
508+ fixture . assets ?? [
509+ "codex-package-aarch64-apple-darwin.tar.gz" ,
510+ "codex-package_SHA256SUMS" ,
511+ ]
512+ ) . map ( ( name ) => ( {
513+ name,
514+ digest : fixture . digest ?? `sha256:${ "a" . repeat ( 64 ) } ` ,
515+ } ) ) ,
516+ } ,
517+ { status : fixture . status } ,
518+ ) ,
425519 ) ;
426520 } ) ,
427521 ) ;
@@ -436,6 +530,8 @@ it.layer(layerTest)("CodexDriver", (it) => {
436530 expect ( requests ) . toEqual ( [ ] ) ;
437531 const latest = yield * resolveLatestProviderVersion ( capabilities ) . pipe (
438532 Effect . provideService ( HttpClient . HttpClient , http ) ,
533+ Effect . provideService ( HostProcess . Platform , fixture . platform ?? "darwin" ) ,
534+ Effect . provideService ( HostProcess . Architecture , fixture . architecture ?? "arm64" ) ,
439535 ) ;
440536 expect ( latest ) . toBe ( fixture . expected ) ;
441537 expect ( requests ) . toEqual (
0 commit comments