Skip to content

Add iscover, the cover predicate#30

Merged
timholy merged 1 commit into
mainfrom
teh/iscover
Jul 18, 2026
Merged

Add iscover, the cover predicate#30
timholy merged 1 commit into
mainfrom
teh/iscover

Conversation

@timholy

@timholy timholy commented Jul 18, 2026

Copy link
Copy Markdown
Member

a[i]*b[j] >= abs(A[i,j]) is the inequality this package is organized
around, but there was no function to ask it. The solvers satisfy it by
construction, so the gap went unnoticed; soft covers do not, which makes
"does this actually cover A?" a real question a caller cannot currently
put to the package. The test suite had already answered it by carrying
its own predicate, which is the usual sign one belongs in the package.

Coverage is a walk over the support: an entry that is zero constrains
nothing, so only nonnegative scales make it sound to skip it. That
precondition is enforced rather than documented -- a negative scale
raises rather than silently reporting a cover that isn't one -- and it
lets the check run in time proportional to the support, through the same
foreach_support hook the solvers use.

rtol and atol supply the slack a producing algorithm warrants, and
default to none, so the bare call is the exact inequality. atol is
subtracted only when nonzero, since abs(A[i,j]) - atol is undefined when
the two carry different units.

The tests now exercise the shipped function instead of a private copy.

Assisted-by: Claude Opus 4.8 noreply@anthropic.com

a[i]*b[j] >= abs(A[i,j]) is the inequality this package is organized
around, but there was no function to ask it. The solvers satisfy it by
construction, so the gap went unnoticed; soft covers do not, which makes
"does this actually cover A?" a real question a caller cannot currently
put to the package. The test suite had already answered it by carrying
its own predicate, which is the usual sign one belongs in the package.

Coverage is a walk over the support: an entry that is zero constrains
nothing, so only nonnegative scales make it sound to skip it. That
precondition is enforced rather than documented -- a negative scale
raises rather than silently reporting a cover that isn't one -- and it
lets the check run in time proportional to the support, through the same
foreach_support hook the solvers use.

rtol and atol supply the slack a producing algorithm warrants, and
default to none, so the bare call is the exact inequality. atol is
subtracted only when nonzero, since abs(A[i,j]) - atol is undefined when
the two carry different units.

The tests now exercise the shipped function instead of a private copy.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.55%. Comparing base (5e237dd) to head (1abfb48).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   98.53%   98.55%   +0.01%     
==========================================
  Files          12       13       +1     
  Lines        2052     2070      +18     
==========================================
+ Hits         2022     2040      +18     
  Misses         30       30              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timholy
timholy merged commit fb27898 into main Jul 18, 2026
5 checks passed
@timholy
timholy deleted the teh/iscover branch July 18, 2026 10:21
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