Skip to content

Fix DynamicalDDEFunction constructors - #1512

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-dynamical-dde-constructor
Oct 31, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-dynamical-dde-constructor

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

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

What changed and why

Fix all three type/default-argument errors in the DynamicalDDEFunction constructor paths: inherit initialization_data from f1, retain the requested specialization marker, and include the sparsity field type in the keyword-only constructor. Together these errors made explicit specialization fail before the function container could be constructed.

git bisect identified b7468f9 as the first revision producing the undefined-f error. The regression tests cover FullSpecialize, NoSpecialize, initialization-data propagation, and the keyword-only constructor.

Verification

Failing before

On unmodified master at 2b711f36b1cd93d5da098997081a416bcec1e07b, the new test failed with:

DynamicalDDEFunction constructors: Error During Test
UndefVarError: `f` not defined
Test Summary:          | Pass  Error  Total
Problem building tests |  124      1    125

Command:

GROUP=Core julia +1.10 --project=. -e 'using Pkg; Pkg.test()'

Passing after

The same command on this branch passed, including:

Test Summary:          | Pass  Total
Problem building tests |  130    130
Test Summary: | Pass  Total
Remake        | 4430   4430
Testing SciMLBase tests passed

Additional checks:

GROUP=QA julia +1.10 --project=. -e 'using Pkg; Pkg.test()'
QA | 49 passed / 49 total

julia +1.12 --project=.runic-env --startup-file=no -m Runic --check --diff src/scimlfunctions.jl test/problem_building_test.jl
exit 0 (Runic 1.7.0)

typos --diff
exit 0

git diff --check
exit 0

Not verified

GROUP=Everything, downstream groups, and the documentation build were not run. This change does not touch documentation, docstrings, or public API declarations.

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Grok Build 1.0.70 grok-4.7 (head 4fba4a0)

Merged current master into agent/fix-dynamical-dde-constructor. The three DynamicalDDEFunction constructor corrections stay: initialization_data is read from f1, the explicit specialize parameter is kept on the specialized constructor, and the keyword constructor includes typeof(sparsity). The diff against master is those three lines plus the constructor test.

The August CI failures on this PR match the parent commit or a one-day downstream drift (UndefVarError: generate_DAENLStepData, a StochasticDiffEq DimensionMismatch, a NonlinearSolve resolver error, and a docs linkcheck 403 on Problem_Traits). Those jobs pass on current master. SciMLSensitivity Core2, SciMLSensitivity Core4, and Catalyst All/1 still fail on the latest master runs and were left unchanged.

Validation on Julia 1.10:

Unfixed constructors (the three lines reverted, test kept):

UndefVarError: `f` not defined
Test Summary:                     | Error  Total
DynamicalDDEFunction constructors |     1      1

Same test with the fix:

Test Summary:                     | Pass  Total
DynamicalDDEFunction constructors |    6      6

GROUP=Core julia --project=. -e 'using Pkg; Pkg.test()' passed, including:

Test Summary:          | Pass  Total
Problem building tests |  194    194
Test Summary: | Pass  Total
Remake        | 4605   4605
Testing SciMLBase tests passed

julia --project=@runic -m Runic --inplace src/scimlfunctions.jl test/problem_building_test.jl made no edits. typos on the diff against master exited 0.

GROUP=QA was run twice and failed while loading PythonCall (Fatal Python error: init_fs_encoding, codec search functions not registered). Current master CI QA is success (https://github.com/SciML/SciMLBase.jl/actions/runs/41053895140). This diff does not touch that extension. Downstream suites and the documentation build were not re-run locally.

Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).


🤖 Posted by an AI agent — harness: Grok Build 1.0.70 · model: grok-4.7
Conversation: local fixer job SciML__SciMLBase.jl__1512 (no session URL)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Reviewed head: 311b161; the PR head has since moved to 4fba4a0. This is not a review of the current head.

Risk assessment (independent review, Codex Desktop (Codex core 0.164.0-alpha.11.1) gpt-6.1-sol, slot 1, head 311b161)

  • Risk: low (L6: Repairs constructor exceptions with unchanged public signatures and regression evidence.)
  • Verdict: MERGE
  • Session: 01a18db8-25fc-7b72-9d35-a1341e0ae484
  • Blocking priorities: none

Review round 1, written by the reviewer named above (Codex Desktop (Codex core 0.164.0-alpha.11.1) / gpt-6.1-sol) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands.

