Skip to content

Typed errors (TE-B-F2): a fillet geometry copy between different solvers is the caller's set-up, not a stage failure (#19828) - #21424

Merged
bherbruck merged 4 commits into
tangency-labs:mainfrom
brett19:te-19828-f2
Nov 24, 2026
Merged

bherbruck merged 4 commits into
tangency-labs:mainfrom
brett19:te-19828-f2

Conversation

@brett19

@brett19 brett19 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Fixes #19828 (TE-B-F2 of the typed-errors index #19799): the last counted site of blend/fillet_geom/p6.rs, the StageFailed that TE-B-05 (#20443) left for this follow-up, and the three caller-reachable Defects of the same public copy functions. Each keeps its status and becomes a named cause under section 6 of solidcore/docs/failure-codes-and-reproduction.md.

Site Was Now Status Why
FilletBrep::copy_geom, geometries with different solvers StageFailed FilletSetUpInvalid(FilletSetUp::CopySourceSolver), InvalidInput SM_ERR (unchanged) copy_geom is pub and takes both geometries from the caller, on a FilletBrep the caller can build (FilletBrep::new, add_geom, geom_mut); a caller can give them different solvers. Upstream checks the solvers and returns SER, so the status stays SM_ERR, set on the failure as other FilletSetUp checks do (blend_corner/swept.rs).
FilletBrep::copy_geom_with_solver, the same check Defect (COPY_OTHER_SOLVER) the same cause SM_ERR (unchanged) Also pub, taking the same caller-chosen geometries, so by the caller-input rule it is not a defect either; one condition, one cause. Its production caller (fillet_solver/p1.rs, copy_constructed_geom) gives the copy the source's solver and cannot reach it.
FilletBrep::copy_geom, the geometry copied from has no B-spline fillet surface Defect (COPY_NO_SURFACE) FilletSetUpInvalid(FilletSetUp::CopySourceSurface), InvalidInput SM_ERR_NULL_POINTER (unchanged) The source geometry is the caller's: FilletGeom::set_fillet_surface is pub, and a fresh geometry has none, so a caller reaches this directly (the test does). Found by the independent review of this PR; same public function, same caller-input rule.
FilletBrep::copy_geom, no B-spline centre line Defect (COPY_NO_CENTRE_LINE) FilletSetUpInvalid(FilletSetUp::CopySourceCentreLine), InvalidInput SM_ERR_NULL_POINTER (unchanged) center_line_curve is a pub field of the caller's geometry; as above.

The ticket's correction (2026-11-20) is followed: no value is returned, because blend.fillet_geom_p6 calls copy_geom directly and its generated copy cases with no destination solver record 1001 here. p5.rs (copy_fillet_geom, which ignores the result) is not changed.

Changes a default: no
Test change: blend::fillet_geom::p6::tests::copy_geom_needs_the_same_solver_and_both_curves asserts the new causes (were StageFailed and two Defects), adds the copy_geom_with_solver path and the missing-centre-line case, and reorders the solver check after the source is complete; statuses SM_ERR and SM_ERR_NULL_POINTER unchanged, so no golden row moves.

Part of #19799.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fillet-copy failures now report clearer errors when the source geometry is missing required surfaces or centre lines, or uses a different solver.
    • When a copy fails partway through, geometry copied successfully before the failure is retained. This makes partial-copy results more consistent and helps clarify what went wrong.

brett19 and others added 2 commits November 24, 2026 01:09
…ng-solver check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers is the caller's set-up

`FilletBrep::copy_geom` refused a copy between two fillet geometries with
different solvers as an unreviewed `StageFailed`, the last counted site of
`blend/fillet_geom/p6.rs`. Both `copy_geom` and `copy_geom_with_solver` are
public and take the two geometries from the caller, so the mismatch is the
caller's set-up: `FilletSetUpInvalid(FilletSetUp::CopySourceSolver)`, keeping
upstream's `SM_ERR` (it checks the solvers; it does not dereference them).
`copy_geom_with_solver`'s same check, a `Defect` until now, takes the same
cause. The p6.rs stage pin (1) is deleted, and the unused `stage_failed`
helper goes with it.

