Skip to content

difftest: curve.curve_p4 real Ellipse distance equations - #1048

Merged
bherbruck merged 3 commits into
tangency-labs:mainfrom
altvnk:fix/curve-p4-ellipse-distance
Oct 26, 2026
Merged

bherbruck merged 3 commits into
tangency-labs:mainfrom
altvnk:fix/curve-p4-ellipse-distance

Conversation

@altvnk

@altvnk altvnk commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Scoped completion claim

Units: curve.curve_p4.

In scope: genuine noncircle Ellipse as an ordinary curve input, plus one named
SmCPDistAtENFO::Evaluate regression comparing all equations and Jacobian entries.
Existing ellipse analytic operands do not reach this ordinary-curve evaluator;
existing circle shorthand constructs a B-spline and will remain unchanged.

Expected edits:

  • crates/difftest/src/units/curve_curve_p4.rs
  • crates/solidcore-ffi/src/units/curve_curve_p4.rs
  • harness/cpp/shim/curve_curve_p4.cpp
  • fixtures/curve.curve_p4/analytic-distance.json

Evidence: fresh inspected main b206d3f5a38127dc3a0b6c511f1b45116826b341
admits only ordinary B-spline/Hermite/Line protocol kinds. Reuse the existing real
ellipse constructor and validation in this unit's dedicated analytic path, adding
ordinary kind 3 without reinterpreting kinds 0–2 or restricting the new kind to one
operation. Its ordinary block places dimension before geometry; the old analytic
operand layout and read order stay unchanged. No production interface is needed.

One bounded, noncanonical Rust-only probe used radii (2,1), angular extent
[0,180], actual NURB interval [0,1], point (0.25,-0.5,0.25), dsq=1,
sqtol=0, variables [0.5,0.1,0.2,0.3] and Jacobian enabled. Four finite equations
and all 16 Jacobian entries matched source controls; geometric J[0,0] was
approximately 2.8284271247461885. This evaluates equations, not a solved distance
or root. No native or fresh-head success is claimed by that probe.

Validation planned: actual fixture discovery/encoding and real-kind/domain tests;
source-derived equation and Jacobian controls; new-kind generic admission and old
guard/error-order preservation; modified-shim compilation and complete native
records; a targeted nonzero geometric-Jacobian perturbation; complete unfiltered
affected unit and perturbation; formatting and CPP-enabled Clippy; independent
final-diff review; all canonical exact-head native/value-share/exact-base gates.
Reuse shared reference libraries read-only. A native mismatch or extra production
need blocks this scope, rather than causing an input, guard or tolerance change.

Preserve every old fixture, generated input, RNG draw/seed/minimum, kind layout,
validation predicate, output entry, mismatch, numerical formula, tolerance and
status. No production, cache, shared-interface, plan, workflow or old-fixture edits.

Related PRs / dependencies: #686 ellipse STEP mutation, #1031/#1042 cache/interfaces,
#1041 p9 diagonal coverage and #1047 p6 Sphere coverage remain separate and untouched.
Available follow-ups: other concrete-kind/operation success paths are unclaimed;
generic admission does not establish their coverage.

Status / blockers / next step: scoped draft; implement the reviewed four-path
protocol and fixture, establish native equivalence, then await canonical CI.
Maintainers retain workflow authorization, approval, queue admission and merging.

Published draft: exact-head evidence

Head 31fc16fe56ffe6751c0ba8b47890da69d4e4b19b, safely synchronized with authoritative main f4d002bb0a6dc5d49928a80213eb9ade8cdab7bd.
Independent final source review accepted fingerprint 7f41403ebbe5b2ebbecdd2c014bccdcd3b31db7b22812494600daed1a145571b.
Reviewed binary PR diff unchanged across safe merge; all old fixtures/generator
inputs/kind layouts/guards/numerical formulas and tolerances are preserved.

2 focused CPP runner tests and3FFI admission tests passed
PASS curve.curve_p4 cases=3260 passed=3260 failed=0 deferred=0 max_rel_err=0e0 with_values=3260 no_values=0 vacuous=0
SENSITIVE curve.curve_p4 perturbed=3260 detected=3260 unperturbed=0 deferred=0
CPP-enabled Clippy both changed Rust crates all-targets -D warnings: PASS
workspace formatting and diff checks: PASS
Operation / symbols Implementation Successful native comparison Remaining gap
SmCPDistAtENFO::Evaluate; ellipse_cp_dist_at_interior_full_jacobian Generic genuine noncircle Ellipse ordinary curve kind3; existing equations unchanged Full4equations+16Jacobian entries+found flag and status compare; J00~2.8284271247461885; targeted nonzero geometric Jacobian perturbation rejected Equation evaluation only, not a solved distance/root; other admitted operations not newly demonstrated

Source-preserving identical Hermite/Ellipse range arms were consolidated to satisfy
Clippy. This changes neither old decisions nor generator selection. Shared native
reference hashes/mtimes unchanged, no rebuild. Local macOS evidence is not canonical
Linux or implementation-completeness proof. Ready for review by explicit user instruction; canonical CI is still pending.

User-authorized review status

Marked ready for review at the user’s request after local native validation and independent source review. Canonical CI was authorization-blocked at the latest audit; this transition does not claim green CI, approval, queue admission or merge readiness. Maintainer workflow authorization and all required checks remain mandatory. No source commit or workflow configuration changed.

Co-Authored-By: GPT-6.1 Sol Fast <noreply@openai.com>
altvnk and others added 2 commits October 26, 2026 01:05
Add genuine Ellipse ordinary-curve input and complete point-distance equation
and Jacobian comparisons. Preserve old curve kinds, fixtures, generators,
guards, numerical formulas and tolerances.

Co-Authored-By: GPT-6.1 Sol Fast <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol Fast <noreply@openai.com>
@altvnk

altvnk commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@bherbruck — exact published draft head 31fc16fe5 passed independent final source review, local2CPP+3FFI tests, full native curve.curve_p4 3260/3260 cases, perturbation3260/3260, CPP-enabled Clippy and formatting. The new genuine Ellipse fixture compares all4equations/16Jacobian entries/found flag and status; old fixtures, generator inputs, guards and tolerances are unchanged. Canonical run40248674299 requires authorization and has executed zero jobs. Please inspect/authorize it; draft remains pending all13canonical jobs/native/value-share/exact-base retention. Equation evaluation is not a solved-distance claim; no technical CI failure or merge-readiness claim.

@altvnk
altvnk marked this pull request as ready for review October 26, 2026 00:38

@bherbruck bherbruck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by the automated first-pass review: CI green, mergeable, no CI/build/dependency file changes, no red-flag patterns in added code (process/network/env/unsafe outside FFI/blobs/hidden unicode), 0 known-mismatch entries added. Logic is gated by CI and the difftest merge queue.

@bherbruck
bherbruck added this pull request to the merge queue Oct 26, 2026
Merged via the queue into tangency-labs:main with commit 5feebf2 Oct 26, 2026
13 checks passed
@altvnk
altvnk deleted the fix/curve-p4-ellipse-distance branch October 26, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants