SciML / SciML/FunctionWrappersWrappers.jl

GROUP=Everything QA fails after Enzyme and Mooncake groups load extensions

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
12
Forks
6
Avg merge
27m
Merged PRs (30d)
3

Description

Summary

GROUP=Everything fails on current main when QA runs after the Enzyme and Mooncake groups in the same Julia process. The functional groups themselves pass, and GROUP=QA passes in a fresh process, so the regular per-group CI matrix does not expose this.

On ac2b103c99ea5b1ef6f7c3af6de53fc36ad496d6 with Julia 1.12.6, SciMLTesting 2.4.0, and ExplicitImports 1.15.0:

  • Core: 51/51 plus BigFloat 7/7 pass
  • Enzyme: 68/68 pass
  • Mooncake: 13/13 pass
  • nopre/JET: 7/7 plus BigFloat 7/7 pass
  • QA: 18 pass, 3 errors

The three QA errors are:

  1. no_implicit_imports: FunctionWrappersWrappersEnzymeExt implicitly imports Enzyme, EnzymeCore, BatchDuplicated, Const, Duplicated, Forward, and ForwardWithPrimal.
  2. all_qualified_accesses_are_public: FunctionWrappersWrappersMooncakeExt accesses non-public Core.Typeof and Mooncake's build_rrule, primal, rrule!!, and tangent_type.
  3. all_explicit_imports_are_public: the Mooncake extension imports non-public @is_primitive, CoDual, MinimalCtx, NoRData, NoTangent, fdata, and zero_tangent.

Switching group environments in-process also prints extension-loading errors because packages loaded by an earlier group are absent from the newly activated environment. This appears to be related state leakage, though the three ExplicitImports findings above are genuine and should not be hidden with catch-all allowlists.

Reproduction

git checkout ac2b103c99ea5b1ef6f7c3af6de53fc36ad496d6
GROUP=Everything julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test()'

This exits 1 after the QA summary:

Test Summary: | Pass  Error  Total
QA            |   18      3     21

In contrast, a fresh-process QA run succeeds:

GROUP=QA julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total
QA            |   21     21

Regression boundary

The first repository commit where this exact GROUP=Everything command exposes the failure is f8b7e1d6a009709b33e6370810264963cce1dd19 (Update QA envs for SciMLTesting v2.1): it visits Core, Enzyme, Mooncake, nopre, then fails QA with the same three errors.

Its immediate parent 6ccf3d9b0669d242da50b746dfc2a0a9f60c3725 exits 0 with SciMLTesting 1.8.0, but under those older semantics GROUP=Everything only runs Core. Thus f8b7e1d exposed pre-existing extension issues rather than introducing the extension code itself.

Possible resolution

  • Make the Enzyme extension's imports explicit.
  • Replace Mooncake internal API usage with documented public API, or promote and document the required API in Mooncake before depending on it.
  • Consider whether SciMLTesting's Everything execution should isolate per-environment groups so loaded extensions and unavailable extension dependencies cannot leak across environment switches.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing GROUP=Everything with the provided Julia command, then inspect the FunctionWrappersWrappersEnzymeExt and FunctionWrappersWrappersMooncakeExt extension code alongside the QA ExplicitImports checks. Done means the three genuine import/public-API findings are resolved without catch-all allowlists, and the group-switching behavior is addressed or clearly isolated.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.