Unsolvable environment with julia-downgrade-compat due to libblastrampoline_jll on julia v1.9

I’m trying to use the julia-downgrade-compat (v2) Github Action in a project, and I’ve run into problems with unresolvable environments for julia v1.9.

I’ve tracked down the (apparent) problem to any package chain that leads to requiring libblastrampoline_jll. With some minor edits to a local clone of Resolver.jl to print more information, the following sequence fails:

$ mkdir mwe
$ cd mwe
$ touch Project.toml
$ julia --project --startup-file=no -e 'using Pkg; pkg"add libblastrampoline_jll"; pkg"compat libblastrampoline_jll"'
...
$ julia ~/ext/Resolver.jl/bin/resolve.jl --julia=1.9 .
ERROR: LoadError: Unsatisfiable:
        1222c4b2-2114-5bfd-aeef-88e4692bbb3e julia => 1.9.4
        8e850b90-86db-534c-a0d3-1478176c7d93 libblastrampoline_jll => nothing

Stacktrace:
...

I’ve spent some time trying to understand why there is no valid version identified, and this is what I’ve noticed:

  1. Reading the libblastrampoline_jll Compat.toml file, I think we expect as installable versions:
    • julia v1.6 — lbt_jll v1.*, v2.*, v3.*
    • julia v1.7 — lbt_jll v1.*, v2.*, v3.*
    • julia v1.8 — lbt_jll v4.*, v5.0–v5.2
    • julia v1.9 — lbt_jll v4.*, v5.0–v5.4
    • julia v1.10 — lbt_jll v5.5–v5.12
    • julia v1.11 — lbt_jll v5.5–v5.12
    • julia v1.12 — lbt_jll v5.13+ && <v6
  2. When I use Pkg to resolve a manifest on julia v1.9, it installs libblastrampoline_jll v5.8, newer than what I’d expect is possible
    $ julia +1.9 -q --startup-file=no --project -e 'using Pkg; Pkg.resolve()'
        Updating `/tmp/mwe/Project.toml`
      [8e850b90] ~ libblastrampoline_jll ⇒ v5.8.0+0
        Updating `/tmp/mwe/Manifest.toml`
      [56f22d72] + Artifacts
      [8f399da3] + Libdl
      [8e850b90] + libblastrampoline_jll v5.8.0+0
    
  3. If I try to force adding libblastrampoline_jll v5.4, the restriction is seemingly ignored:
    $ julia +1.9 -q --startup-file=no --project -e 'using Pkg; pkg"compat libblastrampoline_jll =5.4.0"'
          Compat entry set:
      libblastrampoline_jll = "=5.4.0"
         Resolve checking for compliance with the new compat rules...
        Updating `/tmp/mwe/Project.toml`
      [8e850b90] ~ libblastrampoline_jll ⇒ v5.8.0+0
        Updating `/tmp/mwe/Manifest.toml`
      [56f22d72] + Artifacts
      [8f399da3] + Libdl
      [8e850b90] + libblastrampoline_jll v5.8.0+0
    

Is there something I’m misunderstanding about the compatibility format so I’m interpreting everything incorrectly? Or is this a problem with Resolver.jl and there being “unknown” special-case rules for some of the stdlib-related dependencies on older versions of Julia?

Adding more breadcrumbs to the problem, julia v1.9.0 includes libblastrampoline_jll v5.7.0 and julia v1.9.1–1.9.4 include libblastrampoline_jll v5.8.0 (via backporting of the juliv v1.10-era JuliaLang/julia#49658), so that presumably explains why/how Pkg chooses v5.8.0 despite what I think the registry is saying.

Edit:
Is the registry missing an update to match the backport? I found this comment asking about preparing for the bump to libblastrampoline_jll v5.7 to be backported to the julia v1.9 branch.

Hacking a local git clone of the General repository with the following diff:

diff --git a/jll/L/libblastrampoline_jll/Compat.toml b/jll/L/libblastrampoline_jll/Compat.toml
index 739a135e000..f8cb42dcdca 100644
--- a/jll/L/libblastrampoline_jll/Compat.toml
+++ b/jll/L/libblastrampoline_jll/Compat.toml
@@ -10,13 +10,13 @@ julia = "1.8.0-1"
 ["5.13-5"]
 julia = "1.12.0-1"
 
-["5.4"]
-julia = "1.9.0-1"
-
 ["5.4-5"]
 Artifacts = ["0.0.0", "1"]
 JLLWrappers = "1.7.0-1"
 Libdl = ["0.0.0", "1"]
 
-["5.5-5.12"]
-julia = "1.10.0-1"
+["5.4-5.7"]
+julia = "1.9.0-1"
+
+["5.8-5.12"]
+julia = "1.9.1-1"

Resolver.jl then solves the MWE in the top post:

$ julia ~/ext/Resolver.jl/bin/resolve.jl --julia=1.9.4 --min=@alldeps --print-versions .
1222c4b2-2114-5bfd-aeef-88e4692bbb3e julia                 1.9.4
8e850b90-86db-534c-a0d3-1478176c7d93 libblastrampoline_jll 5.8.0+0
21216c6a-2e73-6563-6e65-726566657250 Preferences           1.5.2
4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5 Unicode               1.9.4
56f22d72-fd6d-98f1-02f0-08ddc0907c33 Artifacts             1.9.4
692b3bcd-3c85-4b1f-b108-f13ce0eb3210 JLLWrappers           1.7.1
8f399da3-3557-5675-b5ff-fb832c97cbdb Libdl                 1.9.4
ade2ca70-3891-5945-98fb-dc099432e06a Dates                 1.9.4
de0858da-6303-5e67-8744-51eddeeeb8d7 Printf                1.9.4
fa267f1f-6049-4f14-aa54-33bafae1ed76 TOML                  1.0.3

I can create a PR in General to make this change if this is something like the right thing to do. Other opinions/recommendations?