Skip to content

Harden VBRM validation and make prediction failures atomic - #5453

Merged
FlorianPfaff merged 2 commits into
mainfrom
fix/vbrm-validation-atomicity
Aug 28, 2026
Merged

Harden VBRM validation and make prediction failures atomic#5453
FlorianPfaff merged 2 commits into
mainfrom
fix/vbrm-validation-atomicity

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Summary

  • reject non-finite VBRM scalar/vector hyperparameters, shape states, and covariance inputs instead of allowing NaN/Inf into the recursion
  • validate prediction controls before mutating state and stage the full prediction so inverse-gamma forgetting failures leave the tracker unchanged
  • make update-time num_iterations use the same strict positive-integer contract as construction
  • add NumPy regression tests for all of the above

Bugs fixed

  1. NaN/Inf could pass positive/non-negative checks because comparisons such as nan <= 0 are false.
  2. predict_linear() updated kinematics/orientation and scaled inverse-gamma parameters before checking whether forgetting drove alpha to <= 1; an exception therefore left a partially advanced tracker.
  3. update(..., num_iterations=...) used int(...), silently accepting values such as True, 1.5, and "2", unlike the constructor.

The branch is based on current main at eec266f55c10304e68172057e034364ca7314375 and intentionally avoids the separate open reflection-flag fix in #5452.

@FlorianPfaff
FlorianPfaff enabled auto-merge (squash) August 28, 2026 13:23
@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 6.73s
✅ JSON prettier 7 0 0 0 0.43s
✅ JSON v8r 7 0 0 5.38s
✅ MARKDOWN markdownlint 68 0 0 0 1.9s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.31s
✅ PYTHON black 2032 1 0 0 65.49s
✅ PYTHON isort 2032 3 0 0 2.87s
✅ REPOSITORY betterleaks yes no no 1.2s
✅ REPOSITORY checkov yes no no 34.56s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY secretlint yes no no 105.34s
✅ REPOSITORY syft yes no no 2.52s
✅ REPOSITORY trivy-sbom yes no no 3.07s
✅ YAML prettier 11 0 0 0 0.53s
✅ YAML v8r 11 0 0 17.45s
✅ YAML yamllint 11 0 0 0.73s

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: MAKEFILE_CHECKMAKE. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff
FlorianPfaff merged commit 7f189eb into main Aug 28, 2026
25 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.

1 participant