Skip to content

Raise Mooncake compat floor to 0.5.36 (fix Downgrade resolution)#61

Closed
ChrisRackauckas-Claude wants to merge 45 commits into
SciML:masterfrom
ChrisRackauckas-Claude:raise-mooncake-floor-0.5.36
Closed

Raise Mooncake compat floor to 0.5.36 (fix Downgrade resolution)#61
ChrisRackauckas-Claude wants to merge 45 commits into
SciML:masterfrom
ChrisRackauckas-Claude:raise-mooncake-floor-0.5.36

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

Raises the Mooncake [compat] floor in Project.toml to the latest registered Mooncake (0.5.36), replacing the old union Mooncake = "0.4, 0.5". This is the "limit to latest Mooncake" fix for the promotion-caused Downgrade Unsatisfiable wall.

Raised floors:

  • Project.toml (root) [compat]: Mooncake = "0.4, 0.5" -> Mooncake = "0.5.36"

Bumped package version 1.3.3 -> 1.3.4 (a compat narrowing is a patch-level change; the Mooncake weakdep floor is not a public-API change).

Only the root Project.toml declares a Mooncake [compat] entry. test/qa/Project.toml has no Mooncake. The [weakdeps]/[extras] Mooncake UUID lines were left untouched.

Why

The Downgrade min-resolution promotes the Mooncake weakdep to a full dependency in the merged test-target project (julia-downgrade-compat@v2 create_merged_project) and feeds it to Resolver.jl. With the old union floor the resolver was pinned to an ancient Mooncake, hitting the Unsatisfiable Resolver-capacity wall. Narrowing the floor to the latest 0.5.36 lets the minimum-version resolve succeed.

Verification (resolves_at_min = true)

