Skip to content

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

Merged
bherbruck merged 4 commits into
tangency-labs:mainfrom
brett19:te/b14-p3
Nov 24, 2026

Conversation

@brett19

@brett19 brett19 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Change

This is TE-B-14 of the typed-errors index #19799 (programme #13790), part 3 of 3, the last. Parts 1 and 2 merged in #20750 and #20927. This part converts the 19 phrase sites #20927 left in four files under blend/fillet_executive/, and removes their four phrase pins:

File Phrase pin
session/fit_size.rs 8 → removed
session/ball_regular.rs 4 → removed
session.rs 6 → removed
session/finish.rs 1 → removed

Every cause but one already exists on main: the SolverFailure variants of #20732, #20722's FilletVertexWithoutCorner, and CornerRefused. The one new variant is SolverFailure::EdgeCurveCacheNotBuilt { edge }, with its test. Every site keeps its status.

Per site

File · function Was Now Status (was → now)
fit_size.rs ball_through_at ×2, bands_meet_at ×3, polygon_fit, circle_top_fit (7) Missing("the solver's offset surface") Solver(OffsetSurfaceMissing) .with_status(SM_ERR_NULL_POINTER) (helper offset_surface_missing) NER → NER
fit_size.rs ball_through_at Missing("the solver's edge use") Solver(SolverEdgeUseMissing { index: 0 }) NER → NER
ball_regular.rs set_ball_radius, judge_ball_at, ball_section_at ×2 (4) Missing("the solver's offset surface") Solver(OffsetSurfaceMissing) .with_status(SM_ERR_NULL_POINTER) NER → NER
session.rs live_vertex_solvers Missing("the geometry's fillet solver") Solver(FilletGeomWithoutSolver { fillet_geom }) NER → NER
session.rs SessionGeometryContext::corner Missing("the vertex's corner") FilletVertexWithoutCorner (no entity, as before) NER → NER
session.rs SessionObjects::make_solver_face Missing("the geometry's fillet solver") Solver(FilletGeomWithoutSolver { fillet_geom }) NER → NER
session.rs load_edge_g1_knots (LoadFilletSolver) Missing("the edge curve's cache"), with the build's error dropped Solver(EdgeCurveCacheNotBuilt { edge }) (new), with that error kept as its cause (§6 rule 6) NER → NER
session.rs parameters_split_blended_vertex_fans Missing("an end vertex of the edge") Solver(EdgeWithoutVertex { edge }) NER → NER
session.rs NxN corner topology (MakeCornerTopology) Missing("the edge use's mate") Solver(EdgeUseWithoutMate) NER → NER
finish.rs filleting Failed("an asked setback is not built") (wrapper failure, now removed) CornerRefused SM_ERR → SM_ERR