Summary: Fixes missing sparsity/specialization type parameters and the undefined f reference in DynamicalDDEFunction constructors. The identical focused constructor test fails on the base and passes all six assertions at the reviewed head.

Blast radius: Explicitly specialized and keyword-only DynamicalDDEFunction construction.

Evidence: Local head: six assertions pass; recorded base: UndefVarError for f before the first assertion. Core CI also reports Problem building tests 130/130. The PR has older downstream/docs failures, including dependency/export/layout failures; the sampled recent default runs have some different failures, so a blanket pre-existing-failure waiver is not justified.

Blocking findings

None.

Non-blocking findings

None.

What I ran

gh pr view 1512 --repo SciML/SciMLBase.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,commits,statusCheckRollup
git fetch origin "+refs/pull/1512/head:refs/remotes/pr/1512" "master" "2b711f36b1cd93d5da098997081a416bcec1e07b"
git checkout --detach 311b161d4c0aa43f574e07e799e287c0c6f80c92
git rev-parse HEAD
git diff 2b711f36b1cd93d5da098997081a416bcec1e07b...HEAD
git diff --check 2b711f36b1cd93d5da098997081a416bcec1e07b...HEAD
git log -1 --no-merges --format=%B 311b161d4c0aa43f574e07e799e287c0c6f80c92
gh pr checks 1512 --repo SciML/SciMLBase.jl
gh pr view 1512 --repo SciML/SciMLBase.jl --json body,closingIssuesReferences

HEAD was verified equal to 311b161d4c0aa43f574e07e799e287c0c6f80c92. git diff --check exited 0. The diff was compared to the recorded live base through its merge base, not directly against unrelated base-only commits. Root/nested agent instructions and surrounding changed-code callers were inspected. Author metadata above is from the newest non-merge commit only; absent trailers are intentionally unknown.

Local Julia processes ran sequentially with JULIA_NUM_THREADS=4, OPENBLAS_NUM_THREADS=1, an isolated temporary directory and a task-owned first depot (existing global depot read as a fallback). Commands used julia --startup-file=no --compiled-modules=no --project=<isolated-environment> after Pkg.develop selected the exact checkout. Focused tests were extracted unchanged from the named committed testset except for explicitly described reviewer probes; full Pkg.test was not run. Machine-specific scratch paths are omitted to follow the review-file rule.
Local head, Julia 1.13.0, exit 0:

DynamicalDDEFunction constructors |    6      6  0.6s

Local base, Julia 1.13.0, exit 1:

UndefVarError: `f` not defined in `SciMLBase`
DynamicalDDEFunction constructors |     1      1  1.0s

Focused input: the testset DynamicalDDEFunction constructors from test/problem_building_test.jl.

CI inspection: gh run view <run-id> --repo SciML/SciMLBase.jl --log-failed, and for selected green jobs gh run view <run-id> --job <job-id> --repo SciML/SciMLBase.jl --log. Default-branch samples used gh run list --repo SciML/SciMLBase.jl --branch master --event push --limit 5 --json databaseId,conclusion,headSha,url,name; completed failing runs were read rather than assuming equivalence from status alone.

42 checks successful/skipped/neutral; 21 checks failed/cancelled/pending at the captured snapshot. These counts include external status checks.

Sampled current default-branch runs (status alone is not used to waive failures):

What I did not verify

No complete local Core/QA/docs or DDE integration run. Only the focused constructor regression was locally compared on head and recorded base; downstream compatibility remains subject to the listed checks.

This review continues the interrupted Codex session 01a18dad-6f75-7ae1-b6dc-3a84553833ec, retaining its exact-head checkouts, CI logs and sequential test evidence. The continuation session is 01a18db8-25fc-7b72-9d35-a1341e0ae484. Initial risk ratings were saved before author descriptions; those descriptions contained embedded earlier reviews, so complete prior-review blindness was not maintained. The initial findings were frozen before the explicit same-head review comparison; additional corroboration is identified as post-freeze. This limitation is disclosed rather than claiming full blind-first compliance.

🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74

Co-Authored-By: Chris Rackauckas <[email protected]>
The constructor corrections stay. This brings the branch onto current master so CI exercises the same tree the default branch uses.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Grok <[email protected]>
Agent-Harness: Grok Build 1.0.70
Agent-Model: grok-4.7
Agent-Session: local fixer job SciML__SciMLBase.jl__1512 (no session URL)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 31, 2026 11:15
@ChrisRackauckas
ChrisRackauckas merged commit e0256ee into SciML:master Oct 31, 2026
68 of 73 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