Skip to content

fix: the fillet point solve's bigger-step retry solves with the bigger step; its flag is retired (WR-456, #2338) - #2752

Merged
jyviko merged 4 commits into
tangency-labs:mainfrom
MarkusReichart:claude/fix-2338-bigger-step-retry-b6db48
Nov 6, 2026
Merged

jyviko merged 4 commits into
tangency-labs:mainfrom
MarkusReichart:claude/fix-2338-bigger-step-retry-b6db48

Conversation

@MarkusReichart

@MarkusReichart MarkusReichart commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2338, the tracking issue for WR-456's fix (fillet_point_bigger_step_retry). It is a flag retirement, which §4b welcomes; SolidCraft already runs with this flag on (kernel_cases/fixes.json), so its users see no change.

The defect (WR-456). In SmFilletSolver::ComputePointValues, when the first forward finite-difference step (dStep = 1e-5) finds no point, the retry declares dBigStep = 1e-3 but passes dStep to StepSolve again, so it repeats the solve that just failed.

The change. The retry in c6_compute_point_values (crates/solidcore/src/blend/fillet_solver/p4.rs) always solves with 1e-3. The flag and its off path are deleted; the tests that set it, #2260's rig kernel and kernel_cases/fixes.json drop its name (they already ran the bigger step). WR-456 gets an addendum.

Test first. bigger_step_retry_uses_the_bigger_step (was ..._with_the_fix) runs the default kernel and records the guesses of the first solve and the retry: the retry's first guess must lie 100 times as far from the point as the first solve's. At the test commit it fails with ratio 1; with the fix it passes.

Which results change

Only runs that reach the retry with the flag off. A temporary probe (not committed) logged every entry into the retry:

  • solidcore suite: 425 entries in about 50 tests (variable and law rounds, rim and cube-edge chamfers, fillet_executive::api); the count of tests is approximate, as concurrent probe writes interleaved. All pass with the bigger step.
  • goldens: at the rebased head every golden is unchanged: blend.fillet_solver_p4 and blend.fillet_executive_p3, the two units the probe saw reach the retry in the old difftest (61 and 157 entries), pass with changed=0, and all 283 units pass. Nothing is blessed.

Pictures

No pictures of bodies: no case diagnostics can draw from an .smb file changes its result (the rig ran with this flag on; every golden is unchanged). The suite tests that reach the retry build their bodies in code and pass their volume and closed-form checks; whether they move bit for bit is unmeasured. The mechanism, drawn in VectorCraft:

Two flows side by side. Before, upstream SMLib 1.0.1: a forward finite-difference step of dStep = 1e-5, then StepSolve finds no point, then the retry calls StepSolve(dStep) with the same 1e-5 step and fails again; dBigStep = 1e-3 is declared but never passed. After, solidcore: the same first step and the same failure, then the retry calls StepSolve(dBigStep), a 1e-3 step, 100 times longer; when it finds a point the step becomes 1e-3.

The retry box on each side: before, it repeats the failed 1e-5 solve; after, it solves with the declared 1e-3 step. (VectorCraft source and SVG.)

Evidence

All in WSL. Test first, at the test commit and at the fix (older base 7f6cf9efe, same patch):

cargo test -p solidcore --lib -- bigger_step_retry   # test commit: FAILED (ratio 1); fix: ok

Goldens and gate at the head c9ab79f98 (rebased onto main 3ed619475; the commit after it only adds to the WR-456 addendum):

cargo run --profile goldens -p goldens -- --unit blend.fillet_solver_p4 --unit blend.fillet_executive_p3 --goldens
PASS blend.fillet_solver_p4 cases=651 changed=0 added=0 removed=0 broken=0 known_failing=0 rust=0.490s
PASS blend.fillet_executive_p3 cases=788 changed=0 added=0 removed=0 broken=0 known_failing=1 rust=74.761s
goldens: 2 unit(s), 2 passed, 0 failed
cargo run --profile goldens -p goldens -- --all --goldens --jobs 6
goldens: 283 unit(s), 283 passed, 0 failed
cargo fmt --all --check                                         # ok
cargo clippy --workspace --all-targets -- -D warnings           # ok
cargo check -p solidcore --target wasm32-unknown-unknown        # ok
cargo test --profile goldens -p solidcore --no-fail-fast        # 5084 passed, 0 failed, 44 ignored

