Skip to content

Reject boolean fallback clutter intensity in DP births - #5366

Merged
FlorianPfaff merged 1 commit into
mainfrom
fix/ellipsoid-spd-validation
Aug 21, 2026
Merged

Reject boolean fallback clutter intensity in DP births#5366
FlorianPfaff merged 1 commit into
mainfrom
fix/ellipsoid-spd-validation

Conversation

@FlorianPfaff

@FlorianPfaff FlorianPfaff commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Fix a validation bug in DirichletProcessBirthMultiBernoulliTracker where the fallback clutter_intensity accepted boolean values.

The fallback path called _get_clutter_intensity(...) before semantic validation. That helper converts scalar-like inputs with float(...), so True became 1.0; the later _as_finite_real_scalar(...) check could no longer tell that the original configuration was boolean.

Validate boolean dtype before that lossy conversion, then keep the existing finite/non-negative scalar validation unchanged. Numeric scalar and one-element numeric intensity inputs retain their current behavior.

Regression evidence

The existing regression already captures the bug:

tests/filters/test_dirichlet_process_birth_decision_validation.py::test_rejects_invalid_fallback_clutter_intensity[True]

In the current NumPy 3.13 CI artifact, this is one of the remaining failures: True does not raise although the API requires clutter_intensity to be finite, non-negative, and semantically numeric.

Scope

One validation change in src/pyrecest/filters/dirichlet_process_birth_tracker.py; no unrelated estimator behavior is changed.

Copy link
Copy Markdown
Owner Author

Closing as redundant with #5365, which independently fixes the same existing ellipsoidal SPD-validation regression and was opened first. Keeping one focused PR avoids duplicate review/CI noise.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 5.89s
✅ JSON prettier 7 0 0 0 0.48s
✅ JSON v8r 7 0 0 4.23s
✅ MARKDOWN markdownlint 68 0 0 0 1.45s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.32s
✅ PYTHON black 1988 15 0 0 44.99s
✅ PYTHON isort 1988 27 0 0 2.21s
✅ REPOSITORY betterleaks yes no no 1.01s
✅ REPOSITORY checkov yes no no 26.12s
✅ REPOSITORY git_diff yes no no 0.1s
✅ REPOSITORY secretlint yes no no 76.26s
✅ REPOSITORY syft yes no no 2.28s
✅ REPOSITORY trivy-sbom yes no no 1.64s
✅ YAML prettier 11 0 0 0 0.43s
✅ YAML v8r 11 0 0 12.12s
✅ YAML yamllint 11 0 0 0.47s

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 reopened this Aug 20, 2026
@FlorianPfaff
FlorianPfaff force-pushed the fix/ellipsoid-spd-validation branch from 8bdf893 to c8cbb95 Compare August 20, 2026 10:03
@FlorianPfaff FlorianPfaff changed the title Fix SPD validation for ill-scaled ellipsoids Reject boolean fallback clutter intensity in DP births Aug 20, 2026
@FlorianPfaff
FlorianPfaff marked this pull request as draft August 20, 2026 10:03

Copy link
Copy Markdown
Owner Author

Update after the earlier duplicate-close note: I removed the ellipsoid change entirely because #5365 already covers it. This PR has been repurposed to an independent regression found in the same CI triage. The current head (c8cbb95) is one commit ahead of main and changes only dirichlet_process_birth_tracker.py, fixing boolean fallback clutter_intensity validation.

@FlorianPfaff
FlorianPfaff marked this pull request as ready for review August 21, 2026 06:41
@FlorianPfaff
FlorianPfaff merged commit 17aa574 into main Aug 21, 2026
15 of 26 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