Repository navigation
OptimizationMOI: make implicit imports explicit - #1401
ChrisRackauckas-Claude wants to merge 6 commits into
Conversation
Follow the OptimizationNLopt pattern (SciML#1398): import each used name from its owner module and drop the no_implicit_imports broken marker. Keep reinit! so OptimizationMOI.reinit! continues to resolve for callers and tests. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/qa-hygiene/jobs/moi-imports/log.txt on amdci2
Independent review (Devin CLI 3000.11.3, model fusion-claude-opus-5-5-high-sidekick-swe-2-medium): CHANGES, risk medium. Full reviewVERDICT: CHANGES PR: #1401 — "OptimizationMOI: make implicit imports explicit" (head 1a26377). It doesn't link an issue or a tracking issue. Blocking findings
Non-blocking findings
What I ranAll runs used Julia 1.12.7 with
What I did not verify
🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (review), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
Resolve the OptimizationMOI import-block conflict: import `parameter_index`, `parameter_values` and `variable_index` from SymbolicIndexingInterface (used unqualified since SciML#1364) and drop the `SciMLStructures` import, which master removed from `[deps]`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.301 Agent-Model: claude-opus-5-5 Agent-Session: local session ID c5db64e8-0d72-4216-9d73-f5e719f32980 (headless claude -p, no URL)
Import `init`, `solve` and `solve!` from SciMLBase next to `reinit!` so `OptimizationMOI.solve`/`.solve!`/`.init` keep resolving: downstream code calls them through the OptimizationMOI namespace. A Core test exercises all four through that namespace. Remove the now-unused `Reexport` from `[deps]` and `[compat]`, delete the comment that described the absent re-export, and prune the QA ignore entries for names OptimizationMOI no longer imports (`parameters`, `toexpr`, `unknowns`, `varmap_to_vars`). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.301 Agent-Model: claude-opus-5-5 Agent-Session: local session ID c5db64e8-0d72-4216-9d73-f5e719f32980 (headless claude -p, no 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 01a15cef-d3c5-7e01-9f98-7fc338718267 (no session URL)
Import opnorm for runtime symbolic coefficient evaluation and cover analytic objective and constraint solutions with repeated solves and cache preservation. 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 01a15cef-d3c5-7e01-9f98-7fc338718267 (no session URL)
Retain computational export namespaces alongside explicit static imports. Bind SymbolicUtils directly and cover registered norm, tr, det, and rank coefficients with analytic solutions, repeated solves, and cache assertions. Record the generated-expression import constraint in local agent guidance. 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 01a15cef-d3c5-7e01-9f98-7fc338718267 (no session URL)
OptimizationMOI now imports MathOptInterface, OptimizationBase, SciMLBase, SciMLStructures, SparseArrays, SymbolicIndexingInterface, Symbolics, and LinearAlgebra by name (
using X: a, b), including the symbols the implementation uses from each owner. The unusedusing Reexportwas dropped. The QA suite no longer marksno_implicit_importsas broken.reinit!is kept as an explicit SciMLBase import (with a stale-ignore entry) soOptimizationMOI.reinit!continues to resolve for callers and tests;MOI,MOIOptimizationCache, andMOIOptimizationNLPCacheremain available.Verification
Commands ran from
lib/OptimizationMOI, withulimit -n 65536and the Julia depot /TMPDIRisolated under this job directory.Baseline QA (before changes):
Output tail:
Quality Assurance | 20 1 21 2m32.3s;Testing OptimizationMOI tests passed.QA after change (same commands): output tail:
Quality Assurance | 21 21 2m34.6s;Testing OptimizationMOI tests passed. The previously brokenno_implicit_importscheck now runs and passes.Core:
Output tail:
Core | 40 2 42 4m49.5s;Testing OptimizationMOI tests passed(the two broken cases are pre-existing@test_brokenreinit cases).Runic:
julia --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/qa/qa.jl— exit 0.typos:
typos lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/qa/qa.jl— exit 0.Scanned
lib/,test/, anddocs/for qualifiedOptimizationMOI.xuses. Kept:MOI(const alias),MOIOptimizationCache,MOIOptimizationNLPCache, andreinit!.Not verified: CI, the full Optimization.jl monorepo suite, and downstream packages.
Follow-ups (not in this PR)
Left untouched on purpose (same as the existing QA ignore lists):
@syncvia-owners access:Threads.@syncis reported as accessingBase.@syncviaBase.Threads; still ignored underall_qualified_accesses_via_owners/all_qualified_accesses_are_public. Fix later by importing@syncfromBase(or equivalent) without changing call sites in this sweep.publicdeclarations belong in MathOptInterface / OptimizationBase / SciMLBase / SciMLStructures / SymbolicUtils, not here):ALMOST_DUAL_INFEASIBLE,ALMOST_INFEASIBLE,ALMOST_LOCALLY_SOLVED,ALMOST_OPTIMAL,AbstractNLPEvaluator,AbstractOptimizationCache,AbstractOptimizer,BarrierIterations,CachingOptimizer,Code,DEFAULT_VERBOSE,DUAL_INFEASIBLE,EqualTo,GetAttributeNotAllowed,GreaterThan,INFEASIBLE,INFEASIBLE_OR_UNBOUNDED,INTERRUPTED,INVALID_MODEL,INVALID_OPTION,ITERATION_LIMIT,Integer,LOCALLY_INFEASIBLE,LOCALLY_SOLVED,LessThan,MAX_SENSE,MEMORY_LIMIT,MIN_SENSE,NLPBlock,NLPBlockData,NLPBoundsPair,NODE_LIMIT,NORM_LIMIT,NUMERICAL_ERROR,OBJECTIVE_LIMIT,OPTIMAL,OPTIMIZE_NOT_CALLED,OTHER_ERROR,OTHER_LIMIT,ObjectiveFunction,ObjectiveSense,ObjectiveValue,OptimizationState,OptimizationStats,OptimizerWithAttributes,RawOptimizerAttribute,ReInitCache,ResultCount,SLOW_PROGRESS,SOLUTION_LIMIT,ScalarAffineFunction,ScalarAffineTerm,ScalarQuadraticFunction,ScalarQuadraticTerm,Silent,SolveTimeSec,TIME_LIMIT,TerminationStatus,TerminationStatusCode,TimeLimitSec,Tunable,UniversalFallback,Utilities,VariableIndex,VariablePrimal,VariablePrimalStart,ZeroOne,__init,__solve,_check_and_convert_maxiters,_check_and_convert_maxtime,_process_verbose_param,add_constraint,add_variables,allowscallback,canonicalize,constraint_expr,empty!,eval_constraint,eval_constraint_jacobian,eval_constraint_jacobian_product,eval_constraint_jacobian_transpose_product,eval_hessian_lagrangian,eval_objective,eval_objective_gradient,features_available,get,get_observed,get_p,get_paramsyms,get_syms,hessian_lagrangian_structure,initialize,instantiate,instantiate_function,is_empty,jacobian_structure,objective_expr,optimize!,requiresconshess,requiresconsjac,requiresgradient,requireshessian,set,supports,supports_incremental_interface,supports_opt_cache_interface,supports_sense.Please ignore this draft until reviewed by @ChrisRackauckas.
Risk assessment
OptimizationMOI.MOI, cache types,OptimizationMOI.reinit!) still resolve. Names that were only incidentally reachable through old blanketusing(e.g. other SciMLBase exports) no longer are; nothing inlib/,test/, ordocs/uses them, but downstream code spelling them that way would break.Cursor Agent CLI 2026.10.01-14929f9 (model: auto); transcript:
Made with Cursor
Review findings addressed
Head
d766b227f: a merge of current master, then one fix commit. It addresses the Claude Code / claude-opus-5-5 review (CHANGES on1a263777) and the Devin / SWE-2 Fusion review posted as a PR comment.parameter_index,parameter_valuesandvariable_indexare now imported from SymbolicIndexingInterface (used unqualified since OptimizationMOI/OptimizationBase: expression graph for array constraints; fix SymbolifiedExprs MethodError #1364), andusing SciMLStructuresis dropped because master removed it from[deps]. On the merged tree,ExplicitImports.explicit_imports_nonrecursive(OptimizationMOI)returns[].OptimizationMOI.solve/.solve!/.initstopped resolving (Devin, blocking). Fixed:init, solve, solve!are imported from SciMLBase next toreinit!and listed in theno_stale_explicit_importsignores. A new Core testset, "common interface through the OptimizationMOI namespace", callsOptimizationMOI.solve,OptimizationMOI.initandOptimizationMOI.solve!the way downstream code does, and checks thatOptimizationMOI.reinit!is defined.Reexportis a stale dependency. Fixed: removed from[deps]and[compat].reinit!only for the tests; switch them toSciMLBase.reinit!. Not adopted. This conflicts with finding 2:reinit!is part of the same common-interface set that downstream code reaches asOptimizationMOI.<name>, so it stays withinit/solve/solve!and has its own test. The two@test_brokenreinit blocks are unchanged.@reexport, and the Reexport dependency is now gone too.OptimizationMOIno longer importsparameters,toexpr,unknownsorvarmap_to_vars, so theirno_stale_explicit_importsignores and theall_explicit_imports_are_publicignore were removed. QA still passes.evalnamespace insrc/moi.jl(Devin, non-blocking). No code change: on current master there is no longer a behaviour difference. I solved a probe (c*x^2 - 2xwith HiGHS, wherecisnorm(p),dot(p, p),sum(p),p[1] + p[2]orsqrt(a), withp = [3, 4]anda = 4) against both master and this branch, and the results were identical. The array-parameter calls throwMalformedExprExceptionon both, because the whole-array symbolpis not substituted after OptimizationMOI/OptimizationBase: expression graph for array constraints; fix SymbolifiedExprs MethodError #1364. The scalar cases give the correct minimiser on both.OptimizationMOI.<name>are incidental leaks of the old blanketusing, for exampleOptimizationMOI.AutoForwardDiff,OptimizationMOI.MinSenseandOptimizationMOI.norm. None of them are documented OptimizationMOI API. The Devin review's GitHub code search found downstream uses only ofsolve,solve!andinit, so I treat this as non-breaking. Whether that holds is Chris's call.Verification (head
d766b227f, fromlib/OptimizationMOI)UndefVarError: `solve` not defined in `OptimizationMOI`andUndefVarError: `init` not defined in `OptimizationMOI`(| Error 2 Total 2). With the fix it passes:| Pass 3 Total 3.OPTIMIZATION_TEST_GROUP=Core julia +release --project -e 'using Pkg; Pkg.test()'(1.13.0):Core | 59 2 61 2m59.6s, tests passed. The 2 broken are the existing@test_brokenreinit blocks. Julia 1.10 (+lts):Core | 59 2 61 2m41.8s, tests passed.OPTIMIZATION_TEST_GROUP=QA:Quality Assurance | 21 21on 1.13.0 and| 19 19on 1.10. Tests passed on both.julia --project=@runic -m Runic --checkon the changed.jlfiles: exit 0.typoson the changed files: exit 0.🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID c5db64e8-0d72-4216-9d73-f5e719f32980 (headless, no URL)
Risk assessment (independent review, codex-cli gpt-6.1-sol, reviewed head d766b22)
JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_DEPOT_PATH="<scratch dir>/review-depot:$HOME/.julia" TMPDIR="<scratch dir>" OPTIMIZATION_TEST_GROUP=Core julia +release --project=repo/lib/OptimizationMOI -e 'using Pkg; Pkg.test()'on Julia 1.13.2 and observed 59 pass, 2 broken, 61 total, exit 0 (core.log). This includes the added namespace regression tests and the array/system expression tests. WithOPTIMIZATION_TEST_GROUP=QA, I observed 21/21 pass, exit 0 (qa-retry.log). The initial QA attempt errored before assertions because SciMLTesting's cleanup helper tried to write shared dependency sources outside the writable workspace; copying affected sources into the local depot allowed the unchanged tests to run.git diff origin/master --checkpassed. At both CI checks, all 14 reported checks were pending, with no failed jobs to inspect on this head. Relevant runs: https://github.com/SciML/Optimization.jl/actions/runs/38913070664 (sublibraries), https://github.com/SciML/Optimization.jl/actions/runs/38913069592 (downstream), https://github.com/SciML/Optimization.jl/actions/runs/38913069805 (documentation). I read the latest default-branch failed logs: https://github.com/SciML/Optimization.jl/actions/runs/38854342799 fails resolving TimerOutputs in ModelingToolkit downstream, and https://github.com/SciML/Optimization.jl/actions/runs/38854342782 fails resolving Tulip in documentation. These establish baseline failures, not outcomes for this pending head.🤖 Posted by an AI agent — harness: codex-cli · model: gpt-6.1-sol (independent reviewer; appended by Claude Code 2.1.301 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq
Fresh independent review of d766b22
CHANGES/highH1. Restricting LinearAlgebra imports removes opnorm from the namespace used to evaluate runtime symbolic coefficient expressions. A registered public symbolic model errors on head twice with UndefVarError: opnorm not defined; identical dependency-matched merge base and current master pass6/6 against independent bounded-linear-objective roots0/1 and objectives0/-2. Preserve runtime evaluation and add a permanent official regression. Static namespace3/3 and QA21/21 do not cover dynamic eval. Separate confirmed default Core literal_pow failures occur on clean current master too: head52pass4errors1broken versus master55pass4errors1broken, production versions matched. A separate baseline investigator is queued; these failures are distinguished from the PR-only opnorm regression. Existing initial Cursor Auto attribution lacks actual resolved model/session and needs recovery or explicit unknown model. No local full downstream/docs/GPU/LTS run; historical Core pass totals not reproduced with current dependencies. Supplied intake retained prior labels; own failing-head/passing-base execution supports H1.
Risk assessment
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a154f0-8986-78e1-8af2-1119e8cdea4a (no session URL)
Assigned correction of d766b22
This correction is queued to a fresh Codex CLI worker, model
gpt-6.1-sol, under the SciML submaster’s pipeline ownership. Scope: Fix reviewer-reproduced public dynamic opnorm errors with before/after analytic tests. Preserve public API and dependency semantics. Do not combine literal_pow1435, constant-offset1434, reinit1383/1400 or Manopt baseline failures; each has a separate investigation/repair. Existing H1/API decision remains Chris.The revision must preserve existing assertions and demonstrate the concrete failing-before/passing-after behavior using independent references. Default-branch failures, API or compatibility-policy decisions, and unavailable hardware remain separate findings. No test suppression, unvalidated push or unrelated repair.
The worker does not merge, approve or close PRs. Any pushed revision needs a fresh independent counted review; existing source reviews are not silently repinned. This assignment does not change the PR’s risk level or resolve any finding.
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a154f0-8986-78e1-8af2-1119e8cdea4a (no session URL)
Fix by Codex gpt-6.1-sol (head 343b30a)
Restores the explicit
LinearAlgebra.opnormimport used by runtime symbolic coefficient evaluation. Its static stale-import exception is documented and backed by permanent Core regressions. The fix changes no dependency declarations, compatibility bounds, or solver signatures. A normal merge incorporates latest default, including its separately landed integer-power repair; both existing histories are retained.The registered symbolic models cover objective and constraint coefficients. Independent references use
opnorm(a) = abs(a)for scalar parameters: minimizing(abs(a)-2)xover[0,1]gives endpoints0/1and objectives0/-2; minimizing-xwithabs(a)x <= 1givesx = 1/2or1/4. Eight cases alternate parameters on reused optimizers, solve each cache twice, and check that cached expressions and parameters remain unchanged. The same test file passed 96/96 against clean latest-default source; the listed dependency versions matched.Verification
Julia 1.13.1,
JULIA_NUM_THREADS=4,JULIA_NUM_PRECOMPILE_TASKS=1,OPENBLAS_NUM_THREADS=1,OMP_NUM_THREADS=1,MKL_NUM_THREADS=1. Temporary storage, package writes, and formatter environment were isolated to this job. Commands below usejuliafor the juliaup launcher;FORMAT_ENVidentifies the isolated formatter environment.Official Core command, first with the import absent, then with it restored:
OPTIMIZATION_TEST_GROUP=Core timeout 3600 julia +1.13 --project=lib/OptimizationMOI -e 'using Pkg; Pkg.test()'Before, exit 1; all eight errors were the new regression:
After, exit 0; includes all 96 new assertions:
The two broken reinit tests are unchanged. Before/after listed dependency versions matched.
Initial QA with
OPTIMIZATION_TEST_GROUP=QAerrored in JET/Revise's folder monitor (EMFILE): 20 pass, 1 error. Clean latest default reproduced the same error: 19 pass, 1 error, 1 existing broken import check. Using Revise's documented polling mode preserves all QA assertions and JET analysis:JULIA_REVISE_POLL=1 OPTIMIZATION_TEST_GROUP=QA timeout 3600 julia +1.13 --project=lib/OptimizationMOI -e 'using Pkg; Pkg.test()'Formatter, spelling, and whitespace checks exited 0:
timeout 3600 julia +1.13 --project="$FORMAT_ENV" -m Runic --check lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/core_tests.jl lib/OptimizationMOI/test/dynamic_coefficients_tests.jl lib/OptimizationMOI/test/qa/qa.jl typos lib/OptimizationMOI/Project.toml lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/core_tests.jl lib/OptimizationMOI/test/dynamic_coefficients_tests.jl lib/OptimizationMOI/test/qa/qa.jl git diff --checkLatest-default CI also has the Tulip documentation resolver failure, TimerOutputs downstream resolver failure, and Reactant downgrade
ConcretePJRTArraycopy error. These remain separate baseline findings; Reactant assertion totals differ between runs. Not verified locally: documentation build, downstream execution, full monorepo, LTS/prerelease, or GPU paths. The broader import-surface/API and risk disposition remains with the maintainer. Historical source reviews remain tied to their reviewed heads.Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a15cef-d3c5-7e01-9f98-7fc338718267 (no session URL)
Executed findings at head 343b30a — session 01a15db9-4a75-7f13-8f4d-f053f9b3ab83
The
opnormregression is fixed, but runtime coefficient evaluation also needsnorm,tr,detandrank. The public symbolic coefficient path converts function objects to unqualified symbols and evaluates them inside OptimizationMOI. At this head all four functions raiseUndefVarError; with exactly the same 223 external dependency entries, clean master passes all 24 analytic assertions. The PR probe produces eight errors. Preserving previously working coefficient evaluation and adding permanent discriminating tests remain blocking findings.Risk assessment
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a154f0-8986-78e1-8af2-1119e8cdea4a (no session URL)
Fix by Codex gpt-6.1-sol (head 03ba105; author session 01a15cef-d3c5-7e01-9f98-7fc338718267)
Retains the baseline exported runtime namespaces alongside the explicit imports used by static code. Numeric coefficient calls keep their baseline evaluation context across all seven computational namespaces; the evaluator and expression representation are unchanged.
SymbolicUtilsis imported directly with the same constantSUalias so the strict import checks identify its owner. No dependency, compatibility, solver-signature, docstring, or public-definition changes. Local agent guidance records the recurring generated-expression import constraint.The permanent Core loop adds
norm,tr,det, andrankat scalar parametersa=3anda=0. Independent references arenorm(a)=abs(a),tr(a)=det(a)=a, and scalar rank equal to zero at zero and one otherwise. Minimizing(f(a)-2)xon[0,1]givesx=0/1and objectives0/-2; rank uses offset1/2and objectives0/-1/2. All originalopnormcases and analytic values remain, as do repeated solves and cached-expression/parameter preservation assertions. No assertion, tolerance, skip/broken marker, or QA exception was changed.Before/after verification
Julia 1.13.1; four Julia threads, one precompile task, BLAS/OMP/MKL limited to one thread,
ulimit -n 65536. Temporary storage, depots, controls, and formatter environment were job-local. The existing admitted slot and budget/CPU/memory/disk gates passed before validation phases; commands ran sequentially using the unchanged official harness.JULIA_REVISE_POLL=1is process-local for the previously reproduced file-watch resource issue.Exact official Core command, with added tests first on the unfixed source and then on the correction:
OPTIMIZATION_TEST_GROUP=Core timeout 3600 julia +1.13 --project=lib/OptimizationMOI -e 'using Pkg; Pkg.test()'Before, exit 1; two
UndefVarErrors each fornorm,tr,det, andrank:After, exit 0:
The two broken reinit cases are unchanged. Listed official Core dependency versions match before/after. Separate clean-source controls compare all 193 external manifest entries exactly, excluding the two in-repository packages whose source identities are controlled: reviewed head
343b30a0bgives 96 pass / 8 errors; latest defaultd31d61acfgives 192/192 pass; the final corrected source gives 192/192 pass.The first namespace-restoration QA attempt caught the implicit
SymbolicUtilsbinding (20 pass / 1 error). The direct owner binding corrects it. Final QA uses the same assertion set:JULIA_REVISE_POLL=1 OPTIMIZATION_TEST_GROUP=QA timeout 3600 julia +1.13 --project=lib/OptimizationMOI -e 'using Pkg; Pkg.test()'Final formatting, spelling, and whitespace commands exited 0 (
FORMAT_ENVidentifies the isolated formatter environment):timeout 3600 julia +1.13 --project="$FORMAT_ENV" -m Runic --check lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/dynamic_coefficients_tests.jl typos lib/OptimizationMOI/AGENTS.md lib/OptimizationMOI/Project.toml lib/OptimizationMOI/src/OptimizationMOI.jl lib/OptimizationMOI/test/core_tests.jl lib/OptimizationMOI/test/dynamic_coefficients_tests.jl lib/OptimizationMOI/test/qa/qa.jl git diff --checkRead actual failed logs on the reviewed head and matching latest default: docs fail on Tulip resolution, ModelingToolkit downstream fails on TimerOutputs resolution, and Reactant downgrade errors on
ConcretePJRTArraycopying. These baseline investigations remain separate. Not verified locally: full monorepo, downstream execution, docs build, LTS/prerelease, GPU, or completed remote CI. No rendered docs or declared public API was changed by this correction. Existing higher H1/API and originating-attribution holds remain outstanding; no historical metadata or signed ancestry was rewritten.Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a15cef-d3c5-7e01-9f98-7fc338718267 (no session URL)
Risk assessment (independent review, Codex CLI (gpt-6.1-sol), local job oss-reviews-2026-10-21-SciML-Optimization.jl-1401 (no session URL), head 03ba105)
Executed review notes (head 03ba105)
VERDICT: MERGE
RISK: low (L7)
SUMMARY: The final import refactor preserves the runtime coefficient namespace and solver interface, strengthens tests, and has no identified PR-specific regression.
Findings
No blocking or should-fix source findings.
Evidence
Reviewed
03ba105a936e73057c1d6c4ca77b5468caf86f5bagainst merge based31d61acffc29ce84b2439bb421f3c524f2d9e65. Risk was assessed from the diff before reading the PR body's ratings. Matching criteria: L7 (small internal import refactor, exercised by Core/QA), L2 (new analytic and namespace assertions; strict import check enabled), L4 (mechanical alias/import cleanup), L1 (local agent guidance). Highest: low (L7). This affects the OptimizationMOI adapter's imports, not core OptimizationBase solver dispatch or numerical algorithms. No new dependency, licence, compat restriction, exported name, solver signature, or documented behavior changes. The unused Reexport dependency is removed. The older revisions' missing-function failures do not describe this head.The regression expectations are independent analytic references: scalar norm/opnorm are absolute value, trace/determinant equal the scalar, rank is zero at zero and one otherwise; bounded linear objectives and constraints then determine the expected endpoints/objectives. Deep copies check expression preservation across repeated solves. Existing assertions and the two pre-existing broken reinit tests are unchanged. The new stale-import ignores cover intentionally retained callable interface names and dynamic
opnorm, rather than suppressing runtime failures.Local runs used Julia 1.12.7,
JULIA_NUM_THREADS=4,JULIA_DEPOT_PATH="$PWD<local path>,TMPDIR="<scratch dir>", andtimeout 2400. All projects/source controls were undertmp; repository sources were unchanged.julia --compiled-modules=existing --project=tmp/probe-env tmp/audit.jlexited 0 (audit log). This compares head bindings against the baseline seven blanket imports, then includes the unmodified new coefficient test file:julia --compiled-modules=existing --project=tmp/base-env tmp/run-coefficients.jlexited 0:runtime symbolic coefficients | 192 192 1m38.5s(base log). The package source is the exact merge-base archive.The same command with
--project=tmp/restricted-envexited 1:runtime symbolic coefficients | 96 8 104 1m41.3s, with twoUndefVarErrors each fornorm,tr,det, andrank(negative-control log). This uses the preceding restricted-import source from343b30a0b27551157574ef5babd90d16cb359aad, with the current regression file unchanged. All 222 manifest entries outside OptimizationMOI match exactly across head, base, and this negative control. Thus the new cases fail before the repair and pass after it; against the actual merge base they pass, as expected for a behavior-preserving refactor.Official local validation used the unchanged harness, with
JULIA_NUM_PRECOMPILE_TASKS=4:ulimit -n 65536was set for QA; packages with broken relative[sources]references were copied into the scratch depot first, so SciMLTesting's temporary cleanup could not rewrite shared dependency sources. QA exited 0 (QA log):Core exited 0 (Core log) after dependency precompilation:
The two broken cases are unchanged
@test_brokenreinit tests. No local assertion failed.Remote evidence was read with
gh run view <run> --repo SciML/Optimization.jl --log[-failed](read-only), saved undertmp/ci-*.logandtmp/base-ci-*.log:Core | 325 2 327 2m40.5s;Testing OptimizationMOI tests passed. The log checks out merge700463aof the reviewed head into the exact merge base. Supplied rollup also reports Core success on LTS/prerelease and OptimizationMOI downgrade success.Quality Assurance | 21 21 1m10.0s;Testing OptimizationMOI tests passed.gh api .../actions/runs/<run> --jq '{head_sha,head_branch,conclusion,html_url}': documentation fails resolving Tulip (head, base); ModelingToolkit downstream fails resolving TimerOutputs (head, base); Reactant downgrade reports`copy` on `ConcretePJRTArray` for non-concrete eltype is not implementedand 82 passed / 3 errored on both (head, base). These are baseline failures, not evidence of this PR breaking those paths.git -C repo diff d31d61ac HEAD --checkexited 0;git -C repo status --porcelain=v1returned no output. Repository files were not edited.Not verified
No local full-monorepo/downstream/documentation/GPU suite or separate LTS/prerelease execution; their coverage is limited to the inspected CI evidence. Existing baseline failures and pre-existing broken reinit behavior are not repaired by this PR.
🤖 Posted by an AI agent — harness: Codex CLI · model: gpt-6.1-sol (independent reviewer; appended by Antigravity CLI · model: gemini-4-argon-high)
Conversation: local job oss-reviews-2026-10-21-SciML-Optimization.jl-1401 (no session URL)