Why these causes:

  • Offset surfaces and the edge use (12 sites). These come from the caller's solver. fit_size and ball_regular are pub modules, and ball_through, bands_meet_at, polygon_fit, circle_top_fit, set_ball_radius and judge_ball_at take a SolverObject from their caller. So the solver's state is the caller's input, as Typed errors (TE-B-09, part 3 of 4): fillet solver p4 #20732's variants describe it (ruling item 2). OffsetSurfaceMissing defaults to SM_ERR, so .with_status(SM_ERR_NULL_POINTER) keeps the old status. This is the pattern of fillet_solver/p5/recovery.rs::offset_required.
  • A geometry without its solver; a vertex without its corner. These two read the session's own pseudo body and corner map, which have no public mutator (the session exposes only calc_solver_geometry/calculate_solver_geometry). On their own facts they would be Defects. Ruling items 2, 5 and 7 fix one shape per condition across TE-B, and main already uses these shapes for the same links on the session's pseudo body (fillet_geom/p2.rs, fillet_geom/p4.rs, blend_corner/ball.rs). The InvalidInput class can decide the outcome only for a missing corner left without a classification cause: when a corner's classification failed, Typed errors [TE-B-P4]: A corner whose classification fails keeps the failure as its cause #19803's rooted_in keeps that error as the cause, and the cause decides the class. Without one, the class is as it is at the fillet_geom sites today. One condition gets one shape across TE-B (ruling items 2, 5 and 7). FilletGeomWithoutSolver and FilletVertexWithoutCorner are what blend_corner/ball.rs, fillet_solver/p4.rs, fillet_solver/p5/recovery.rs and fillet_geom/p2.rs already raise for the same missing links. finish.rs::is_missing_corner now matches FilletVertexWithoutCorner under the session's operation with no cause. That is exactly the error SessionGeometryContext::corner now raises, so Typed errors [TE-B-P4]: A corner whose classification fails keeps the failure as its cause #19803's re-rooting picks out the same errors as before. The other FilletVertexWithoutCorner sites use their own operations, which the matcher's operation check already excludes.
  • An end vertex; a mate (2 sites). Both read the target, the caller's body. A fan split of a caller's edge that has no end vertex, or an NxN corner on an open body whose edge use has no mate, is the caller's input. The variant texts say so ("An edge of the caller's body …", "An edge use of the caller's body has no mate").
  • The curve cache (new variant). No blend-area variant names a curve's cache. SolverFailure::SurfaceCacheNotBuilt is for a surface's cache, and its text would be false here. The surface area's SurfaceFailure::CurveCacheNotBuilt has the right meaning but the wrong effect: once the error is no longer a blend failure, solidcore-ops' blend::failure stops typing it (Error::BlendFailed), and the app's core::blend::status returns Error::Status(1006) where it returned Error::Refused(BlendFailed ..). That is a result change. So the site gets SolverFailure::EdgeCurveCacheNotBuilt { edge }, which mirrors SurfaceCacheNotBuilt: class Failed, status SM_ERR_NULL_POINTER, and the cache's error kept as the cause, which decides is_defect. The variant sits in sorted order, and its test is edge_curve_cache_not_built_passes_its_cause_on. No open TE PR adds a curve-cache cause (I checked open PRs for CurveCacheNotBuilt). The site now keeps the cache build's error instead of dropping it. Unported and cancelled errors still pass through unchanged. No library code under blend/ reads the chain predicates on this error.
  • The refused asked setback. The executive notes the refusal (note_refusal, CornerUnsupported, the setback comment) on the line just before. That is what CornerRefused stands for: "a corner was refused at its vertex (the error info says why)", status SM_ERR, class Failed. It is the cause the session's other noted refusals already return (session.rs 925, 3683, 5657, 8207). Its status, class and replaces_upstream_status are the same as the Failed(..) phrase's, so refusable and the refusal path see the same error.

Defect sites

None. This part adds no Defect { why }: every site above is a named cause.

Results

No result changes. Statuses are unchanged and no site gains an entity. The only reader of one of these phrases, is_missing_corner, moves with its producer, and its tests now build the new cause (below).

Test change: finish.rs tests a_classification_error_goes_to_the_root_of_the_later_failure and a_classification_error_is_not_kept_under_a_root_that_keeps_none build the session's missing-corner and refused-setback errors from the new causes instead of the removed phrases, because those phrases no longer exist. a_classification_error_is_not_kept_under_an_unrelated_root keeps all its cases and gains two: FilletVertexWithoutCorner in another operation, and in the session's operation with a cause already kept. Neither is re-rooted. No expectation is changed.

Validation

At 9a93bc5:

  • cargo fmt --check and cargo clippy --all-targets -D warnings pass for the solidcore workspace and the SolidCraft workspace.
  • Lib tests for error:: and blend::fillet_executive pass: 340 passed, 0 failed. This includes the new edge_curve_cache_not_built_passes_its_cause_on.
  • scripts/ci/check_panic_sites.py passes.
  • goldens fuzz_corpus passes.
  • The phrase pins of the four files are deleted, so their counts are now zero.
  • An independent adversarial review found one result change (SurfaceFailure::CurveCacheNotBuilt would have taken the error out of the blend area). It is fixed in 9a93bc5, and the review's doc nit is fixed in the same commit.

