Skip to content

Conversation

@WardBrian
Copy link
Member

@WardBrian WardBrian commented Oct 17, 2025

Fixes stan-dev/stan#3366. We should also update the deserializer so it actually catches these if they do sneak through the compiler, though.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Fixed the some of the newer constraint types not having sufficient size checks for their declarations.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian changed the title Fix/size checks newer constraints Check for positive indices on stochastic matrices, sum to zero types Oct 17, 2025
Needed because compiler elides them if it sees literals it knows will pass
@WardBrian WardBrian force-pushed the fix/size-checks-newer-constraints branch from db935e7 to 31e2bde Compare October 17, 2025 16:23
@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (a09b85c) to head (31e2bde).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
src/middle/Internal_fun.ml 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1563   +/-   ##
=======================================
  Coverage   90.27%   90.28%           
=======================================
  Files          65       65           
  Lines        9988     9992    +4     
=======================================
+ Hits         9017     9021    +4     
  Misses        971      971           
Files with missing lines Coverage Δ
src/frontend/Ast_to_Mir.ml 93.94% <100.00%> (+0.04%) ⬆️
src/stan_math_backend/Lower_stmt.ml 95.65% <100.00%> (ø)
src/middle/Internal_fun.ml 63.15% <50.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian WardBrian merged commit 2b7e243 into master Oct 17, 2025
3 checks passed
@WardBrian WardBrian deleted the fix/size-checks-newer-constraints branch October 17, 2025 18:05
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.

Exception: no more scalars to read with sum_to_zero_vector

3 participants