Statuses are unchanged, so no golden row moves; no branch reads the class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The geometry copy entry points now report mismatched solvers and missing source B-spline data as setup failures. Tests verify the error kinds, status codes, and destination state when a copy fails.

Changes: Fillet Geometry Copy Errors

Layer / File(s) Summary
Copy-source setup error variants
solidcore/crates/solidcore/src/error/blend/set_up.rs
FilletSetUp adds variants for a missing source centre line, a solver mismatch, and a missing source surface. Each variant has a specific failure clause.
Copy validation and error assertions
solidcore/crates/solidcore/src/blend/fillet_geom/p6.rs, solidcore/crates/solidcore/src/error/pins/stage/solidcore/src/blend/fillet_geom/p6.rs.pin
copy_geom and copy_geom_with_solver return setup failures for solver mismatches with SM_ERR. Missing surfaces and centre lines return setup failures with SM_ERR_NULL_POINTER. Tests check error kinds and destination state, including the copied surface remaining assigned when the centre line is missing. Documentation and obsolete defect constants are updated. The blank-line-only pin file is deleted.

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

Merge Risk: Minimal · previous review b07e3

This change reclassifies fillet geometry copy errors as named setup failures while keeping the existing status codes. No concrete merge-blocking risk was found, and the new tests cover the changed behavior.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the change: a fillet geometry copy between different solvers is reclassified as a caller set-up error instead of a stage failure. It matches the main change in the changeset (FilletSet…
Description check Passed The description follows the repository template. It has a Change section that explains the problem and the resulting behaviour, links issue #19828, and includes the required 'Changes a default: no' li…
Linked Issues check Passed [#19828] Requirement (corrected 2026-11-20): convert the p6.rs:1824 StageFailed as a caller-argument check that keeps SM_ERR, and do not return a value. The PR does this. The different-solver chec…
Out of Scope Changes check Passed The changes stay within the p6 copy path that #19828 names. Three further changes go beyond the ticket's single site: copy_geom and copy_geom_with_solver now re-classify the COPY_NO_SURFACE, `CO…
Existing Defaults Unchanged Passed The check covers UX defaults only: default settings or preferences, the usual-use behaviour of a command or tool, UI layout or behaviour, and shortcuts. Kernel or geometry results under solidcore/ are…
Full details: Title check

Explanation

The title names the change: a fillet geometry copy between different solvers is reclassified as a caller set-up error instead of a stage failure. It matches the main change in the changeset (FilletSetUpInvalid(CopySourceSolver) replacing StageFailed in p6.rs, plus the new FilletSetUp variants). It uses a ticket label prefix and a parenthetical issue number, which add some noise, but the primary change is clear.

Full details: Description check

Explanation

The description follows the repository template. It has a Change section that explains the problem and the resulting behaviour, links issue #19828, and includes the required 'Changes a default: no' line. It includes a Test change line for the modified existing test, which the template requires for kernel test edits. The Validation section lists the test that was changed but does not state the commands run or their results. The Screenshots section is absent. The template says observable kernel behaviour needs evidence, but this change only alters error classification and keeps statuses unchanged, so screenshots are arguably not needed. The Integration status section is also missing. The description is mostly complete, so the check passes, but the Validation and Integration status sections could be improved.

Full details: Linked Issues check

Explanation

[#19828] Requirement (corrected 2026-11-20): convert the p6.rs:1824 StageFailed as a caller-argument check that keeps SM_ERR, and do not return a value. The PR does this. The different-solver check in copy_geom now returns FilletSetUpInvalid(CopySourceSolver) with ErrorKind::InvalidInput and status SM_ERR. No value is returned. The StageFailed count in p6.rs falls by one, and fillet_geom/p6.rs.pin is deleted. copy_geom_with_solver keeps its error path, as the ticket requires, and p5.rs is unchanged. The PR states that statuses are unchanged, so the blend.fillet_geom_p6 goldens should not move. This conclusion relies on the PR description and the change summary. The golden files were not inspected. The test copy_geom_needs_the_same_solver_and_both_curves covers the new cause and status. [#19828] Coding requirements are met on the evidence reviewed.

Full details: Out of Scope Changes check

Explanation

The changes stay within the p6 copy path that #19828 names. Three further changes go beyond the ticket's single site: copy_geom and copy_geom_with_solver now re-classify the COPY_NO_SURFACE, COPY_NO_CENTRE_LINE and COPY_OTHER_SOLVER Defects as FilletSetUpInvalid causes, and the FilletSetUp enum gains three variants in error/blend/set_up.rs. These changes are in the same public functions and the same file. The PR ties them to the guide's caller-input rule, and each keeps its existing status. They are therefore related to the objective, not unrelated. The ticket did not ask for them, so a reviewer should confirm this extension is wanted. The test changes support the new causes. No unrelated files were identified in the summary.

Full details: Existing Defaults Unchanged

Explanation

The check covers UX defaults only: default settings or preferences, the usual-use behaviour of a command or tool, UI layout or behaviour, and shortcuts. Kernel or geometry results under solidcore/ are explicitly excluded and pass. The changed-file inventory (git diff --name-status on the review range) has three entries, all under solidcore/crates/solidcore/src/: - blend/fillet_geom/p6.rs (modified): copy_geom and copy_geom_with_solver error kinds and cause names change. Statuses stay SM_ERR and SM_ERR_NULL_POINTER. - error/blend/set_up.rs (modified): three new FilletSetUp variants are added. - error/pins/stage/.../p6.rs.pin (deleted): a pin file is removed. No settings, preferences, UI, command-line defaults, or shortcuts are touched. The PR description states Changes a default: no, and the code changes match that statement. The only user-visible effect is a different error classification for caller-supplied geometry copies in the kernel API. That is a kernel behaviour change, which the check excludes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e471250 and b07e3e4.

Files selected for processing: 3

  • solidcore/crates/solidcore/src/blend/fillet_geom/p6.rs
  • solidcore/crates/solidcore/src/error/blend/set_up.rs
  • solidcore/crates/solidcore/src/error/pins/stage/solidcore/src/blend/fillet_geom/p6.rs.pin
Files with no reviewable changes: 1

  • solidcore/crates/solidcore/src/error/pins/stage/solidcore/src/blend/fillet_geom/p6.rs.pin

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

…pline surface or centre line is the caller's set-up

The independent review of tangency-labs#21424 found two more caller-reachable Defects in the
same public copy_geom: the source geometry's fillet surface and centre line are
the caller's (set_fillet_surface and center_line_curve are pub), so a missing
one is FilletSetUpInvalid(FilletSetUp::CopySourceSurface / CopySourceCentreLine),
InvalidInput, keeping SM_ERR_NULL_POINTER. COPY_NO_SURFACE and
COPY_NO_CENTRE_LINE go.

The test now runs the different-solver check with the source complete, so its
"nothing was copied" assert proves something, adds the missing-centre-line
case, and drops a needless ErrorKind path qualification clippy flagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brett19
brett19 marked this pull request as ready for review November 24, 2026 02:10
@brett19
brett19 requested a review from a team as a code owner November 24, 2026 02:10
@brett19
brett19 requested review from jyviko and removed request for a team November 24, 2026 02:10
@brett19 brett19 added the approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) label Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bherbruck bherbruck added owner-approved Owner reviewed a sensitive-path change (kernel, CI, build scripts, deps); only the owner adds this ready to merge reviewed, every ask addressed; merge once CI is green approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) and removed approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) labels Nov 24, 2026
@bherbruck
bherbruck added this pull request to the merge queue Nov 24, 2026
Merged via the queue into tangency-labs:main with commit 3de3aae Nov 24, 2026
153 of 157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) area:kernel B-rep kernel, booleans, blends, STEP/IGES owner-approved Owner reviewed a sensitive-path change (kernel, CI, build scripts, deps); only the owner adds this ready to merge reviewed, every ask addressed; merge once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typed errors [TE-B-F2]: A failed geometry copy is a value, not an error

2 participants