Part of #19824

Changes a default: no

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fillet and edge operations now report more specific errors when required solver data, corner mappings, or edge relationships are missing.
    • Failures to build edge curve data retain the underlying cause and provide the affected edge’s details.
    • Missing offset surfaces and edge uses now return consistent, typed errors with appropriate status information.

Claims the 19 phrase sites left in fit_size.rs, ball_regular.rs,
session.rs and finish.rs after tangency-labs#20927.

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

coderabbitai Bot commented Nov 23, 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 fillet executive now reports typed failures for missing solver geometry, topology mappings, offset surfaces, and edge uses. Edge-curve cache construction failures use a new solver failure with defined classification, status, and display text. Finish-path tests now use typed corner failures.

Changes: Fillet Failure Typing

Layer / File(s) Summary
Session solver failures
solidcore/crates/solidcore/src/blend/fillet_executive/session.rs, solidcore/crates/solidcore/src/error/blend/solver.rs, solidcore/crates/solidcore/src/error/blend.rs, solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session.rs.pin
Session routines now return typed failures for missing geometry solvers, corner mappings, edge endpoints, and edge-use mates. Edge-curve cache construction failures are wrapped in EdgeCurveCacheNotBuilt. Its classification, status, display text, and wrapper behavior are covered by a test.
Missing solver data in ball and fit routines
solidcore/crates/solidcore/src/blend/fillet_executive/session/ball_regular.rs, solidcore/crates/solidcore/src/blend/fillet_executive/session/fit_size.rs, solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/ball_regular.rs.pin, solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/fit_size.rs.pin
Ball and fit routines now report missing offset surfaces through SolverFailure::OffsetSurfaceMissing. ball_through_at reports a missing solver edge use through SolverEdgeUseMissing. The affected error documentation is updated.
Finish-path corner failures
solidcore/crates/solidcore/src/blend/fillet_executive/session/finish.rs, solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/finish.rs.pin
Finish routines recognize FilletVertexWithoutCorner and return CornerRefused when a setback is not built. Tests use the typed failures, and the generic failure helper is removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: Minimal · previous review 9a93b

