You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typed errors (TE-B-F2): a fillet geometry copy between different solvers is the caller's set-up, not a stage failure (#19828) - #21424
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
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
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.
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.
Pin:error/pins/stage/solidcore/src/blend/fillet_geom/p6.rs.pin (1) is deleted: p6.rs has no counted site left. The unused stage_failed helper and the COPY_OTHER_SOLVER, COPY_NO_SURFACE and COPY_NO_CENTRE_LINE reasons go.
Defect sites added or kept: none added; three removed (above). Kept: COPY_NOT_A_B_SPLINE (a copy of a B-spline rail curve that is not a B-spline: the kernel's own Curve::copy keeps the kind, so no caller reaches it).
App: no SolidCraft code matches on copy_geom, this text or StageFailed here.
Test:copy_geom_needs_the_same_solver_and_both_curves asserts each cause with its status, ErrorKind::InvalidInput and not-a-defect. The different-solver check now runs with the source complete (surface, centre line, deviations, rail face), through both entry points, and asserts nothing was copied; before, the source had no surface yet, so that assert proved nothing (review finding).
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.
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.
…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>
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.
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.
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.
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: 5
Check name
Status
Explanation
Title check
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
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
[#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
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
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_SOLVERDefects 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.
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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
approved-for-ciReviewed: run the full PR CI (build, tests, goldens, Clippy)area:kernelB-rep kernel, booleans, blends, STEP/IGESowner-approvedOwner reviewed a sensitive-path change (kernel, CI, build scripts, deps); only the owner adds thisready to mergereviewed, every ask addressed; merge once CI is green
2 participants
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.
Change
Fixes #19828 (TE-B-F2 of the typed-errors index #19799): the last counted site of
blend/fillet_geom/p6.rs, theStageFailedthat TE-B-05 (#20443) left for this follow-up, and the three caller-reachableDefects of the same public copy functions. Each keeps its status and becomes a named cause under section 6 ofsolidcore/docs/failure-codes-and-reproduction.md.FilletBrep::copy_geom, geometries with different solversStageFailedFilletSetUpInvalid(FilletSetUp::CopySourceSolver),InvalidInputSM_ERR(unchanged)copy_geomispuband takes both geometries from the caller, on aFilletBrepthe caller can build (FilletBrep::new,add_geom,geom_mut); a caller can give them different solvers. Upstream checks the solvers and returnsSER, so the status staysSM_ERR, set on the failure as otherFilletSetUpchecks do (blend_corner/swept.rs).FilletBrep::copy_geom_with_solver, the same checkDefect(COPY_OTHER_SOLVER)SM_ERR(unchanged)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 surfaceDefect(COPY_NO_SURFACE)FilletSetUpInvalid(FilletSetUp::CopySourceSurface),InvalidInputSM_ERR_NULL_POINTER(unchanged)FilletGeom::set_fillet_surfaceispub, 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 lineDefect(COPY_NO_CENTRE_LINE)FilletSetUpInvalid(FilletSetUp::CopySourceCentreLine),InvalidInputSM_ERR_NULL_POINTER(unchanged)center_line_curveis apubfield of the caller's geometry; as above.The ticket's correction (2026-11-20) is followed: no value is returned, because
blend.fillet_geom_p6callscopy_geomdirectly and its generated copy cases with no destination solver record1001here.p5.rs(copy_fillet_geom, which ignores the result) is not changed.FilletSetUp::CopySourceCentreLine,CopySourceSolverandCopySourceSurfaceinerror/blend/set_up.rs, kept in name order. No existing variant or open TE PR names this condition (checkedFilletSetUp,SolverFailure, and the open Typed errors (TE-B-08, part 2 of 3): the setback corner's and setback fill's failures become named causes or reviewed defects (#19817) #21263, Typed errors (TE-B-01): the fillet geometry's p1 and p3 stage failures become reviewed defects and named causes (#19807) (carried from #20475) #21321, Typed errors (TE-B-14, part 3 of 3): the fillet session's last phrase failures become solver causes, named causes or reviewed defects (#19824) #21349 diffs).error/pins/stage/solidcore/src/blend/fillet_geom/p6.rs.pin(1) is deleted: p6.rs has no counted site left. The unusedstage_failedhelper and theCOPY_OTHER_SOLVER,COPY_NO_SURFACEandCOPY_NO_CENTRE_LINEreasons go.COPY_NOT_A_B_SPLINE(a copy of a B-spline rail curve that is not a B-spline: the kernel's ownCurve::copykeeps the kind, so no caller reaches it).copy_geom, this text orStageFailedhere.copy_geom_needs_the_same_solver_and_both_curvesasserts each cause with its status,ErrorKind::InvalidInputand not-a-defect. The different-solver check now runs with the source complete (surface, centre line, deviations, rail face), through both entry points, and asserts nothing was copied; before, the source had no surface yet, so that assert proved nothing (review finding).Changes a default: no
Test change:
blend::fillet_geom::p6::tests::copy_geom_needs_the_same_solver_and_both_curvesasserts the new causes (wereStageFailedand twoDefects), adds thecopy_geom_with_solverpath and the missing-centre-line case, and reorders the solver check after the source is complete; statusesSM_ERRandSM_ERR_NULL_POINTERunchanged, so no golden row moves.Part of #19799.
🤖 Generated with Claude Code
Summary by CodeRabbit