Skip to content

test: add failing repro for skyline solver reporting non-convergence as success#871

Closed
ivan-aksamentov wants to merge 1 commit into
rustfrom
repro/skyline-nonconvergence-reported-as-success
Closed

test: add failing repro for skyline solver reporting non-convergence as success#871
ivan-aksamentov wants to merge 1 commit into
rustfrom
repro/skyline-nonconvergence-reported-as-success

Conversation

@ivan-aksamentov

Copy link
Copy Markdown
Member

Red counterexample for #869, base is the PR head branch so CI shows it failing against the code under review. Not intended to merge as-is: the author decides the fix, then adapts or removes the test.

solve_log_tc returns Ok(z) unconditionally after its Newton loop. With max_iter = 0 it takes no step and returns the decoupled warm start, which for the default positive stiffness is not the regularized optimum. optimize_skyline still yields a successful SkylineResult, so a caller cannot distinguish an optimized skyline from an un-optimized one, and the pipeline's fail-loud contract cannot fire because no error is raised. The same silent path covers an exhausted max_iter and an Armijo stall at alpha < 1e-12.

The test runs a three-segment skyline with max_iter = 0 and asserts an error. On the current head it returns Ok with the un-optimized warm start.

Work items

  • Assert optimize_skyline with max_iter = 0 on a multi-segment regularized solve returns an error

Possible improvements

  • After the fix (return an error, or a converged flag, when the final gradient exceeds tolerance), extend to an exhausted-iteration and a stalled-line-search case

…convergence as success

Counterexample for #869: solve_log_tc returns Ok(z) unconditionally after its
Newton loop, so max_iter = 0 returns the un-optimized decoupled warm start, which
for the default positive stiffness is not the regularized optimum. optimize_skyline
still yields a successful SkylineResult, so the pipeline's fail-loud contract cannot
fire. The test asserts max_iter = 0 is an error and fails on the current head.

Red test for author consideration; not intended to merge as-is.
Base automatically changed from refactor/unified-coalescent to rust July 24, 2026 15:23
@ivan-aksamentov
ivan-aksamentov deleted the repro/skyline-nonconvergence-reported-as-success branch July 24, 2026 15:25
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