The change makes fillet failures named and typed without changing the reported results. The one remaining ops-mapper question looks consistent with the author's stated intent, so no actionable merge risk remains.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the change: the fillet session's remaining phrase-based failures become typed solver causes, named causes, or reviewed defects. It also identifies the work as part 3 of the typed-error…
Description check Passed The description follows the repository template closely. It has a Change section that explains the work and the problem, with a per-site table of before and after behaviour and the reasons for each ca…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Existing Defaults Unchanged Passed The check asks whether the PR changes a UX default (default setting, preference, usual command behaviour, UI layout, or shortcut). The changed-file inventory has 10 entries, all under `solidcore/crate…
Full details: Title check

Explanation

The title names the change: the fillet session's remaining phrase-based failures become typed solver causes, named causes, or reviewed defects. It also identifies the work as part 3 of the typed-errors series. The changeset matches this: four fillet_executive files convert 19 phrase sites to SolverFailure/BlendFailure variants, add EdgeCurveCacheNotBuilt, and delete four phrase pins. The title is technical and long (142 characters), and it uses internal tracking labels (TE-B-14), but it is related to the main change and is not misleading.

Full details: Description check

Explanation

The description follows the repository template closely. It has a Change section that explains the work and the problem, with a per-site table of before and after behaviour and the reasons for each cause. It states 'Changes a default: no' and gives a test change note for the modified finish.rs tests. The Validation section lists commands run and results. The Screenshots section is not filled in, but the template exempts changes with no useful observable behaviour, and the author states that results do not change. The Integration status section is missing. The Change section also relies on internal shorthand (such as 'ruling items 2, 5 and 7', '§6 rule 6', and the TE-B index) that a reader outside the project may not follow. The template asks for plain words, so the author should define these terms or link to the sources. Overall the description is mostly complete.

Full details: Existing Defaults Unchanged

Explanation

The check asks whether the PR changes a UX default (default setting, preference, usual command behaviour, UI layout, or shortcut). The changed-file inventory has 10 entries, all under solidcore/crates/solidcore/src/: four blend/fillet_executive/ source files, error/blend.rs, error/blend/solver.rs, and four deleted error/pins/phrase/... pin files. No file outside the solidcore kernel crate changes. No settings, preferences, UI, command defaults, or shortcuts change. The PR changes error types and statuses inside the kernel. It adds SolverFailure::EdgeCurveCacheNotBuilt and replaces phrase-based Missing/Failed errors with named causes. The author states that statuses and results are unchanged. The check explicitly says that changed kernel or geometry results under solidcore/ are not changed defaults and pass. The description's Changes a default: no is consistent with the diff, so no mismatch exists to fail on.

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 cdf65fd and 9a93bc5.

Files selected for processing: 10

  • solidcore/crates/solidcore/src/blend/fillet_executive/session.rs
  • solidcore/crates/solidcore/src/blend/fillet_executive/session/ball_regular.rs
  • solidcore/crates/solidcore/src/blend/fillet_executive/session/finish.rs
  • solidcore/crates/solidcore/src/blend/fillet_executive/session/fit_size.rs
  • solidcore/crates/solidcore/src/error/blend.rs
  • solidcore/crates/solidcore/src/error/blend/solver.rs
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/ball_regular.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/finish.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/fit_size.rs.pin
Files with no reviewable changes: 4

  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/ball_regular.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/finish.rs.pin
  • solidcore/crates/solidcore/src/error/pins/phrase/solidcore/src/blend/fillet_executive/session/fit_size.rs.pin

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

brett19 and others added 2 commits November 23, 2026 22:09
…-B-14 part 3)

The 19 phrase sites left in session.rs, session/fit_size.rs,
session/ball_regular.rs and session/finish.rs become named causes, and
their four phrase pins are removed. Every site keeps its status.

- fit_size.rs and ball_regular.rs: a solver without an offset surface
  is SolverFailure::OffsetSurfaceMissing (with SM_ERR_NULL_POINTER), and
  one without its edge use is SolverEdgeUseMissing { index: 0 }.
- session.rs: a geometry without a solver is FilletGeomWithoutSolver, the
  missing vertex corner is FilletVertexWithoutCorner, an edge without an
  end vertex is EdgeWithoutVertex, an edge use without a mate is
  EdgeUseWithoutMate, and a curve cache that fails to build is
  SurfaceFailure::CurveCacheNotBuilt with the build's error as its cause.
- finish.rs: the refused asked setback is CornerRefused (SM_ERR), the
  same cause the session's other noted refusals use. is_missing_corner
  now matches FilletVertexWithoutCorner, and its tests build the new
  cause.

Part of tangency-labs#19824

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… part 3)

The review found that SurfaceFailure::CurveCacheNotBuilt takes the
load_edge_g1_knots failure out of the blend area. solidcore-ops would
then stop typing it as a blend failure, and the app would answer
Status(1006) where it answered Refused(BlendFailed). That is a result
change.

The site now uses a new SolverFailure::EdgeCurveCacheNotBuilt { edge }.
Like SurfaceCacheNotBuilt it has class Failed and status
SM_ERR_NULL_POINTER, and it keeps the cache's error as its cause. A
test covers it. The # Errors docs of bands_meet_at, polygon_fit and
circle_top_fit now name OffsetSurfaceMissing.

Part of tangency-labs#19824

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brett19
brett19 marked this pull request as ready for review November 23, 2026 21:57
@brett19
brett19 requested a review from a team as a code owner November 23, 2026 21:57
@brett19
brett19 requested review from bherbruck and removed request for a team November 23, 2026 21:57
@brett19 brett19 added the approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) label Nov 23, 2026
@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 enabled auto-merge November 24, 2026 01:37
@bherbruck bherbruck added 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 9ed025a Nov 24, 2026
190 of 201 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) 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.

2 participants