Skip to content

Fixing a bug with success - #304

Merged
jmlarson1 merged 2 commits into
mainfrom
bugfix_MSP_exit
Jun 10, 2026
Merged

Fixing a bug with success#304
jmlarson1 merged 2 commits into
mainfrom
bugfix_MSP_exit

Conversation

@jmlarson1

Copy link
Copy Markdown
Collaborator

Fix a bug in the manifold sampling main loop where the successful flag could persist from a previous iteration when termination occurred at the budget nf_max. Previously, if the algorithm exited the inner loop due to reaching nf_max, a stale successful=True value could cause the trust-region center (xkin) to be updated to the most recent evaluation, even when that point was not accepted as an improving iterate.

The fix resets successful at the start of each outer iteration and removes an unnecessary reassignment inside the failure logic, ensuring that only genuinely successful iterations update the incumbent solution.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.59%. Comparing base (d46d537) to head (0570d80).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #304   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files         106      106           
  Lines        5011     5011           
=======================================
  Hits         4640     4640           
  Misses        371      371           

☔ 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.

@jared321 jared321 mentioned this pull request Jun 10, 2026

@jared321 jared321 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall, everything looks find with the PR. We've created Issue #305 to record the lesson learned from this bug.

If @mmenickelly is OK with the fixes, then I approve.

@mmenickelly mmenickelly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Very necessary, good catch.

@jmlarson1
jmlarson1 merged commit abf917b into main Jun 10, 2026
58 checks passed
@jmlarson1
jmlarson1 deleted the bugfix_MSP_exit branch June 10, 2026 19:19
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