On Julia 1.12.6, two independent faithful checks of the Downgrade min-resolution, both with the bumped floor:

  1. Faithful CI reproduction - ran julia-actions/julia-downgrade-compat@v2 downgrade.jl (mode=deps, projects=., stdlib skip list) on the repo. Log shows Promoting Mooncake from weakdep to dependency in merged project then:
    [ Info: Successfully resolved minimal versions for . (with extras)
    
    Mooncake resolved to 0.5.36.
  2. Explicit floor pin - Pkg.add of the full test target with PackageSpec(name="Mooncake", version=v"0.5.36") at minimum versions: RESOLVE_SUCCEEDED, Mooncake -> 0.5.36.

So the floor-raise alone resolves the wall for FastPower (does not require .github#52).


Please ignore until reviewed by @ChrisRackauckas.

dependabot Bot and others added 30 commits August 12, 2025 00:27
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Migrate to Enzyme easy_rule
…ons/checkout-5

Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ons/checkout-6

Bump actions/checkout from 5 to 6
…pendabot

Add Julia ecosystem to Dependabot configuration
Split tests into Core and Enzyme groups, with Enzyme excluded from Julia
pre-release versions due to upstream LLVM data layout incompatibility.

See EnzymeAD/Enzyme.jl#2699 for the upstream issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix CI: Exclude Enzyme tests from Julia pre
The previous minimum version bounds were incompatible with the
current dependency ecosystem, specifically due to conflicting
SpecialFunctions requirements when Mooncake 0.4 is present.

Changes:
- Measurements: 2.0 -> 2.5 (minimum version compatible with Mooncake 0.4)
- ReverseDiff: 1.0 -> 1.14 (minimum version compatible with Mooncake 0.4)

Testing revealed that:
- Measurements 2.0 requires SpecialFunctions 0.7-0.10.3
- ReverseDiff 1.0 requires SpecialFunctions 0.8-0.9
- Mooncake 0.4 requires SpecialFunctions >= 2.0

This created an unsolvable dependency conflict. The new minimum
versions (Measurements 2.5 and ReverseDiff 1.14) are compatible
with SpecialFunctions >= 2.0 and work correctly with all other
dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ons-20260102-012843

Fix minimum version bounds for Measurements and ReverseDiff
- Update CI workflow to use fredrikekre/runic-action@v1
- Remove .JuliaFormatter.toml configuration
- Format all source files with Runic.jl

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Switch from JuliaFormatter to Runic.jl for code formatting
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ons/checkout-6

Bump actions/checkout from 4 to 6
Updates the requirements on [Mooncake](https://github.com/chalk-lab/Mooncake.jl) to permit the latest version.

Updates `Mooncake` to 0.5.0
- [Release notes](https://github.com/chalk-lab/Mooncake.jl/releases)
- [Changelog](https://github.com/chalk-lab/Mooncake.jl/blob/main/HISTORY.md)
- [Commits](chalk-lab/Mooncake.jl@v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: Mooncake
  dependency-version: 0.5.0
  dependency-type: direct:production
  dependency-group: all-julia-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
…kages-1bcd8d4383

Update Mooncake requirement from 0.4 to 0.4, 0.5 in the all-julia-packages group across 1 directory
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5...v6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…cov/codecov-action-6

Bump codecov/codecov-action from 5 to 6
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 2 to 3.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Commits](julia-actions/setup-julia@v2...v3)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…a-actions/setup-julia-3

Bump julia-actions/setup-julia from 2 to 3
`fredrikekre/runic-action@v1` (v1.4+) requires `julia` in PATH but no
longer installs it itself. Add `julia-actions/setup-julia@v2` before the
action so the format check actually runs (it has been silently passing
across many SciML repos for weeks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
…ck-julia-setup

CI: install Julia in FormatCheck workflow so runic-action can run
dependabot Bot and others added 15 commits May 12, 2026 00:47
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 2 to 3.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Commits](julia-actions/setup-julia@v2...v3)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…a-actions/setup-julia-3

Bump julia-actions/setup-julia from 2 to 3
Convert inline CI workflows to the SciML centralized reusable workflows
(pinned @v1, all callers get secrets: "inherit"):

- FormatCheck.yml: fredrikekre/runic-action -> runic.yml@v1
- SpellCheck.yml: crate-ci/typos -> spellcheck.yml@v1
- Downgrade.yml: inline -> downgrade.yml@v1 (julia 1.10, skip Pkg,TOML,
  allow-reresolve false)
- Downstream.yml: inline IntegrationTest -> matrix of downstream.yml@v1
  callers (same 10 package+group entries)

Tests.yml was already a tests.yml@v1 caller; left unchanged.

dependabot.yml: drop the crate-ci/typos version ignore; scope the julia
ecosystem to "/" (the only dir with a Project.toml).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Centralize CI to SciML reusable workflows
Add missing standard SciML centralized caller workflows.

Co-authored-by: ChrisRackauckas-Claude <noreply@anthropic.com>
Co-authored-by: Chris Rackauckas <accounts@chrisrackauckas.com>
The reusable SciML/.github downgrade workflows now always use
allow_reresolve: false and no longer accept an allow-reresolve input
(see SciML/.github#71). Remove the now-invalid input so this caller keeps
working once @v1 is retagged.

Co-authored-by: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ciML#50)

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Canonical CI: grouped-tests.yml + root test/test_groups.toml

Convert the root Tests.yml from a hand-maintained group x version matrix
calling tests.yml@v1 into a thin caller of the canonical
grouped-tests.yml@v1, with the matrix declared once in
test/test_groups.toml.

- Tests.yml: thin caller (uses grouped-tests.yml@v1, secrets inherit);
  on:/concurrency: preserved verbatim. All grouped-tests inputs left at
  defaults (GROUP env, check-bounds yes, coverage src,ext), matching the
  prior behavior.
- test/test_groups.toml: Core [lts,1,pre], Enzyme [lts,1], QA [lts,1].
  Reproduces the old matrix (Core x {1,lts,pre}; Enzyme x {1,lts} with
  the pre+Enzyme exclude); QA is newly wired.
- runtests.jl: add a GROUP=="QA" branch that activates the isolated
  test/qa env and runs qa.jl; existing Core/Enzyme/All dispatch kept.
- test/qa: isolated Aqua + JET environment (FastPower via [sources]).
- Project.toml: add missing [compat] entries for [extras] deps
  (EnzymeTestUtils, Test); julia compat already at the 1.10 LTS floor.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add Pkg as test dependency for Core group

The grouped runtests.jl uses `using Pkg` for the QA group's Pkg.activate,
but Pkg was not a declared test dependency. Under project='.' the Core job
failed with: ArgumentError: Package Pkg not found in current path.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add Pkg to QA sub-environment for grouped tests

The grouped-tests QA group activates test/qa as its own project, so the QA sub-env must carry Pkg (used by the activation/instantiate path).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Hoist Core/Enzyme-group `using` lines to top level in test/runtests.jl

The grouped-tests conversion placed `using` statements inside top-level
`if GROUP ...` blocks that also use macros inline. Julia macro-expands the
entire `if` block as one unit before the in-block `using` runs, so any macro
provided by that `using` is undefined (UndefVarError: @... not defined in Main).
Move the functional Core/Enzyme-group `using` lines up to top level. The QA
block's `using Pkg` (before Pkg.activate of the qa sub-environment) is left
in place.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* QA: mark Aqua deps_compat extras finding @test_broken so QA is green

JET passes cleanly. The only Aqua finding is deps_compat for the `Pkg`
extra (no [compat] entry in the root Project.toml [extras]). Disable
only the extras sub-check of deps_compat (julia/deps/weakdeps still
checked) and record the finding as @test_broken pointing at the
tracking issue, so the QA group goes GREEN without silencing it.

See SciML#53

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hand-written GROUP dispatcher in test/runtests.jl with the
SciMLTesting v1.2 folder-discovery run_tests harness. The Core testsets are
split into self-contained top-level files (fast_log2_tests.jl, fast_pow_tests.jl,
other_ad_engines_tests.jl) and the Enzyme group moves to test/Enzyme/
(enzyme_forward_tests.jl, enzyme_reverse_tests.jl), run in the main test env to
match the pre-conversion behavior. QA stays in test/qa/ with its env. Adds
SciMLTesting + SafeTestsets to the root and qa test deps and drops Pkg (the
harness owns Pkg ops). test_groups.toml is unchanged; GROUP=All still runs
Core + Enzyme (QA excluded), matching the old dispatcher.

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert the hand-rolled `test/qa/qa.jl` (direct `Aqua.test_all` +
`JET.test_package`) onto the SciMLTesting v1.6 `run_qa` form and enable
the ExplicitImports checks:

    using SciMLTesting, FastPower, JET, Test
    run_qa(FastPower; explicit_imports = true)

Aqua, JET, and all six ExplicitImports checks pass cleanly (FastPower has
no external `[deps]`, so EI is trivially clean — no ignore-lists, no broken
markers needed).

The previous `@test_broken` placeholder for the Aqua `deps_compat` extras
finding (SciML#53) is dropped: that finding was the `Pkg` extra missing a compat
entry, and `Pkg` was already removed from the root `[extras]`/test target in
SciML#54. Verified against released SciMLTesting 1.6.0 that the full default
`Aqua.test_all(FastPower)` now passes the deps_compat (extras) sub-check, so
the marker was stale — issue SciML#53 can be closed.

test/qa/Project.toml: bump SciMLTesting compat to "1.6"; drop the explicit
`check_extras = false` tweak (no longer needed). ExplicitImports stays a
transitive dep via SciMLTesting (not listed directly); Aqua kept as a direct
dep (its ambiguities sub-check child-procs), JET and SafeTestsets kept.

Verified locally (clean depot, released SciMLTesting 1.6.0, GROUP=QA via
run_tests folder-model): Quality Assurance 18/18 Pass, 0 Fail/Error/Broken.

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hed tolerance (SciML#58)

The Enzyme `@easy_rule` returns the *exact* `^` derivative, but EnzymeTestUtils
`test_forward`/`test_reverse` compare it against finite differences of the
*approximate* `fastpower` primal. Because `fastpower` routes through a Float32
`fastlog2` polynomial, the *slope* of its primal differs from the exact slope by
~1e-2 relative near x=1 (measured: exact d/dx = 0.5 vs FD-of-fastpower = 0.5066,
i.e. 1.3e-2 relative), even at points like (1.0, 0.5) where the primal *value* is
exact. So the FD reference is off from the exact rule by `fastpower`'s inherent
approximation error, not by any rule bug. The old atol=1e-4, rtol=1e-3 sat below
that gap, so whether the lane passed depended on the random tangents drawn from
the global RNG and it went red intermittently (~4% of draws).

Two-part fix:

1. Determinism via StableRNG, not Xoshiro. Seeding the global RNG / `Xoshiro`
   does not actually pin the test, because those streams can change across Julia
   versions, so the flake could reappear on a new Julia. `StableRNGs.StableRNG`
   yields a stream guaranteed identical across Julia versions, passed as the
   `rng=` keyword that EnzymeTestUtils accepts.

2. Tolerance matched to fastpower's documented accuracy (atol=1e-3, rtol=1e-2),
   not reverted to the tight 1e-4/1e-3. Empirically the inherent gap is real: with
   the tight tolerance, 8/10 candidate StableRNG seeds pass the forward grid 52/52
   but seeds 123 and 31415 fail, and the all-seeds failure boundary is rtol~2e-3.
   Reverting to rtol=1e-3 would only "pass" by cherry-picking a lucky seed, which
   would hide the genuine (benign, expected) primal-approximation error. The chosen
   rtol=1e-2 sits ~5x above the measured worst-case relative discrepancy yet far
   below the O(1) relative error a genuinely wrong derivative rule would produce,
   so real regressions are still caught. Verified deterministic forward 52/52 +
   reverse 36/36 across 3 repeats on both Julia 1 and lts, and 52/52 for all 10
   candidate seeds on lts (so the tolerance is seed-independent, not seed-luck).

Swap the test dep Random -> StableRNGs in [extras]/[targets].test/[compat].

Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Downgrade min-resolution promotes the Mooncake weakdep to a full
dependency in the merged test-target project (julia-downgrade-compat@v2
create_merged_project) and feeds it to Resolver.jl. With the old union
floor (0.4, 0.5) the resolver was pinned to an ancient Mooncake, hitting
an Unsatisfiable Resolver-capacity wall. Narrowing the floor to the
latest 0.5.36 lets the minimum-version resolve succeed.

Verified on Julia 1.12.6: both the faithful v2 downgrade.jl merged
resolution and an explicit Mooncake=0.5.36 min-version Pkg.add of the
test target resolve successfully (Mooncake -> 0.5.36).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Closing. Verified locally (ran the action's own downgrade.jl on the identical commit CI failed on) that raising the Mooncake compat floor does NOT fix the Downgrade lane. The failure is julia-downgrade-compat@v2 merged mode promoting all ~13 weakdep AD backends (Mooncake, Zygote, ForwardDiff, DifferentiationInterface, …) to hard deps and running Resolver.jl --min on the joint graph — which is registry-snapshot-dependent (flips UNSAT↔SAT as those packages release) and independent of Mooncake's version. This PR also unnecessarily narrows Mooncake compat. Real fix is julia-actions/julia-downgrade-compat#52 (do not promote weakdeps in merged resolution). Superseded — closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants