Fix HomotopyCtx docs/reexport CI failures on top of #5044 - #5048
Merged
ChrisRackauckas merged 2 commits intoAug 30, 2026
Merged
Conversation
`mtkcompile(sys; homotopy = false)` replaces every Modelica `homotopy(actual, simplified)` node by `actual` before compilation, so the generated code only contains `actual`, problem construction never selects a `HomotopyProblem`, and the initialization / event affect systems derived from the compiled system are compiled the same way (recorded via `HomotopyCtx`). Needed by targets that cannot lower to a continuation solver, e.g. SciML/DiffEqGPU.jl#516. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVSnyFkgc26AFHAwz857n7
…orts `mtkcompile(sys; homotopy = false)` declares `HomotopyCtx`, `homotopy_enabled` and `strip_homotopy` public, but only the latter two got a rendered docs entry and none were added to the reexport allow-list. That breaks three CI checks that are green on master. `HomotopyCtx` gains a `@docs` entry on the Homotopy page, which both renders it and gives `homotopy_enabled`'s docstring a target for its `[`HomotopyCtx`](@ref)`. The three names are added to `REEXPORTED_API`, which is the deliberate, version-controlled record of what `ModelingToolkit` reexports as its own API. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.251 Agent-Model: claude-opus-5[1m] Agent-Session: https://claude.ai/code/session_01Aief3rKoTbHGqMPJZ7t2Jk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignore until reviewed by @ChrisRackauckas. Opened as a draft.
Read this first: what this PR contains
This is #5044 by @pankgeorg (commit
86b1805, unmodified) plus one fix commit on top (e86e6fc).It is not an independent change and it deliberately overlaps @pankgeorg's open PR. The intent was a stacked PR whose base is #5044's branch, but that branch lives on a fork, so a stacked base branch cannot be created inside SciML from this account. Merging #5044 first and cherry-picking
e86e6fconto it is equally good and is the outcome I would prefer — the fix is two files and belongs in #5044, not in a competing PR.Authorship of the feature is @pankgeorg's; only
e86e6fcis mine.The fix (
e86e6fc, 2 files, +5 −2)#5044 declares three new public names in ModelingToolkitBase —
@public HomotopyCtx, homotopy_enabled, strip_homotopy— but onlyhomotopy_enabledandstrip_homotopygot a rendered docs entry, and none were added to the reexport allow-list. That is the "public and documented move together" rule, and it breaks three CI checks that are green on master:build(Documentation)[:cross_references, :linkcheck];Cannot resolve @ref for md"[`HomotopyCtx`](@ref)"indocs/src/basics/Homotopy.md[:linkcheck]onlysublibrary-ci [QA]public API is rendered in docs: isempty([:HomotopyCtx])— 18 passed, 3 failedtests / QAisempty([:HomotopyCtx, :Unknown, :homotopy_enabled, :scalarize, :shape, :strip_homotopy, :unwrap])isempty([:Unknown, :scalarize, :shape, :unwrap])Two changes, no source change — the API surface #5044 chose is untouched, only its documentation and the allow-list that records it:
docs/src/basics/Homotopy.md— addModelingToolkitBase.HomotopyCtxto the page's@docsblock. This renders the type (fixing the QA check) and creates the anchor thathomotopy_enabled's docstring[`HomotopyCtx`](@ref)resolves against (fixing the docs build).test/qa/qa.jl— add:HomotopyCtx,:homotopy_enabledand:strip_homotopytoREEXPORTED_API, the version-controlled record of whatModelingToolkitdeliberately reexports.:ProblemTypeCtxis the closest existing precedent.Verification of
e86e6fcRun locally on Julia 1.12.7 against the same SciMLTesting build CI uses (
SciMLTesting/wvTmj, v2.13.0), before and after the fix.run_api_docs(ModelingToolkitBase)— before:After:
public_reexports(ModelingToolkit; allow = REEXPORTED_API)— before:After:
The remaining four are preexisting on master — that test fails identically on master (run 33198168273). What matters is that the three names #5044 added are gone.
Documenter cross-references. The full docs build needs the network and fails on
:linkcheckon master regardless, so the:cross_referencesclass was isolated locally: a reduced doc set (the Homotopy page plus a stub index) built withdoctest = false, linkcheck = false, warnonly = [:cross_references]. This harness is local only; nothing about it is committed. Unresolved@refs, before:After:
HomotopyCtxis resolved. The residuals are artifacts of the reduced set — both anchors exist in the full manual (mtkcompileatdocs/src/API/model_building.md:153,SciMLBase.HomotopyProblematdocs/src/API/problems.md:52) — andmtkcompileappears only after the fix because renderingHomotopyCtx's docstring is what introduces that reference.Formatting and spelling:
runic --check(Runic v1.10.0, matching #5046) clean ontest/qa/qa.jl;typosclean on both files.What was NOT verified
86b1805was not re-verified by me. Its tests are @pankgeorg's; I checked only that my two files fix the three CI checks above. Treat Addhomotopykeyword tomtkcompileto opt out of homotopy lowering #5044's own verification as the source of truth for the feature.:linkcheckfails on master anyway. Only the:cross_referencesclass was isolated, as described.Expected remaining CI failures, all preexisting on master
This branch is based on
f913198, which predates #5046 ("Format files with Runic 1.10"), so it will still show the three Runic failures inMTKBifurcationKitExt.jl,parameter_buffer.jlandaccessor_functions.jl— none of which either PR touches. A rebase onto current master clears those. Also red on master and not addressed here:tests/Optimization(12 errors indynamic_optimization.jl),sublibrary-ci [InterfaceII](2 failures atjumpsystem.jl:1506-1507),downgrade-mtkbase (QA), and the:linkcheckhalf of the docs build.🤖 Generated with Claude Code (model: claude-opus-5[1m])
https://claude.ai/code/session_01Aief3rKoTbHGqMPJZ7t2Jk