The one known failing case is #2933's, listed on main. CI's kernel-rig fails the same way on main at 3ed619475 (run 42215621732): the same three 851-chamfer-knife-edge-tip refusals and the same two moved known-failing cases, with the same volumes.

Scope

Units: blend.fillet_solver_p4
In scope: SmFilletSolver::ComputePointValues' bigger-step retry (c6_compute_point_values); retire UpstreamFixes::fillet_point_bigger_step_retry
Expected edits: blend/fillet_solver/p4.rs, kernel.rs, tests that set the flag, kernel_cases/fixes.json, a WR-456 addendum
Evidence: bigger_step_retry_uses_the_bigger_step (red at the test commit, green with the fix); solidcore suite; retry reach probe in the suite and the old difftest; goldens unchanged
Related PRs / dependencies: tangency-labs/solidcore#1217 (the flag), tangency-labs/solidcore#1220 (ND-3 per-point step, same function); tangency-labs/solidcore#2791 retires another flag in the same shared test files and fix lists, on different lines
Available follow-ups: none
Status / blockers / next step: complete; ready for review

Written with Codex (OpenAI) and Claude Code (Anthropic) on behalf of @MarkusReichart.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The fillet solver now retries failed small-step solves with a 1e-3 step. The change removes the related public fix flag and its test configuration references. It also updates the retry test and WR-456 record.

Changes: Fillet retry behavior

Layer / File(s) Summary
Retry behavior and flag retirement
crates/solidcore/src/blend/fillet_solver/p4.rs, crates/solidcore/src/kernel.rs, crates/solidcore/tests/issue_1476_swept_bar_shell.rs, crates/solidcore/tests/issue_1818_mated_shell_wall.rs, crates/solidcore/tests/issue_1945_fork_1207_step4.rs, crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs, crates/solidcore/tests/issue_2020_offset_mitred_below_depth.rs, crates/solidcore/tests/issue_2260_gn_pipe_refined_range_end.rs, crates/solidcore/tests/kernel_cases/fixes.json, crates/solidcore/tests/wr650_tabbed_plate_mitred_rounds.rs, plan/upstream-issues/WR-456--addendum-2026-11-05-default-and-flag-retired.md
The solver uses a 1e-3 retry step after a failed small-step solve. The renamed test checks that the retry guess is 100 times the first guess. The public flag and its test configuration references are removed. The WR-456 addendum records the change and reported test results.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • tangency-labs/solidcore#2663: The PR removes a fix name from the flag APIs, so the name is no longer accepted by the session::set_fixes API added in this PR.
Merge Risk: Minimal · up to 3ac64

The failed small-step retry in the fillet solver now always uses the larger step, and the related flag is removed. SolidCraft already ran with the flag enabled, so users should see no behavior change. No merge-blocking risk was found.

Security architecture risk: Low · up to 8b3a9

The larger-step retry stays within the existing operation, with no identified expansion of privileges or access. The main design risk is compatibility: downstream callers must stop naming the retired flag and can no longer select the previous retry behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The directly evidenced mutable scope remains the supplied intersection point, solver-owned offset surfaces, and caller-provided B-rep. The retry receives the same objects and domains as before. Service, tenant, and deployment exposure is not supplied.

Trust Boundaries and Controls

  • inferred — The removed toggle selects numerical behavior rather than authorization or identity. The source comparison establishes no new entrypoint or authority transition: callers reach the same private computation through existing APIs, and trial UV values remain subject to the same domain clipping and clamping.

