Skip to content

Fix backend contract edge cases#2160

Merged
FlorianPfaff merged 1 commit into
mainfrom
codex/pyrecest-backend-contract-fixes-20260522-1950
May 22, 2026
Merged

Fix backend contract edge cases#2160
FlorianPfaff merged 1 commit into
mainfrom
codex/pyrecest-backend-contract-fixes-20260522-1950

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

Summary

  • make NumPy divide-with-zero handling work with scalars, broadcasting, and integer inputs
  • add JAX backend implementations for divide, dot, outer, batched matvec, set_diag, vec_to_diag, and triangular matrix reconstruction edge cases
  • extend backend contract coverage for these shape and dtype cases

Validation

  • git diff --check
  • conflict-marker scan with rg
  • python -m py_compile src\pyrecest\_backend\_shared_numpy\__init__.py src\pyrecest\_backend\jax\__init__.py tests\test_backend_contracts.py

Tests were not run per request.

@github-actions
Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 33.14s
✅ PYTHON black 3 2 0 0 2.28s
✅ PYTHON isort 3 2 0 0 0.41s
✅ REPOSITORY checkov yes no no 30.12s
✅ REPOSITORY gitleaks yes no no 16.17s
✅ REPOSITORY git_diff yes no no 0.05s
✅ REPOSITORY secretlint yes no no 13.4s
✅ REPOSITORY syft yes no no 2.86s
✅ REPOSITORY trivy-sbom yes no no 3.63s
✅ REPOSITORY trufflehog yes no no 23.79s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

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

@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    10 files  ± 0      10 suites  ±0   2h 38m 42s ⏱️ - 1m 1s
 2 143 tests + 8   2 139 ✅ + 8      4 💤 ±0  0 ❌ ±0 
21 861 runs  +80  18 171 ✅ +80  3 690 💤 ±0  0 ❌ ±0 

Results for commit 2ab53f6. ± Comparison against base commit 6dbce88.

@FlorianPfaff FlorianPfaff merged commit e450f6c into main May 22, 2026
26 checks passed
@FlorianPfaff FlorianPfaff deleted the codex/pyrecest-backend-contract-fixes-20260522-1950 branch May 22, 2026 18:28
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