solidcore

Units / heal

heal.heal_data_p3 green

Layer
50
Upstream lines
1,939
Functions
9
Rust module
heal::heal_data::p3

Status history

Oct 12Nov 25
  1. todo 1,967 lines
  2. partial 1,967 lines
  3. green 1,967 lines

Source: crates/solidcore/src/heal/heal_data/p3.rs

Upstream: source/SMLib/src/SmHealData.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

GREEN (PR #771, 2026-10-24): cases_total = 478, cases_passed = 478, cases_failed = 0, cases_deferred = 0; max_rel_err=0e0, no absolute floors. main CI e33985411 (2026-10-23): PARTIAL heal.heal_data_p3 cases=478 passed=457 failed=0 deferred=21 blocked_by=intersect.curve_class_p4(19),topology.face_p2(2). 9 fns; largest: SmHealData::HealTgts, SmHealData::Fix_SplitEdgesAtSeam, SmHealData::Fix_DegenFaces, SmHealData::UpdateTargetLists; unit-SCC #22 (220 units); 59 upstream test entry points reach this unit; PR #164: 474 difftest cases, 267 passed, 0 failed, 207 deferred (topology.brep_p1 50, topology.edgeuse_p3 74, topology.face_p2 61, topology.face_p3 20, topology.face_p4 2), max_rel_err=0, no absolute floors. Ports all 9 owned functions and wires HealBrep to HealTgts; target catch-up recursion bounded at 32. Topology mutations defer at their owning units; generic nonempty classification outputs require a typed resolver when those callees land. Maintainer review: restored seam-success flags, cross-face merge statuses/edge list, last-occurrence wire dedupe, null-face skips and ignored statuses; native incremental-voxel catch-up guard (UB-36), 20 review fixtures and 3 independent safe-FFI regression tests. FindEdgeObjects now calls p7 after merging PR #65; IsLiveTopologyMember co-port recorded under topology.brep_p1. Round 2: reject post-removal target/props drift for every kind before any nonempty add (UB-163), bound target-to-props lookups, and derive voxel checks from target counts/live adds. FindEdgeObjects resolver errors propagate. The p5 adapter retains completed merge outputs on failure; actual mutation remains deferred. Added 24 differential regressions and a 240-combination native safety matrix (5 FFI tests total). [topology.edgeuse_p3 merged (PR #117): the 74 topology.edgeuse_p3 deferrals now run, 12 pass and 62 defer further on topology.face_p2: 474 cases, 279 pass, 0 failed, 195 deferred (topology.face_p2 123, topology.brep_p1 50, topology.face_p3 20, topology.face_p4 2)] UPDATE (PR #145, topology.brep_p1): the 50 topology.brep_p1 deferrals (SmBrep::GetThisModelSizeEstimate) continue to SmBrep::SetTolerance in Fix_TolSizes: 474 cases, 267 pass, 0 failed, 207 deferred (topology.edgeuse_p3 74, topology.face_p2 61, topology.brep_p2 50, topology.face_p3 20, topology.face_p4 2); report re-run. heal_data_p3's private co-port live (SmBrep::IsLiveTopologyMember) now calls the owner's port topology::brep::p1::is_live_topology_member (identity on the face/edge/vertex lists; same answers on every case: Rust has no entity removal yet and other kinds fall through the target match), report unchanged. [topology.face_p3 wired (PR #139): the 20 topology.face_p3 deferrals now defer inside IsDegenerate at the SmCurveClassification constructor (intersect.curve_class_p4); counts: see reports/difftest/heal.heal_data_p3.json] UPDATE after topology.brep_p2 (PR #149) wired SmBrep::SetTolerance: the 50 topology.brep_p2 deferrals now run Fix_TolSizes on: 474 cases, 314 pass, 0 failed, 160 deferred (topology.edgeuse_p3 74, topology.face_p2 61, topology.face_p3 20, topology.shell 3, topology.face_p4 2), max_rel_err 0. Re-run after merging #145 5b1b28ae (main through e1ae2640) into #149: 474 cases, 329 pass, 0 fail, 145 deferred (topology.face_p2 123, topology.face_p3 20, topology.face_p4 2), --perturb SENSITIVE 329/329. The Fix_BadSheets step builds an empty notify state (brep::p2::RegionNotifyState: empty AttributeStore, default region records) for the region split's SmBrep::Notify: the heal path carries no attribute state at any level, so SmSAGObject attribute propagation during healing is not modelled (plan/findings.md); thread an env from heal_targets once heal gains an AttributeStore. Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 474 cases, 329 pass, 0 fail, 145 deferred (topology.face_p2 123, intersect.curve_class_p2 20, topology.face_p4 2); 50 SmBrep::SetTolerance deferrals pass. UPDATE after topology.brep_p3 (PR #204): SqueezeEdge/DeleteFace call topology::brep::p3 (DeleteFace(f, TRUE, nest, keep)); their statuses now flow as upstream (SM_ERR ignored where upstream ignores it); a completed edit stops at UNPORTED(heal.heal_data_p3) for the SmTrackTopologyChanges lists, unreached today: 474 cases, 314 pass, 0 failed, 160 deferred (topology.edgeuse_p3 74, topology.face_p2 61, topology.face_p3 20, topology.shell 3, topology.face_p4 2). UPDATE (PR #204, after its pre-review of def87558): the UNPORTED(heal.heal_data_p3) end of a completed SqueezeEdge/DeleteFace is replaced by a real tracker: each edit runs under SmTrackTopologyChanges (SmHealData.cpp:3341 and the later loops) on a context of its own that borrows the kernel context's notify callbacks (tracked_edit), and its Changes are the tracker's Rm/Add lists filled by SmTopologyChangeCallback::Execute, CO-PORTED into topology::topology; DeleteFace's deleted list (sDelObjs) is read separately, and an edit whose status is ignored keeps what was tracked before it failed; still reached by no case: 474 cases, 314 pass, 0 failed, 160 deferred, case-by-case unchanged. UPDATE (PR #204, review of c7f6299b): the tracked edits now seed every object's SmTopology record (topology::brep::p3::seed_topology_records) before the edit, as each C++ object has one; before, SqueezeEdge's SM_NO_MERGE_IN_BREP failed with InvalidInput on an ordinary wire chain, after the squeezed edge's uses were removed (unit test healer_squeeze_of_a_wire_chain_completes_under_its_tracker: removed [edge, A, B], added [A]). Upstream keeps one tracker per heal loop (e.g. FixDegenFaces, SmHealData.cpp:3491-3678); the port runs one per edit and merges their lists with Changes::append, the same lists for these edits. The owner table (TrackTopologyChanges::set_owner) is empty in heal, so a geometry notification finds no owner; only the Chg list depends on it, and Changes never reads Chg. No heal case reaches a completed edit natively (they defer earlier): 474 cases, 329 pass, 0 failed, 145 deferred, unchanged. UPDATE (PR #204, Codex re-check of 4bcf870c): SqueezeEdge's curve notifications use identities of their own (topology::brep::p3::GeometryIds, keys of a kind above every edit_key kind), not the edge's; objects the edit makes get their default record when first notified (brep::p3's brep_notify). Report unchanged. UPDATE (PR #204, Codex re-checks of 3bfcf6ca / 19c85387): a curve carries the identity it is notified under (Curve::notify_key), given from the kernel context's geometry keys (Context::new_geometry_key), so it is unique across the healer's edits, fresh or cloned healers and anything else under the same callbacks; unit test curve_identities_survive_healer_instances (public fix_degen_edges: H1 squeezing AB keeping B, then a fresh H2 and a clone of H1 squeezing BC). Report unchanged. UPDATE (PR #204, Codex re-check of 98fec50f): curve keys are valid only in the issuing context's domain and caller keys may not use the geometry range; the healer regressions are curve_identities_survive_a_fresh_healer and _a_cloned_healer (AB's uses reversed so B is kept: H1 fails with SM_ERR, then a fresh H2 / a clone of H1 made before H1's edit squeezes BC; distinct curve keys). UPDATE (PR #204, Codex re-check of d61f8d48): tracked_edit lends the kernel context's callbacks with their identity domain (Context::take_notify_lease), and the edits notify kernel-issued identities: edit_key / edit_entity are replaced by brep::p3::topology_ref / topology_entity with the B-rep's serial; seed_topology_records is removed (the edits seed). Report unchanged. UPDATE (PR #204, overseer ruling on the 9129d9f2 reviews): tracked_edit runs through brep::p3::with_lent_context / kernel_named_edit (shared with with_kernel_callbacks): kernel-named topology (the healer keeps no identities of its own), the B-rep under its kernel key for the edit; a nested tracked edit (or one inside with_kernel_callbacks) is refused before anything changes (unit test nested_tracked_edits_are_refused). Report unchanged. UPDATE (PR #204, #149 da779c51 merge): #149's capture_changes (p5 edits, arena identities via loopuse::entity_of_notify_key) and #204's tracked_edit (p3 SqueezeEdge / DeleteFace, kernel identities via brep::p3::topology_entity) coexist; tracked_edit supplies no geometry-owner metadata (#194's callback records a geometry owner walk as a capture failure, which leaves only the Chg list short; Changes reads Rm/Add). 474 cases, 329 pass, 0 fail, 145 deferred: report unchanged. UPDATE (PR #204, Codex review of 255d52b7): capture_changes decodes its tracker's keys with topology::brep::p3::topology_entity and the B-rep's serial (part 5's plain edits now run under the kernel's identities), as tracked_edit does; one decoding scheme for both Owner zone-tol cache (surface/owner-zone-tol): 478 cases, 401 pass, 0 fail, 77 deferred.

Goldens

This is committed inventory, not a runtime result or a correctness proof. A golden records what solidcore produced when blessed. Current results require the canonical CI gate, not these counts.

Golden records
702
Stored error outcomes
0
Stored deferrals
0
Stored harness rejections
0
Known-failure entries
0

Metadata counts describe fields in the stored records; they are not passes or live failures.

Source at f9704ee3b: golden JSONL · known-failure list.

Dependencies

Depends on: geom.context green heal.face_props green heal.heal_data_p1 green heal.heal_data_p2 green topology.brep_p5 green topology.edge green topology.face_p2 partial topology.loopuse green topology.topology green

Soft dependencies: geom.object green geom.tol green geom.vector3d green intersect.curve_class_p2 green intersect.curve_class_p5 green intersect.curve_class_p7 green surface.surface_p2 partial surface.surface_p3 green surface.surface_p7 green topology.brep_p1 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p8 green topology.edgeuse_p1 green topology.face_p1 green topology.face_p4 green topology.shell green topology.vertex green topology.vertexuse green

Dependents: audit.recursion green

Soft dependents: none

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmHealData::UpdateTargetListsSmHealData.cpp:101546[HealData::update_target_lists]
SmHealData::UpdateTargetListsSmHealData.cpp:1073246[HealData::update_target_lists]
SmHealData::HealTgtsSmHealData.cpp:1724626[HealData::heal_targets]
SmHealData::Fix_CoinVerticesSmHealData.cpp:328699[HealData::fix_coin_vertices]
SmHealData::Fix_DegenFacesSmHealData.cpp:3465130[HealData::fix_degen_faces]
SmHealData::Fix_DegenEdgesSmHealData.cpp:360180[HealData::fix_degen_edges]
SmHealData::Fix_MoveSeamSmHealData.cpp:4138198[HealData::fix_move_seam]
SmHealData::Fix_SplitEdgesAtSeamSmHealData.cpp:4342363[HealData::fix_split_edges_at_seam]
SmHealData::Fix_SplitFaceAtSeamsSmHealData.cpp:5307151[HealData::fix_split_face_at_seams]
Module file-header table (10 rows)
RustUpstream
[HealData::update_target_lists]SmHealData::UpdateTargetLists(array overload)
[HealData::update_tracked_targets]SmHealData::UpdateTargetLists(tracker overload)
[HealData::heal_targets]SmHealData::HealTgts
[HealData::fix_coin_vertices]SmHealData::Fix_CoinVertices
[HealData::fix_degen_faces]SmHealData::Fix_DegenFaces
[HealData::fix_degen_edges]SmHealData::Fix_DegenEdges
[HealData::fix_move_seam]SmHealData::Fix_MoveSeam
[HealData::fix_split_edges_at_seam]SmHealData::Fix_SplitEdgesAtSeam
[HealData::fix_split_face_at_seams]SmHealData::Fix_SplitFaceAtSeams
calls topology::brep::p1::is_live_topology_member (unit topology.brep_p1; it replaced the private co-port live)SmBrep::IsLiveTopologyMember

Upstream tests reaching this unit

prog_test:my_test_closed_sphere_properties, prog_test:my_test_squeeze_edge_tracks_removal, prog_test:my_test_missing_poles_refreshes_all_faces, SM_API_test:TestSmHealBrep, SM_API_test:TestSmHeal, prog_test:my_test_MakeFace, pt_TestFiles/MakeFace/ApproximateSphere.smp