Skip to content

Require StableRNGs 1 for tests#1521

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/stablerngs-test-floor
Jul 22, 2026
Merged

Require StableRNGs 1 for tests#1521
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/stablerngs-test-floor

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • require StableRNGs 1 for the test target
  • prevent Julia 1.10 downgrade tests from resolving the incompatible StableRNGs 0.1.0 release
  • retire a stale pre-1.0 test-only dependency line; StableRNGs 1.0.0 was released in September 2020, before Catalyst added the unbounded test extra in February 2021

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

Why

SciML/.github#119 makes old-style [extras] remain at their action-selected minimum versions during Pkg.test. With those production semantics, current Catalyst master resolves the unbounded StableRNGs test extra to 0.1.0. Julia 1.10 then errors in the existing test/reactionsystem_core/reactionsystem.jl:207 regression with an ambiguous Random.Sampler(::Type{StableRNGs.LehmerRNG}, ::UnitRange{Int64}, ::Val{Inf}) method.

StableRNGs 0.1.1 is the minimal mechanical fix for that ambiguity. This PR intentionally requires 1 instead: 1.0.0 was already available about 4.5 months before Catalyst first declared StableRNGs as a test extra, and test/extensions/Project.toml already requires StableRNGs 1.0.4. Root tests use the public StableRNG API rather than the removed implementation name LehmerRNG, so retaining the pre-1.0 line provides no useful transition window. The existing ReactionSystem test directly exercises the failing behavior, so this compat-only correction does not add a redundant dependency-version assertion.

Local validation

The exact runs used Julia 1.10.11, General ebea3c922b48a58438335288df661a3b4b2f85ae, julia-actions/julia-downgrade-compat fab1defb76df9fd672f63c94df73ce131d32e134, and the production promotion helper from SciML/.github#119 head 4d16630091d8a7c4397f0fe3653d88beaad7b15c.

  • Clean master selected StableRNGs 0.1.0. Reaction Structure passed 99/99, then ReactionSystem Structure stopped at the sampler ambiguity after 13 passes and one error. The locked manifest remained unchanged at SHA-256 79d72ab1381f570ff3c56f2b3d19630d46ae6aefe2710afa278f96e75b975382.
  • Focused Julia 1.10 boundary probes with exact StableRNGs 0.1.0, 0.1.1, and 1.0.0 confirmed that 0.1.0 errors while both 0.1.1 and 1.0.0 produce the expected deterministic sample. The v1 floor is therefore a conservative stale-major retirement, not a claim that v1 contains the first fix.
  • This branch selected StableRNGs 1.0.0. Reaction Structure passed 99/99 and ReactionSystem Structure passed 419 tests with two existing broken tests. The full Modeling group then reached the seven clean-main unexpected passes already fixed independently by Activate corrected conservation-law tests #1512.
  • Layering only Activate corrected conservation-law tests #1512's seven assertion activations for validation made Conservation Laws pass 249 tests with 17 existing broken tests, and all remaining Modeling groups through CRN Theory passed. The subsequent Simulation failure is the identical clean-main missing SciMLBase import already fixed independently by Import SciMLBase directly in module-qualified tests #1514. The candidate manifest stayed byte-identical through build and test at SHA-256 0fac799e57bf1dde580f0460e7756cf570e78a17bacc6d38c110ef40fd26d7e3.
  • TOML parsing, git diff --check, and the one-line scope check passed. Repository-wide Runic reproduced Catalyst's existing broad formatting baseline tracked in Runic 1.7.0 reports 74 unformatted files on master #1518; this PR changes no Julia source.

The temporary #1512 validation changes and generated manifest were removed before committing; the branch contains only the StableRNGs compat entry.

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

Copy link
Copy Markdown
Member Author

