Skip to content

Add JET.jl static analysis tests#41

Closed
ChrisRackauckas-Claude wants to merge 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260102-041243
Closed

Add JET.jl static analysis tests#41
ChrisRackauckas-Claude wants to merge 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260102-041243

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

  • Add JET.jl as a test dependency with compat entry "0.9"
  • Create test/jet_tests.jl with static analysis tests for all line search algorithms
  • Tests ensure type stability is maintained for key functions

Details

I ran JET.report_package("LineSearch") and found the package is already well-typed with no issues. The existing codebase:

  • Uses @concrete macro from ConcreteStructs.jl for type-stable structs
  • Already has proper type annotations on struct fields
  • Uses function barriers and closures appropriately

The new JET tests cover:

  • NoLineSearch: Full @test_opt optimization test
  • LiFukushimaLineSearch: Full @test_opt optimization test
  • RobustNonMonotoneLineSearch: Full @test_opt optimization test
  • BackTracking: Error-only analysis (uses closures that capture variables from SciMLJacobianOperators, which JET cannot fully analyze for optimization)

Test plan

  • Run Pkg.test(; test_args=["jet"]) - all 4 JET tests pass
  • Verify no changes to existing functionality

Note: The existing Enzyme tests (AutoEnzyme()) have pre-existing errors unrelated to these changes.

cc @ChrisRackauckas

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment thread Project.toml Outdated
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Added Enzyme v1 exemption in commit b07be00.

Changes:

  • Added ENZYME_COMPAT = VERSION >= v"1.11" check in both test items
  • AutoEnzyme() is now conditionally included in the autodiff test loops only when running on Julia 1.11+
  • This excludes Enzyme tests from the '1' (stable) and 'lts' CI matrix versions while still testing on 'pre' (nightly)

ChrisRackauckas-Claude and others added 3 commits January 5, 2026 07:02
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AutoEnzyme tests are now conditionally run only on Julia >= 1.11,
which excludes them from the v1 (LTS/stable) CI matrix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the static-improvements-20260102-041243 branch from b07be00 to e864eb4 Compare January 5, 2026 12:02
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main (7d379ec) which includes the Runic formatting and dependabot updates.

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