Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check license to avoid silent failures #97

Merged
merged 2 commits into from
Dec 3, 2023

Conversation

lassepe
Copy link
Contributor

@lassepe lassepe commented Dec 3, 2023

When the user hands in a problem that is larger than their license allows, solve_mcp currently just silently gives a wrong result. This PR adds a license check to the solve_mcp C_API function. The overhead of the check is only about 20ns on my machine so I think this is worth it.

Copy link

codecov bot commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7efbc94) 94.31% compared to head (cc5da01) 94.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   94.31%   94.33%   +0.02%     
==========================================
  Files           3        3              
  Lines         457      459       +2     
==========================================
+ Hits          431      433       +2     
  Misses         26       26              

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

@odow
Copy link
Collaborator

odow commented Dec 3, 2023

I removed the kwarg. Let's just do this every time. I assumed PATH would complain rather than silently return the wrong answer...

@lassepe
Copy link
Contributor Author

lassepe commented Dec 3, 2023

I'm okay with dropping the kwarg

@odow odow merged commit 40ffcf6 into chkwon:master Dec 3, 2023
9 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.

2 participants