Repository navigation
Support independent trailing inputs in custom generated functions - #5303
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Accept extra_args in the public custom generator, retain standard argument layout, and keep trailing inputs separate from parameter metadata. Add the public docstring/rendered example and regressions; bump additive owner and umbrella versions together. Identical independent regression41passes104errors before to305passes after; 156 further independent controls pass. Official InterfaceII8071passes and2 existing broken assertions, QA54+21 and full rendered docs pass. The first HTTP429 docs failure and default QA resource failure remain disclosed. Implementation by Codex CLI0.163.0 / gpt-6-astra, local session 01a15da7-8f33-7880-9dd7-f9c69dd5b7b6 (no session URL). Independent source review: Codex CLI0.163.0 / gpt-6-astra, local session 01a15e02-b10f-7681-9944-7604d69ab59f (no session URL). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.163.0 Agent-Model: gpt-6.1-sol Agent-Session: local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL) Implementation-Agent-Model: gpt-6-astra Implementation-Agent-Session: local session 01a15da7-8f33-7880-9dd7-f9c69dd5b7b6 (no session URL)
This was referenced Oct 21, 2026
This branch has not been deployed
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.
generate_custom_functionaccepts independent symbolic inputs throughextra_args = (...). Generated functions receive them after the standard state, parameter, cache, and time arguments. Scalar and array inputs stay separate from MTKParameters, so callers can supply a step size or coefficient arrays without reproducing parameter-buffer layout or expression compilation.The parameter-buffer count also prevents distinct array cache arguments from contaminating repeated generation on the same system. The change includes regression tests, a docstring and rendered example, ModelingToolkitBase 1.78.0, ModelingToolkit 11.46.0, and the corresponding owner compat floor. No dependency is added.
Verification
Local validation uses Julia1.13.1, four Julia/precompile threads and BLAS/OMP1 in isolated package environments. Final formatting, spelling, QA, InterfaceII and full docs pass; the six changed files match the independently reviewed source.
The author ran the final expanded regression: 305/305 assertions pass. A fresh independent reviewer ran the identical frozen test against isolated base and candidate snapshots with matching normalized dependency locks:
Errors on base abort inner testsets, accounting for its lower reached-assertion count. The new extra arguments produce an unbound
dton the unextended base. The separate repeated-array-cache case gives 4 passes and 2UndefVarError: cache_berrors on base, versus 6/6 with the explicit parameter-buffer count alone. A separate minimal correction passes6/6 on that probe. The exact public probe also passes6/6 on historical parent6745da8d and gives4passes/2errors on its immediate child7d8b5e6c under the same normalized modern dependency graph. This identifies that trigger's source regression boundary under the tested graph, not every historical cache failure. The one-keyword repair is published separately as #5304 after complete local validation. Integration must retain its six assertions alongside this feature regression; an isolated integration copy retaining the exact six-assertion block now runs the identical complete official file: base110pass106errors→feature376/376. The copied 199-entry environments match outside source-owner paths/version labels. The published test file is unchanged; this is integration evidence for retaining both suites, not a claim that this branch already contains the standalone regression.The independent reviewer also ran 144/144 numerical/API controls and 12/12 name-collision controls: split and unsplit systems; time-dependent and time-independent calls; mixed scalar/vector/matrix state layouts; Float32/Float64 values and element types; matrix extras and outputs; callable/expression forms; module-local eval and RuntimeGeneratedFunctions; repeated generation and argument order; and names resembling internal sentinels. All 364 tracked files match the frozen candidate. Non-MTK dependency entries are identical; only snapshot paths and the intended MTK version changes differ.
Author official InterfaceII completed on Julia1.13.1:8,071 passes across29 testsets, two unchanged pre-existing broken assertions, zero failures/errors, exit0; Code Generation370/370. Its executed Julia body was
using Pkg; Pkg.test("ModelingToolkitBase")withGROUP=InterfaceIIin the resolved candidate environment, four Julia/precompile threads and BLAS/OMP1. The final log saysTesting ModelingToolkitBase tests passedand reports3619.19s (69.81% compilation). Both existing broken assertions in bvproblem.jl are byte-identical to base. Formatting, spelling and the rendered example passed. Official QA passed JET54/54 and Aqua21/21, exit0 (402.37s), using job-scoped JULIA_REVISE_POLL=1. The unchanged default attempt is retained: JET54/54 and Aqua20pass/1FolderMonitor EMFILE, exit1, despite a descriptor limit of1,048,576. The retry uses identical argv and assertions; only the documented monitoring transport changes, keeping file monitoring active. No host setting or dependency changes. The full unchanged docs retry passed with exit0, including HTML rendering; details follow. Minimum Julia/dependency combinations, GPU execution, downstream MethodOfLines correctness and full solver suites were not run. Separate construction benchmark measurements and their unresolved allocation increase are recorded below. No test is disabled, exception swallowed, assertion weakened, or QA exemption added.Full candidate docs command:
The unchanged retry ran12:12:50–12:44:14 UTC. Its built API page contains the executable example and output
[14.5, 10.0]. The first complete attempt exited1 solely on a GitHub HTTP429 link check and is retained. The retry uses the same source, command, configuration and checks; existing HTML-size warnings and local deployment-skipped notice remain visible. No links were ignored or warnings suppressed. This validates a local docs build, not deployment.The first reviewer numerical-control launch failed before assertions because its local environment contained an incorrectly transcribed RuntimeGeneratedFunctions UUID. The corrected UUID matches the existing Manifest; rerunning the unchanged script passes 144/144. That setup error is retained and is not a candidate defect.
CI findings under investigation
Final exact-head CI has92 successful checks,15 failures,1 cancelled and3 skipped checks, no pending jobs. Deterministic comparison classifies14 failing jobs as default-matching and two benchmark results as base-green: LTS resolver failure and its cancelled modern sibling. The initial LTS InterfaceII attempt had two existing-test DimensionMismatch errors (3 saved entries versus401); its unchanged-head targeted rerun passed1745 assertions with7 existing broken tests. No source fix was made or cause established. Corrected local official prefixes pass98/98 on base and403/403 on this head; the full local paired root group also passes: base1440assertions/7existingbroken and feature1745/7existingbroken, both exit0. Root verified all728 original source files unchanged and both actual330-entry sandbox graphs matching their prepared graphs outside local owner path/version labels. Coverage and CI child flags are enabled; local allow_reresolve=false preserves the matching graph, while CI usestrue. The initial dimension mismatch remains unexplained. The separately validated workflow remedy is draft #5305; its full LTS/modern pairs and shallow controls pass, with fresh low-risk review and higher provisional medium rating retained for Chris. No checks are suppressed and this draft is not merge-ready.
Measured allocation diagnosis
The author ran public AirspeedVelocity 0.6.6 with the unchanged complete benchmark script against clean207 and this exact3db commit on Julia1.10.12,1.13.1 and exact CI1.13.2. Both revisions and time/memory comparisons exited0; each result contains all nine leaves, including five load-time samples. Within each Julia version, proposed base/head graphs match outside source owners. The modern local-path setup also installs declared SciCompDSL/MLStyle/URIs, absent from the old URL setup; those old/new setup graphs differ.
LTS memory and allocation counts match across all nine leaves. Three independent reduced public DCMotor repetitions reproduce the larger1.13.1 gap: base1,660,072–1,678,584 bytes versus feature1,854,568–1,856,656 bytes. Ordered fingerprints match for all3unknowns,3equations,16ordinary parameters and59observed expressions.
A separate controlled investigation retained the entire feature and cache implementation in two owned source copies, changing only one diagnostic
Initialhash method. The selected recorded base/feature identity seeds were18446744070261915066 and18446744070076476326. All135 ordered parameter strings and hashes match the intended original endpoint in each run.The first pair exactly matches prior base/feature samples; the second remains separated and its high result exceeds the original feature range. The selected
Initialhash is sufficient to move the complete-feature Julia1.13.1 construction between these low/high allocation regimes. Profiles support a dictionary-layout path, with larger initialization buffers; they do not establish a general capacity mechanism or zero argument-assembly cost.Both simplified no-SciML dictionary controls were negative: bulk construction/copy costs4,536bytes for each hash set, and recursive size matches at every incremental prefix. No standalone reproduction of the full allocation gap was obtained. No production hash change is proposed. The exact1.13.2 ODEProblem residual of4allocations/128bytes and other measured differences remain unattributed; no performance-neutrality claim is made.
Investigator: Codex CLI0.163.0/gpt-6-astra, local session01a15f18-80b1-7292-978c-0abca1af8a90 (no session URL). A separate Codex CLI0.163.0/gpt-6-astra auditor, local session01a15efd-9ff8-7e81-80b8-97350637e4df (no session URL), verified all364 files in each intervention, exactly one injected line, all135 intended hashes,207-entry graphs,20 true exits/log hashes, negative controls and raw1.13.2 results. It rates the bounded hash-effect conclusion high confidence and the detailed dictionary mechanism moderate confidence, with no integrity or blocking finding. Nineteen diagnostic jobs exited0; one earlier probe failed because its script used an unavailable unqualified name, and its error/exit are preserved rather than counted as package evidence.
The public commands use the exact checked-out base/head trees and a common frozen head script:
Independent review
Fresh Codex CLI 0.163.0 / gpt-6-astra: SOURCE APPROVED, medium risk, high confidence, no blocking source findings. The provisional rating was recorded before author evidence. The reviewer independently executed the paired regression and 156 additional controls; author formatting/example logs were inspected. Official InterfaceII, QA and full rendered docs have since passed as recorded above. A separate fresh Codex CLI0.163.0/gpt-6-astra gate auditor (local session01a15e7b-a37f-7301-80a1-28771011ee7d) checked the raw successful docs log and rendered example, all364 tracked source bytes against the prior frozen candidate, the six-file diff and restored QA metadata. This closes the publication validation gates without repeating the earlier numerical/source review. This additive public API requires Chris's decision.
Reviewer: local session 01a15e02-b10f-7681-9944-7604d69ab59f (no session URL).
Links
Benchmark local-source repair: Fix LTS benchmarks with per-revision local sublibrary sources #5305
LTS InterfaceII investigation: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39602707659/job/119231087557
Benchmark resolution investigation: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39602706539/job/119230981260
Exact reviewed feature commit: 3db20da
Independent source and final gate review: Support independent trailing inputs in custom generated functions #5303 (comment)
Intended consumer: Fused in-place update! for staggered groups MethodOfLines.jl#723
Separate public ArrayMaker prerequisite: Make the validated ArrayMaker constructor public JuliaSymbolics/SymbolicUtils.jl#1169
Revise polling documentation: https://timholy.github.io/Revise.jl/stable/config/
Verified cache-regression parent: 6745da8
Verified cache-regression child: 7d8b5e6
Base source: 207f39e
Risk assessment
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol.
Implementation: Codex CLI 0.163.0, model gpt-6-astra.
Writer: local session 01a15da7-8f33-7880-9dd7-f9c69dd5b7b6 (no session URL).
Publication prepared by Codex CLI 0.163.0, model gpt-6.1-sol.
Conversation: local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL).