Skip to content

Fix MCXcor convergence and option handling - #983

Merged
wangyinz merged 2 commits into
masterfrom
codex/issue-854-mcxcor-convergence
Aug 22, 2026
Merged

wangyinz merged 2 commits into
masterfrom
codex/issue-854-mcxcor-convergence

Conversation

@wangyinz

Copy link
Copy Markdown
Member

Fixes #854

What changed

  • forward the irregular-sampling abort option exactly
  • honor median and caller-supplied initial stack seeds
  • compute convergence with a stable relative L2 norm without aliasing the prior stack
  • define zero, non-finite, success, and 20-iteration exhaustion behavior
  • return a dead beam with exactly one Invalid diagnostic on exhaustion and avoid writing final shifts
  • remove unexpected stdout and correct the user manual's option status

Root cause and impact

The convergence loop aliased stack state, had an unreachable exhaustion check, and ignored documented options. This could falsely report convergence, silently continue after exhaustion, or initialize from the wrong stack.

Validation

  • focused contract plus existing MCXcor tests: 23 passed
  • exact audited baseline: 7/7 contract tests failed
  • Black, Python 3.12/3.13 py_compile, git diff --check, and Sphinx dummy build: passed
  • independent agent review: REVIEW PASS

This PR is ready for human review and is intentionally not merged.

@codecov

codecov Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.50%. Comparing base (3ea520b) to head (650cec1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #983      +/-   ##
==========================================
+ Coverage   71.48%   71.50%   +0.01%     
==========================================
  Files         182      182              
  Lines       35666    35667       +1     
  Branches     2532     2532              
==========================================
+ Hits        25496    25502       +6     
+ Misses       9264     9259       -5     
  Partials      906      906              

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

@wangyinz
wangyinz marked this pull request as draft August 14, 2026 06:04
@wangyinz
wangyinz marked this pull request as ready for review August 14, 2026 15:40
@wangyinz
wangyinz force-pushed the codex/issue-854-mcxcor-convergence branch from 20a893c to 650cec1 Compare August 22, 2026 07:23
@wangyinz
wangyinz merged commit 5bc1b1f into master Aug 22, 2026
18 checks passed
@wangyinz
wangyinz deleted the codex/issue-854-mcxcor-convergence branch August 22, 2026 07:45
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.

Honor MCXcor convergence options and iteration exhaustion

1 participant