Resilience and Maintainability Implications

  • observed — Solver errors still propagate through the existing failure path. Public fillet operations already permit partial body edits on ordinary failure or cancellation; restoration applies specifically to the enabled non-manifold refusal policy. This containment policy predates the PR. No newly triggered partial-state failure was demonstrated, although changing trial positions can change numerical outcomes.
Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title describes the bigger-step retry fix and the flag retirement.
Linked Issues check Passed [#2338] c6_compute_point_values retries a failed small step with 1e-3. The default-kernel regression test checks the 100:1 retry-to-first-step ratio. The PR retires the flag and updates its config…
Out of Scope Changes check Passed [#2338] The solver change, regression test, flag removal, configuration updates, and WR-456 addendum support the retry fix and flag retirement. The summary shows no unrelated changes.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

[#2338] c6_compute_point_values retries a failed small step with 1e-3. The default-kernel regression test checks the 100:1 retry-to-first-step ratio. The PR retires the flag and updates its configuration entries and WR-456 record.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8b3a982 and 3ac64be.

Files selected for processing: 7

  • crates/solidcore/src/kernel.rs
  • crates/solidcore/tests/issue_1476_swept_bar_shell.rs
  • crates/solidcore/tests/issue_1818_mated_shell_wall.rs
  • crates/solidcore/tests/issue_1945_fork_1207_step4.rs
  • crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
  • crates/solidcore/tests/issue_2020_offset_mitred_below_depth.rs
  • plan/upstream-issues/WR-456--addendum-2026-11-05-default-and-flag-retired.md
Files with no reviewable changes: 6

  • crates/solidcore/tests/issue_1476_swept_bar_shell.rs
  • crates/solidcore/tests/issue_1945_fork_1207_step4.rs
  • crates/solidcore/tests/issue_2020_offset_mitred_below_depth.rs
  • crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
  • crates/solidcore/src/kernel.rs
  • crates/solidcore/tests/issue_1818_mated_shell_wall.rs
Files skipped from review as they are similar to previous changes: 1

  • plan/upstream-issues/WR-456--addendum-2026-11-05-default-and-flag-retired.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@fdalmaso

fdalmaso commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Heads-up on an independent flag retirement: #2791 claims tangency-labs/solidcraft#13764, the N-D half of oscillating_skips_failed_guesses left by merged #2637. Its solver implementation is confined to geom/local_solve_nd.rs; it removes that one flag's assignments from the shared integration-test helpers and active fix-name lists, including #1945's obsolete on/off parameter. Your fillet_point_retry_step_after_scale work in fillet_solver/p4.rs is outside this scope. The draft describes the boundary and preserves the existing geometric checks. Authored with Codex (OpenAI) on behalf of @fdalmaso.

@MarkusReichart

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up, @fdalmaso. This PR retires fillet_point_bigger_step_retry and deletes its one line in the same shared files (kernel.rs, kernel_cases/fixes.json, #2260's list and the integration tests that set it, including #1945's issue_1945_fork_1207_step4.rs). Our lines are far apart, so whichever lands second should rebase cleanly; I'll rebase this one if #2791 goes first.

Written by Claude Code (Anthropic) on behalf of @MarkusReichart.

@MarkusReichart
MarkusReichart force-pushed the claude/fix-2338-bigger-step-retry-b6db48 branch from 604ad2e to 8b3a982 Compare November 5, 2026 12:27
@MarkusReichart MarkusReichart changed the title [WIP] fix: the fillet point solve's bigger-step retry solves with the bigger step; its flag is retired (WR-456, #2338) fix: the fillet point solve's bigger-step retry solves with the bigger step; its flag is retired (WR-456, #2338) Nov 5, 2026
@MarkusReichart
MarkusReichart marked this pull request as ready for review November 5, 2026 13:28
@MarkusReichart

Copy link
Copy Markdown
Contributor Author

The red difftest checks on 8b3a98217 are main's (#2790), not this change's:

  • difftest-sweep: 280 unit(s), 262 passed, 12 partial, 6 failed. The six failing units are exactly Priority: main's difftest sweep goes green before any other work solidcraft#13762's, with the same counts: heal.gap 7, primitive.primitive_creation_p2 2, topology.brep_p9 4, topology.assert_valid 2, blend.fillet_executive_p3 1 (source-file-corner_box-edge9), geom.hash_table 1 (growth_after_all_removed).
  • difftest-baseline: difftest-baseline: exact-base CI not successful (the base's own CI is red).
  • difftest: the summary job ("a difftest part did not succeed").

fmt, clippy, test, wasm, deny and ci-scripts pass.

Written by Claude Code (Anthropic) on behalf of @MarkusReichart.

@MarkusReichart

Copy link
Copy Markdown
Contributor Author

Follow-up with the exact base: kernel-rig and difftest-sweep fail the same way on main at 3603e4aa7 (this PR's base), run 42024714156.

  • kernel-rig: the same 11 failing cases with the same reasons (including fillets/cov-junction-boss-tilt-40-root-round: "call 3 (blend_dropping) ran where the rig's refused"); the per-area table is identical. Expected: the rig runs with kernel_cases/fixes.json, which had this flag on before.
  • difftest-sweep: the same six failing units with the same counts (280 unit(s), 262 passed, 12 partial, 6 failed).

Written by Claude Code (Anthropic) on behalf of @MarkusReichart.

@jyviko

jyviko commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Could you rebase this onto main? #2816 replaced difftest with goldens, and main now requires the goldens check, which this PR hasn't run yet. If your change moves results, bless the units it moves with their numbers (steps: #2816 (comment)). Thanks!

@jyviko

jyviko commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks @MarkusReichart, the flag is gone completely and the test checks the one thing that matters, the 100x guess. Nothing else to change. After the rebase, blend.fillet_solver_p4 and blend.fillet_executive_p3 reach the retry path on the default kernel, so if either moves, please bless the cases with their numbers.

MarkusReichart and others added 4 commits November 6, 2026 13:26
…ault (WR-456, tangency-labs#2338)

`bigger_step_retry_uses_the_bigger_step` runs the default kernel: after a failed
1e-5 forward step the retry's first guess lies 100x the first guess's distance from
the point. It fails until `fillet_point_bigger_step_retry` is retired (the retry
steps by 1e-5 again, 1x).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r step by default; its flag is retired (WR-456, tangency-labs#2338)

`UpstreamFixes::fillet_point_bigger_step_retry` is gone and its path is the only
one: when `ComputePointValues`' first forward finite-difference step (1e-5) finds no
point, the retry solves with 1e-3, not with 1e-5 again. Upstream passes `dStep`
where it declared `dBigStep`, so its retry repeated the failed solve.

The tests that turned the flag on, tangency-labs#2260's rig kernel and the corpus's fixes.json
drop the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… retired (tangency-labs#2338)

Records the retirement, the test's new name, and the measured reach of the retry:
the solidcore suite (425 entries in about 50 tests, all pass) and the difftest
(blend.fillet_executive_p3 and blend.fillet_solver_p4 reach it; every case keeps
its outcome and values against main's CI reports), so no cpp_defect marker.

Text written with Codex (OpenAI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MarkusReichart
MarkusReichart force-pushed the claude/fix-2338-bigger-step-retry-b6db48 branch from 8b3a982 to 3ac64be Compare November 6, 2026 14:48
@MarkusReichart

Copy link
Copy Markdown
Contributor Author

@jyviko Rebased onto main 3ed619475. Nothing moves: at c9ab79f98, blend.fillet_solver_p4 (651 cases) and blend.fillet_executive_p3 (788) pass --goldens with changed=0, and --all --goldens passes 283 of 283 units, so nothing is blessed. The summary lines are in the description.

🤖 Addressed by Claude Code

@jyviko
jyviko merged commit 5edaa27 into tangency-labs:main Nov 6, 2026
10 of 11 checks passed
@MarkusReichart
MarkusReichart deleted the claude/fix-2338-bigger-step-retry-b6db48 branch November 6, 2026 17:43
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.

Solidcore-only blend fix: ComputePointValues' bigger-step retry uses the bigger step (fillet_point_bigger_step_retry, WR-456)

3 participants