Skip to content

Fix how runlemke() failure is checked in runLH() and runtrace() - #27

Merged
rahulsavani merged 2 commits into
gambitproject:mainfrom
nataliemes:refactor/runlemke-check
Oct 8, 2026
Merged

rahulsavani merged 2 commits into
gambitproject:mainfrom
nataliemes:refactor/runlemke-check

Conversation

@nataliemes

Copy link
Copy Markdown
Collaborator

Closes issue #23.

Changes:

  1. Instead of checking whether runlemke() returns None, now returned result object's success field is verified to be False.
  2. Unit tests were added that check if runLH() and runtrace() throw RuntimeError when runlemke() fails unexpectedly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the solver contract and includes focused regression coverage.

0 open findings

What changed in this PR

Updates bimatrix solvers to correctly detect unsuccessful runlemke() results.

Changes:

  • Checks LcpResult.success in runLH() and runtrace().
  • Adds regression tests for both failure paths.
File Description
src/​lemke/​bimatrix.py Corrects failure detection.
tests/​test_bimatrix_units.py Tests unsuccessful solver results.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@rahulsavani rahulsavani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rahulsavani
rahulsavani merged commit 16715a7 into gambitproject:main Oct 8, 2026
9 checks passed
@nataliemes
nataliemes deleted the refactor/runlemke-check branch October 8, 2026 12:02
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.

3 participants