Skip to content

[codex] Fix deviation failure warning without metadata#1860

Merged
FlorianPfaff merged 5 commits intomainfrom
codex/fix-deviation-failure-warning
Apr 25, 2026
Merged

[codex] Fix deviation failure warning without metadata#1860
FlorianPfaff merged 5 commits intomainfrom
codex/fix-deviation-failure-warning

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

Summary

  • Stop indexing failed result rows as if they contained filterName and filterParams metadata.
  • Emit a warning using the result row index and the number of infinite deviations instead.
  • Add a regression test where missing estimates trigger the warning path without crashing.

Root Cause

determine_all_deviations receives result rows, but the failure-warning path treated each row like a filter config dictionary. If a missing estimate produced an infinite deviation, the warning code could raise a secondary exception while trying to access nonexistent metadata keys.

Validation

  • Not run locally; this workspace is read-only and the change was made through the GitHub connector.
  • Added tests/test_determine_all_deviations.py to cover the missing-estimate warning path.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 18.62s
✅ JSON prettier 2 0 0 0 0.45s
✅ JSON v8r 2 0 0 2.25s
✅ MARKDOWN markdownlint 2 0 0 0 0.72s
✅ MARKDOWN markdown-table-formatter 2 0 0 0 0.22s
✅ PYTHON bandit 383 0 0 5.97s
✅ PYTHON black 383 1 0 0 8.85s
✅ PYTHON flake8 383 0 0 3.29s
✅ PYTHON isort 383 1 0 0 0.74s
✅ PYTHON mypy 383 0 0 5.3s
✅ PYTHON pylint 383 0 0 120.58s
✅ PYTHON ruff 383 1 0 0 0.07s
✅ REPOSITORY checkov yes no no 24.71s
✅ REPOSITORY gitleaks yes no no 11.62s
✅ REPOSITORY git_diff yes no no 0.03s
✅ REPOSITORY secretlint yes no no 7.19s
✅ REPOSITORY syft yes no no 3.42s
✅ REPOSITORY trivy-sbom yes no no 2.58s
✅ REPOSITORY trufflehog yes no no 21.62s
✅ YAML prettier 4 0 0 0 0.48s
✅ YAML v8r 4 0 0 5.23s
✅ YAML yamllint 4 0 0 0.45s

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@9.4.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

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

@FlorianPfaff FlorianPfaff marked this pull request as ready for review April 25, 2026 09:34
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    12 files  ± 0      12 suites  ±0   4h 27m 57s ⏱️ - 19m 3s
 1 092 tests + 2   1 092 ✅ + 2      0 💤 ±0  0 ❌ ±0 
13 388 runs  +24  10 292 ✅ +20  3 096 💤 +4  0 ❌ ±0 

Results for commit 2d29254. ± Comparison against base commit f344bab.

@FlorianPfaff FlorianPfaff merged commit 73fe305 into main Apr 25, 2026
19 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