Repository navigation
fix: fallbacks and skipped checks are an error or a warning, never silent - #46
Conversation
…lent
- fretting_regime.range_at_cycles bisected on [1e-6, 1e6] MPa and returned
the bound when the life lay outside it (1e12 Pa for a life shorter than the
curve's at 1e6 MPa, 1 Pa for a NaN life). It refuses a life that is not
finite and positive, or outside its bracket.
- The wire-yield guard of compute_mkappa swallowed every ValueError, so a
bound that could not be evaluated left no trace. It warns; a cable without
a yield-stressed armour layer, which has no bound, is skipped as before.
- The bending-test inversion returned its closest cached point as converged
when it had no new point to try. It raises CableSolverError with the miss.
- A kinematic history whose laid cores have no friction law held them to
the cable axis silently. It warns and records it in the provenance.
- compute_sheave and the rig-test M-kappa loops ran their internal calls
under simplefilter("ignore"), dropping a wire-yield or clamping warning
about the caller's own curvature. Each distinct warning is relayed once
(provenance.relayed_warnings).
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e148d18e03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The new bracket check evaluated the life at 1e-6 MPa, which overflows for a steep curve (m 40, log C 80) whose root at 1e6 cycles is representable, and refused the curve. The bisection and its bracket now compare log10 lives (SNcurve.log10_life), which stay representable. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c05e3a702
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A life equal to the curve's life at 1e-6 MPa (to 1e-12 in log10) has its root on the bracket's lower end; it was refused as outside it. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
After dev 7e14481, test_leg_property_and_energy[kw3] (distributed friction, three-point, 24 stations per segment) raised "bending-test inversion stalled: 1 target(s) missed by up to 6.26e-08 (tolerance 1.92e-09)". The inverted quantity steps by 2.3e-7 over a few ulps of the curvature there, the target lies inside the step, and both interpolants rounded onto cached points, so no new point was added; bisection had not been tried at that iteration. On a stall the open brackets are now bisected; a bracket with no float inside is already closed as tiny, so a stall is raised only when no point is left. On a step 2.3e-7 high, 1600 targets inside it: 429 stalls before, none now, each resolved to the step within 4e-16 relative. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
A sweep of the package for silent fallbacks: solvers that switch method or clamp, iterations whose convergence is not checked, broad
exceptclauses, singular solves and suppressed warnings. Each case below returned a value without saying so; each is now an error or a warning, with a test (tests/test_silent_fallbacks.py).fretting_regime.range_at_cyclesCableInputErrorfor a life that is not finite and positive, or outside the bracket; inside it unchangedcompute_mkappawire-yield guardexcept (ValueError, KeyError): pass— anyCableInputErrororPhysicalRangeErrorof the guard was swallowed and the check skipped without traceExtrapolationWarning, with the reason); a solver failure still raisesbeam_testmonotone inversionu = 0for a target of 1 on a flat response)CableSolverErrornaming the missed targets and the miss only when no point is leftcompute_sheave, rig-test M-κ loopscompute_mkappa/compute_stress/compute_capacitycalls underwarnings.simplefilter("ignore"): a wire-yield or clamping warning about the caller's own curvature was droppedprovenance.relayed_warnings)kinematic_historywith laid coresExtrapolationWarningand a provenance limitation; unlaid cores are held as before, silently (documented)Reviewed and left as they are
distributed_friction: the Newton → fixed-point fallback is counted in the result statistics (capstan_newton_fallbacks) and the fixed point raises when it does not converge.radial_solution.solve_lcp: the NNLS residual is not used, but complementarity is checked after the polish and failure raisesCableSolverError.rig_testwithcontact_model="auto": falls back to the bounded chain and records it in the result notes (documented behaviour of"auto");"solved"raises.components.compute_component_response: the frictional core state falls back to the stuck state with the reason in the component'sbasis(documented).capacity_checkinterpolation clamps: governed by the documentedout_of_rangeoption (raiseby default).bend_restrictor,contact_pressure,along_wire,strain_life,mean_stressiterations: raise on non-convergence or are bracketed bisections that cannot leave their root.Gates
On 7e98099 (dev 12be20f merged in: #40, #42, #43, #48, #49):
pytest(full suite, venv with the CI wheels,NUMBA_NUM_THREADS=1): 4768 passed, 4 skipped.CABLEXSEC_DISABLE_NUMBA=1: 4652 passed, 120 skipped.python -m mypy: no issues in 119 source files.ruff checkandruff format --checkonsrc tests examples validation release doc: clean.Stall on a step a few ulps wide (6342104)
After dev 7e14481,
test_beam_test.py::test_leg_property_and_energy[kw3](distributed friction, three-point bending, 24 stations per segment) raised the new stall error: one target missed by 6.26e-8 against a tolerance of 1.92e-9. The inverted quantity steps by 2.3e-7 over a few ulps of the curvature there and the target lies inside the step. Both interpolants rounded onto cached points, and bisection had not been tried at that iteration, so the bracket was closable but no point was added.On a stall the open brackets are now bisected. A bracket with no float inside it is already closed by the existing width rule (
4e-16relative), so the error is raised only when no point is left. On a step 2.3e-7 high, 1600 targets inside it gave 429 stalls before the change and none after, each resolved to the step within 4e-16 relative.test_inversion_resolves_a_target_inside_a_round_off_stepcovers it and fails without the change.