Repository navigation
Typed errors (TE-O-13, part 1 of 5): the deviation measures' and small queries' failures become named causes or reviewed defects (#19846) - #20315
Conversation
…s#19846) Co-Authored-By: Claude Code <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
184e068 to
261bf53
Compare
… named causes or reviewed defects (TE-O-13 part 1, tangency-labs#19846) The 35 query phrase-cause sites of curve/plane_of.rs, nurbs/crv_deviation.rs, nurbs/srf_deviation.rs, query/contact.rs, continuity.rs, curve.rs, deviation.rs, distance_bound.rs, face_surface.rs and normal.rs become QueryFailure causes (BoundOverflows, NoStationDropped, NoPatchInBox, FaceWithoutSurface, SurfaceWithoutNurbs) or Defect { why }, each with the status of the phrase it replaces; four unreachable sites are deleted by restructuring. Their lines leave the query pin list. Co-Authored-By: Claude Code <noreply@anthropic.com>
261bf53 to
1e180ac
Compare
0a505c6
Change
Part of #19846 (TE-O-13, index #19799), part 1 of 5: the 35 counted sites of the deviation measures and the small queries (
curve/plane_of.rs,nurbs/crv_deviation.rs,nurbs/srf_deviation.rs,query/contact.rs,query/continuity.rs,query/curve.rs,query/deviation.rs,query/distance_bound.rs,query/face_surface.rs,query/normal.rs). Each keeps its status, soupstream_status(), which most goldens units read, is unchanged; anyQueryFailurekeeps it. Each ends as one outcome of §6 ofsolidcore/docs/failure-codes-and-reproduction.md. This part adds the first named causes ofQueryFailure, which the later parts reuse:failed:BoundOverflows(9 sites: every number given is finite, as each entry point checks first, but the bound or the curves' size overflows the floating range; one condition in three files),NoStationDropped(an empty search, rule 7: no station of the curve dropped onto the other).unsupported:SurfaceWithoutNurbs, a surface (or an analytic surface's B-spline base) whose NURBS net was never made or could not be made.kind_with_nurbleaves "a NURB that cannot be made" missing, so it is not proved to be the kernel's fault; the neighbouring arm ofexact_of("no control net to enclose the surface on") isUnsupportedtoo.invalid_input:FaceWithoutSurface(status 1006, as before),NoPatchInBox(a UV box within the rounding of the patches' knot range but past every patch: the range check lets it through, and the heap of pieces starts empty).as_b_splinealways returns.splitreturns four), the three axes of a box ([f64; 3]), and the two sides of an edge (a[_; 2]array, each side returning early onNone). Each is now a destructuring that cannot fail.Each site's outcome (lines on main at 9d1194d)
Why five parts: 146 sites in 23 files. Part 2 takes
query/api_queries.rswithquery/brep.rs; part 3query/edge.rs,query/face/p1.rs,p3.rs,p4.rsandquery/tess.rs; part 4 the poly B-rep (query/poly.rs,query/poly/copy.rs,query/poly_properties.rs); and part 5, last,query/brep/ray.rs,query/brep/ray/live.rsandquery/face/p2.rs, beside @brett19's #20062 and #18065, off their lines. This part touches no line of the open PRs on its files (#13891, #14683 oncurve/plane_of.rs; #15375, #18536 onquery/distance_bound.rs).Changes a default: no
Three sites change their class at an unchanged status:
face_surface.rs's two (missingtoinvalid_input, 1006) anddistance_bound.rs's empty box (failedtoinvalid_input, 1001), as rules 2 and 9 ask and asIntersectFailure::FaceWithoutSurfacealready is;normal.rs's missing net goes fromfailedtounsupported(1001). No library code matches on these kinds.Test change:
plane_of'scurves_too_large_for_the_bound_are_refused_not_read_as_a_planeasserted onlyErr(Failed(_)); it now assertsBoundOverflowsand status 1001. New tests reachBoundOverflowsatcrv_deviation'slargest_gap(from bothcertified_distanceandcertified_hausdorff),NoPatchInBoxandFaceWithoutSurface(face_surface_feet) at their sites, each with cause, status and class;error/query.rschecks every new cause's status and class. No test reachesNoStationDropped,SurfaceWithoutNurbs, the otherBoundOverflowssites or the defects at their sites; their statuses rest on the goldens.Validation
Full gate at the head 1e180ac (base 9d1194d,
sc_gate_v2.sh --full), RESULT pass:cargo fmt --check, the repo checks underscripts/ci,cargo clippy -D warnings, the wasm build: pass.cargo test -p solidcore: 7780 passed, 0 failed, 56 ignored. This includeserror::query::tests::the_query_phrase_cause_sites_only_shrinkwith the ten lines removed, and the new tests above.xtask kernel-cases, all shards): no red case.tests/KNOWN_FAILING_TESTS.Not run: the test suites of crates this change does not touch, doctests and publish dry run, left to CI.
Units: all (these files have no goldens unit of their own; they are reached through the importing units, all 283 run)
In scope: the 35 counted sites of the ten files above, their pin lines, and the QueryFailure causes they need
Out of scope: the other 111 sites of #19846 (parts 2 to 5)
Screenshots of the behavior (when observable)
Nothing to see: the statuses, and so every result, are unchanged; only the error's cause and class are new.
Integration status
Checked against upstream main f37ef57: the whole stack (this part and parts 2 to 5) merges without conflict, and main adds no query phrase site in these files.
Co-written and tested with Claude Code (AI).
Summary by CodeRabbit