Skip to content

Make getpoissonianrate and topoissonian public - #5426

Merged
ChrisRackauckas merged 4 commits into
SciML:masterfrom
isaacsas:mtkbase/public-poissonian-calledparam
Nov 22, 2026
Merged

ChrisRackauckas merged 4 commits into
SciML:masterfrom
isaacsas:mtkbase/public-poissonian-calledparam

Conversation

@isaacsas

@isaacsas isaacsas commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Marks getpoissonianrate and topoissonian as public (@public, not exported). Catalyst's alias elimination (SciML/Catalyst.jl#1605) substitutes symbols inside a poissonian's rate, which needs reading the rate (getpoissonianrate) and storing the substituted one (topoissonian). Both functions already have docstrings; they are now also rendered in the API docs ("Variable type" section of docs/src/API/variables.md), as SciMLTesting's QA check requires for public names. Since ModelingToolkit mirrors ModelingToolkitBase's public names, both are also added to the root QA's REEXPORTED_API allowlist (test/qa/qa.jl), along with the already-exported poissonians, which was missing from it on master.

🤖 Generated with Claude Code 2.1.330 (model: claude-opus-5-5)

Catalyst uses them to substitute symbols inside a poissonian's rate
(SciML/Catalyst.jl#1605). Both already have docstrings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

CI on head 904c2652 has a failure this change causes. sublibrary-ci / lib/ModelingToolkitBase [QA] fails the SciMLTesting check "public API is rendered in docs":

Expression: isempty(unrendered)
 Evaluated: isempty([:getpoissonianrate, :topoissonian])
run_api_docs: public API names not rendered in a @docs block

The two names are now @public but neither is listed in a @docs block, so the check fails. Adding both to the API docs page (and a docstring for each, if one is missing) should clear it. The other QA failure on this PR, "No unapproved public reexports" (Curl, Divergence, Grad, Laplacian, NormalDerivative), also fails the same way on master and is not caused by this PR.

I have not run a review round yet: with red CI that this PR causes, a review would not count at this head. A round follows once the docs entries are in and CI is complete.


🤖 Posted by an AI agent — harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

Both are now public, so SciMLTesting's QA check requires them to be rendered in a
`@docs` block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbGX7MTL8D9H2sPN1GsG9c
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #5426

Reviewed head: fc08687
Raw SHA-256: 3499d617f33c925528c1c3d76c33bffeb8b5822470716ebfe4e5366f4795480d
Source SHA-256: 81b174cf61f97796adc68818a596279d91c03ce46ecc67aa234c4c2de022392d
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1ffa9-73eb-7342-938b-0c750d4ab14e
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: CHANGES
  • Reviewed head: fc08687

Review report

VERDICT: CHANGES
Round: 1
Head: fc08687
Slot: 1
CI: CI is not green
Session: 01a1ffa9-73eb-7342-938b-0c750d4ab14e
Reviewer: codex-cli 0.170.0; model: gpt-6.2-sol

Risk

medium-low (ML7: two additive public names in ModelingToolkitBase and its ModelingToolkit facade)

Blocking findings

  • [P1] lib/ModelingToolkitBase/src/ModelingToolkitBase.jl:534 and test/qa/qa.jl:72. On Julia 1.11 and later, the facade mirrors both public declarations through @import_mtkbase. Root QA failed at “No unapproved public reexports.” Running the same allowlist assertion against the base and head with identical dependency versions isolated two newly unapproved bindings, :getpoissonianrate and :topoissonian. Add both intended facade bindings to REEXPORTED_API.
  • [P2] docs/src/API/variables.md:357 publishes the contract in lib/ModelingToolkitBase/src/parameters.jl:27. The docstring promises nothing for a symbol outside the Poissonian category. In the probe, both tovar(topoissonian(x, 3)) and toparam(topoissonian(x, 3)) successfully reclassified the symbol, and the getter still returned 3 in both cases. Make the accessor honor the category check, or document that it reads stored rate metadata after reclassification. Add a direct test for the chosen contract.
  • Blocking priorities: P1, P2

Non-blocking findings

  • test/qa/qa.jl:72. The base probe already lists :poissonians, :Curl, :Divergence, :Grad, :Laplacian, and :NormalDerivative. Source history traces the first to a base commit that exported poissonians. The other five first appear in the installed Symbolics 7.49.0 source when compared with 7.48.0. Review those six facade bindings in a follow-up. Commit exporting poissonians
  • lib/ModelingToolkitBase/test/jumpsystem.jl:604. The unchanged @test_nowarn assertion fails on both snapshots with --depwarn=yes. JumpProcesses 10.2.0 deprecates the dependency-map keywords passed at lib/ModelingToolkitBase/src/problems/jumpproblem.jl:157. Switch to JumpDependencies in a separate change that accounts for supported JumpProcesses versions.

What I ran

  • Julia 1.12.4 with the repository's project files in isolated snapshots. git diff --check origin/master...HEAD, Runic 1.13.0 in check mode on the changed Julia file, and typos on added lines all exited 0. The original checkout stayed clean. uv run --locked python --version printed Python 3.13.13 and warned that there was no project for --locked.
  • GROUP=QA julia --startup-file=no --project -e 'using Pkg; Pkg.instantiate(;update_registry=false); Pkg.test()' reported 39 passes and one failure. The focused SciMLTesting.public_reexports comparison returned eight unapproved names on head and six on base.
  • GROUP=InterfaceII julia --startup-file=no --project=lib/ModelingToolkitBase -e 'using Pkg; Pkg.instantiate(;update_registry=false); Pkg.test()' stopped at the jump testset with 4,279 passes and one failure. The extracted assertion failed on both snapshots under the official warning flags. Running the affected files separately in the same test environment with those flags passed 158 variable metadata checks, 123 Poissonian checks, and 1,917 SDE/jump extension checks.
  • The qualified API probe on head reported nine passes and two failures. Both failures printed Evaluated: 3 === nothing. The base visibility and rate round-trip controls passed all seven checks.
  • xvfb-run -a julia --startup-file=no --project=docs docs/make.jl reached document checks and exited 1 after an unchanged link in docs/src/index.md:181 returned HTTP 429. A focused Documenter build of the changed excerpt exited 0 and confirmed both new docstring anchors. Rate-limited ColPrac link

What I did not verify

A successful full-site render after the external link check, other Julia versions and CI lanes, or a project-locked Python interpreter. The checkout has no Python lockfile.

AUTHOR_GRADE: {"task": "feature", "score": 2, "difficulty": 2, "rounds": 1, "author_harness": "unknown", "author_model": "unknown", "note": "The new docstrings render and affected suite checks pass, but facade QA rejects two new reexports and both reclassification probes contradict the published rate contract."}

Head link: fc08687


🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a1ffa9-73eb-7342-938b-0c750d4ab14e (no session URL)

isaacsas and others added 2 commits November 21, 2026 18:00
ModelingToolkit mirrors ModelingToolkitBase's public names, so the root QA check needs both
in its `REEXPORTED_API` allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbGX7MTL8D9H2sPN1GsG9c
ModelingToolkitBase exports `poissonians`, which ModelingToolkit reexports, but it was
missing from the root QA's `REEXPORTED_API` allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbGX7MTL8D9H2sPN1GsG9c
@ChrisRackauckas
ChrisRackauckas merged commit ae0a57d into SciML:master Nov 22, 2026
105 of 111 checks passed
@isaacsas
isaacsas deleted the mtkbase/public-poissonian-calledparam branch November 22, 2026 12:15
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.

3 participants