feat(ccx): L62 isolated tolerance tier — membership is d_min <= tol, closed, at every tol - #47
Merged
Conversation
…closed, at every tol The owner contract (2026-08-18): tol is the acceptance distance, the standard CAD semantics; topology correct at every tol. The 5d05ddc strict machinery is re-scoped, not reverted — it grades the certification tag and guards sub-atol topology, with NO membership role. Engine (_bez_ccx4.py): - vector-residual hull demoted from cell prune to zero-free certificate (it excludes exact zeros, not tolerance members — pruning on it was the near-miss loss site: a z-gap of tol/1e6 erased the intersection) - terminal cells: strict polish unchanged; on failure a Gauss-Newton minimizer polish + net-certified d_min measurement (two-term operand envelope; source term prices rational world-scale products only — polynomial D-construction is translation-invariant by Sterbenz) - closed membership at measurement resolution; typed uncertified_contacts when the envelope covers tol at decision scale (|coords| >~ atol/eps tail) — never a guess - Phase-1 lift: four-boundary endpoint-contact scan at level tol² - pool drain with component rules: argmin per connected sub-tol region (owner: no band outcome exists), connectivity suppression against exact roots and overlap spans — the tiers cannot double-count - envelope-slacked min-of-net/Lipschitz bars keep gap == tol alive - descent cost: coarse terminal stops for zero-free cells (wholly-in-band; Hessian-PD unique-minimizer via _check_uniqueness_2d) + anisotropic refinement for collapsed pieces (half the dedup radius). Measured: the shallow rational ellipse-spline crossing 545k -> 587 cells; the 11-curve 3D grid 46s -> 2.4s - tolerance_tier=False restores exact-only for engine callers (CSX nested boundary-zero call — its own tier is a separate ledger item) Adapter (_nccx4.py): certification/d_min in the isolated dtype, span-seam dedup prefers exact then lower d_min, seam verification closed (> tol). Tests: the two strict xfails now FIRE and are unpinned (grid 25/25, dedup == 25); parallel-planes accept-path pins re-scoped per owner decision (membership tracks realized gap both directions at every world position; resolvable gaps never certify 'exact'); new tests/test_ccx4_tolerance_tier.py ((gap,tol) law incl. closed equality, translation invariance both directions, endpoint/corner contacts, dip-through never-merge, tangent graze argmin-only, 2D, typed cannot-decide tail). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s, pin re-scope, CSX opt-out) + measured implementation notes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…before verdict typing An unresolvable measurement of an already-resolved component is not a typed outcome: a candidate inside the dedup ball of an accepted exact root (or on a certified overlap span) is suppressed regardless of its membership verdict. Measured: at tol=1e-6 the sq-dist net's sqrt roundoff floor exceeds atol at ordinary model scale, and the exact seam touch of a boolean2d ray cast flagged its own root's neighborhood as uncertified_contacts, marking the ray topology incomplete — the four boolean2d regressions in the full suite. Connectivity suppression (a member-verdict predicate) still runs for decided members only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… basin-clamped minimizer, structural jurisdiction, adapter typed-continuation 15/15 review findings sustained by 2-skeptic verification, all reproduced; this batch closes every engine/adapter defect: - MEASUREMENT (critical): the global net envelope scales with the pair's extent squared and reached an ACCEPT path (d_hat <= atol + eps_d), so |ctrl| ~ 3e3 with atol=1e-3 accepted gaps up to 1.68*atol certified- complete, armed the cannot-decide tail ~6 orders early, and widened the connectivity walk over super-tol ridges (silent merge of distinct contacts). Fixed by _measure_direct_distance (de Casteljau + subtract + norm; envelope ~ eps*|coords|, weight-conditioned) combined with the net measurement — the smaller certified envelope governs at every scale. - BASIN DISCIPLINE: the tolerance minimizer is clamped to its cell — unclamped Gauss-Newton jumped super-atol ridges into deeper basins and the abandoned basin's contact vanished (triple-dip fixture). - JURISDICTION: the tier no longer stands down call-wide on overlap-class or band evidence (that silently deleted members with topology claimed complete); suppression is structural — certified overlap spans, and band-anchor CONNECTIVITY armed only when the L47 certificate holds crossing evidence, which is exactly the never-merge boundary. - COMPONENT RULES: connectivity now follows the pairing (per-sample inversion with arrival check) instead of the straight (u,v) chord (a curved component shipped as several contacts; grid-verified fixture now reports exactly one contact per component at the argmin); the 3D-point radius shortcut is removed (it merged disconnected components whose witnesses fell within atol in space). - ENDPOINT BAR: the pre-filter gets the envelope slack every other level-atol bar has (gap == atol contact survived 300/300 rotations, was 166/300). - ADAPTER: a per-candidate typed cannot-decide no longer aborts the whole scan — payload lands on status['uncertified_contacts'] with global params and curve indices, aggregate marked incomplete, scan continues (fail-fast opt-in still raises, naming the typed cause); the NURBS-level seam re-verification carries an operand slack so it cannot reverse the engine's closed-boundary decisions. New pins in tests/test_ccx4_tolerance_tier.py cover every fixture above. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…combined measurement, basin clamp, structural jurisdiction, adapter typed-continuation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…embership; certification/d_min in isolated results) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
L62: CCX tolerance tier for isolated intersections
Implements the owner contract (issue doc 2026-08-18): intersection existence is tolerance-determined — at any
tol >= d_mina curve pair has exactly one isolated intersection there; at anytol < d_minit has none; topology correct at everytol. The 5d05ddc strict machinery is re-scoped, not reverted: it grades thecertificationtag ('exact' | 'tolerance', metadata only) and guards sub-atol topology, with no membership role.Engine (
_bez_ccx4.py)uncertified_contactswhen the envelope covers tol at decision scale — never a guess.tolerance_tier=False= exact-only legacy (used by the nested CSX boundary-zero call).Adapter (
_nccx4.py)certification/d_minin the isolated dtype; span-seam dedup prefers exact then lower d_min; seam re-verification closed with an operand slack; typed cannot-decide recorded onstatus['uncertified_contacts']without aborting the scan.Verification
-m "not slow": 841 passed, 0 failed, 1 xfailed;check_imports/check_layeringclean.🤖 Generated with Claude Code