Validation scratchpad for 66980a7dbe1f8f1913d7e7327615520b3d3c6b0a:

  1. Reproduced the current-master boundary under the exact corrected old-style-extra workflow: StableRNGs 0.1.0 errors in the existing ReactionSystem test with the Julia 1.10 Random.Sampler ambiguity.
  2. Added only StableRNGs = "1"; the same graph selected 1.0.0 and the affected ReactionSystem suite passed 419 tests with two existing broken tests.
  3. Ran the official GROUP=All entrypoint. The branch progressed to the known seven clean-main unexpected passes fixed by Activate corrected conservation-law tests #1512. A validation-only layer of Activate corrected conservation-law tests #1512 made Conservation Laws pass 249 tests with 17 existing broken tests and completed the Modeling group; the next error was the clean-main missing import fixed by Import SciMLBase directly in module-qualified tests #1514.
  4. Confirmed the locked candidate manifest stayed byte-identical through build/test at 0fac799e57bf1dde580f0460e7756cf570e78a17bacc6d38c110ef40fd26d7e3, restored the original Project bytes, removed all validation-only changes, parsed the final TOML, and ran git diff --check.
  5. Ran repository-wide Runic 1.7. It reproduces Catalyst's tracked clean-main formatting baseline (Runic 1.7.0 reports 74 unformatted files on master #1518); this PR changes no .jl files.

An independent clean-master reproduction/history trace is running in parallel. I will add its exact introducing-commit and boundary result here when terminal, then classify hosted checks after the repository's normal CI window.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Independent clean-master audit is terminal:

  • Scope: Catalyst 730c79ea1874bb86dfdab80d618e333dacfc03b5, General ebea3c922b48a58438335288df661a3b4b2f85ae, julia-downgrade-compat fab1defb76df9fd672f63c94df73ce131d32e134, the production Update readme #119 helper, and Julia 1.10.11 in a separate clean worktree/depot/TMPDIR.
  • The promoted clean-master graph resolved StableRNGs 0.1.0 (edc6c932). Reaction Structure passed 99/99; ReactionSystem Structure then reproduced the line-207 Random.Sampler ambiguity with 13 passes and one error.
  • Exact boundary probes show 0.1.0 errors, while 0.1.1 (705f878) and 1.0.0 (3be7d49) both return the deterministic sample [2, 4, 2, 2, 9, 6]. Thus 0.1.1 is the narrow mechanical boundary and this PR's v1 requirement is intentionally conservative.
  • The conservative retirement is supported by history: StableRNGs 1.0.0 predates Catalyst's first valid StableRNGs test extra by about 4.5 months; Catalyst tests use the public StableRNG API; and test/extensions/Project.toml already requires 1.0.4.
  • Equivalent Catalyst history tracing identifies d1649d6525ba5d3b894d70776d2efb97edf87fc4 as the introducing valid Project commit. The preceding commits first changed the tests/range sample and then added only the target entry, leaving an invalid intermediate Project until d1649d6525 added the unbounded extra.
  • The independent v1 candidate passed ReactionSystem Structure 419 tests with two existing broken tests and every Modeling set through Reaction Balancing, then stopped only at the known Activate corrected conservation-law tests #1512 conservation-law stale markers: 242 pass, seven unexpected-pass errors, and 17 existing broken tests.

The independent trap restored the original Project byte-for-byte and left its worktree clean. Combined with the validation-only #1512 layer already recorded above, this independently isolates the one-line StableRNGs floor from current-master test failures.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Terminal CI classification for exact head 66980a7dbe1f8f1913d7e7327615520b3d3c6b0a:

The exact promoted minimum graph was also exercised locally on Julia 1.10. It selected StableRNGs 1.0.0; ReactionSystem Structure passed 419 tests with two existing broken tests. With only #1512's independent validation assertions layered temporarily, Conservation Laws passed 249 tests with 17 existing broken tests, and the Modeling group completed through CRN Theory. The candidate manifest remained byte-identical. Those validation-only changes and the generated manifest were removed, leaving the branch's one-line StableRNGs compat change isolated from every terminal failure above.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 22, 2026 07:48
@ChrisRackauckas
ChrisRackauckas merged commit e5fd1da into SciML:master Jul 22, 2026
18 of 22 checks passed
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.

2 participants