Repository navigation
Revise the phase-1 design after a simplicity review - #13
Merged
Merged
Conversation
A simplicity review of the design approved on 2026-10-04 (six simplicity-reviewer passes, every proposal checked by numerics, C++, caller and phase-scope lenses) found the same guarantees reachable with much less machinery, plus five flaws in the approved text. The user accepted every recommendation on 2026-10-06; this writes them into DESIGN §3.5-§7.2, §10.3, Appendix D and a new §12.21, and into PLAN. - Combinators: 8 reasoned siblings instead of 18; a nested chain takes the inner chain's state, which fixes a false "call it alone" hint on first_of(a, b, c); states_accepts_v, a GCC 16 hard error, goes. - Tolerances: the solvers' bare-number deletions widen to validated tolerances (no new deletions); one with_stop sibling for anything that is not a criterion, whose text says that only width_tol bounds the error in x; make(abs, rel_tolerance) is accepted. - R3 ranks by width (halves only when both widths overflow), so no sign_bracket::half_width() and no subnormal inversion. - No best_x or better_than deletions; value_fits_v moves to phase 3; A1 checks cpp_bin_float_50 at run time against the library's own thresholds (the integer check in the note was off by one). - Three build PRs; phase 1 re-estimated at 5-7.5 developer-days [est]. Counted from the design text: 17 new deleted declarations instead of 39-40, and 17 new compile-fail cases instead of 29. Docs only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Three proposed combinator diagnostics incorrectly require matching success and failure estimate types, contradicting valid search-result compositions.
Review effort: Balanced
Findings: 1
What changed in this PR
Revises the approved phase-1 design following the simplicity review; no implementation changes are included.
Changes:
- Simplifies diagnostics, traits, and combinator states.
- Revises tolerance, result ordering, and callback designs.
- Replans phase 1 as three implementation PRs.
| File | Description |
|---|---|
docs/redesign/PLAN.md |
Updates phase estimates and build sequence. |
docs/redesign/DESIGN.md |
Records the revised phase-1 design and decisions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The revised first_of, then and warm_fallback results texts named one Est for both the solution and the failure. A search result succeeds with a sign_bracket and fails with a root_estimate, is_result_v accepts it, and then(expand, brent) (D29) has stages whose solution types differ: then compares only the failures (rebindable_v). The texts now say std::expected<solution<S>, failure<E, UE>>, and then's asks only for the same E and UE in both failures. The first_of_mismatch regex "must return the same" still matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Before building phase 1, the new
simplicity-reviewer(PR #12) reviewed the core design approved on 2026-10-04 (§12.20):On 2026-10-06 the maintainer accepted every recommendation. This PR writes them into DESIGN and PLAN. Nothing is built yet. Changed items keep the mark [phase 1, approved 2026-10-04; not built] and say what changed on 2026-10-06. The new §12.21 records which §12.20 decision or choice each item amends.
What (docs only)
then/warm_fallback, one "stage 2 cannot start" state per class. 8 reasoned siblings instead of 18, 11 states instead of 21. A nested chain takes the inner chain's state.tolerance<T>and its parts. No new deletions; decision 12's remedy goes into the existing text.with_stopgiven a non-criterion: one sibling,!is_criterion_v<C>. The text says that onlywidth_tolbounds the error in x, thatx_tolbounds only the last step and thatf_tolbounds only |f(x)|. It also fixes today's false reason forwith_stop(1e-10).make(abs, rel_tolerance)is accepted as the run-time mirror of the mixed literal, so a run-time mixed tolerance needs two checks, not threeis_tolerance_part_v(is_any_rel_vgoes)best_xon a search result, and none onnxx::better_than.bestdeduces its argument type directly.sign_bracket::half_width()and the subnormal inversion.value_fits_vmoves to phase 3. The run-time overflow and underflow check stays, guarded inline, andto_scalaris onestatic_cast. The phase-3 sketch uses two requires-expressions instead of theparam_offamily.cpp_bin_float_50: a run-time check against the library's own thresholdsDesign flaws this fixes (each reproduced by a lens):
first_of(a, b, c)when the inner pair is at fault;states_accepts_v;to_scalar;Counted from the design text: 17 new deleted declarations instead of 39–40, and 17 new compile-fail cases instead of 29.
Verification
docs-auditor,phase-scope-checker,cpp-reviewer(design-note mode) andnumerics-reviewerreviewed the write-up.cpp-reviewerprobed every C++ sketch on GCC 16.1, Clang 22.1.8, cl 19.51 and clang-cl 22.1.3. The floor compilers and em++ were not probed. The sketches add no language or library feature beyond the floor.numerics-reviewermeasured the width order: no axiom violation on 220 estimates, and no strictly wider enclosure ranked first over 29,584 pairs. It also measured thex_tolerror ratio on multiple roots, 1.3–6.0.Next
The build follows in three PRs:
v2.0.0-alpha.1.Each one is reviewed and run through all 12 presets.
🤖 Generated with Claude Code