Repository navigation
feat(planning): profile geodesic developed path + validator + equivalence harness (Stage 3b PR2) - #348
Merged
Conversation
…ce harness PR2 of #326 (Stage 3b Phase 1). Builds on the VonKarman surface + numeric Clairaut kinematics from PR1; still no .wind wiring or dispatch (PR3). - developed.build_profile_helical_developed_path: clones the cone helical builder, sourcing theta(z)/alpha(z) from the numeric quadrature and spanning the reachable band [0, z_cap] (the geodesic turns around at the cap, not the tip). Reuses lower_developed_path unchanged. - validators.validate_profile_helical_layer: numeric bounds -> profile kinematics (re-raising the vanishing-band ProfileReachabilityError as a LayerValidationError) -> shared _validate_coverage over the band. The bare cap is reported (cap_diameter), not rejected. - tests/_equivalence: assert_profile_geometry/coverage/circuit_count + profile_helical_layer_moves. The geometry check re-derives r(z) and the meridian factor sqrt(1+r'^2) from its own inline closed form (independent of surface.py) and recovers the fiber angle from the emitted IR deltas. Equivalence-gated (no byte golden): a VK layer lowers to a valid geodesic program (Clairaut invariant + coverage + 2*num_circuits passes + a len(moves) integer gate), with negatives proving the check is non-vacuous — a perturbed Clairaut constant and a theta table built without the meridian factor both fail. Part of #326.
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.
Summary
PR2 of #326 (Stage 3b Phase 1), on top of PR1's
VonKarmansurface + numeric Clairaut kinematics. Adds the developed-path builder, the layer validator, and the equivalence-harness checks — all cloned from the existing cone equivalents. No.windwiring or planner dispatch yet (PR3); the new code is reachable only from tests until then.What's here
developed.build_profile_helical_developed_path— clones the cone helical builder, sourcingtheta(z)/alpha(z)from the numeric quadrature and spanning the reachable band[0, z_cap](the geodesic turns around at the cap, not the tip). Reuseslower_developed_pathunchanged.validators.validate_profile_helical_layer— numeric bounds → profile kinematics (re-raising the vanishing-bandProfileReachabilityErroras aLayerValidationError) → shared_validate_coverageover the band. The bare cap is reported (cap_diameter), not rejected.tests/_equivalence—profile_helical_layer_moves+assert_profile_geometry/coverage/circuit_count. The geometry check recovers the fiber angle from the emitted IR deltas (tan α = r·dθ / (√(1+r'²)·dz)) using its own inliner(z)and meridian factor (independent ofsurface.py)._cone_lay_stations/_cone_laying_segments→_lay_stations/_laying_segments.Validation
Equivalence-gated (no byte golden): a VK layer lowers to a valid geodesic program — Clairaut invariant, coverage,
2·num_circuitspasses, and alen(moves) == 22552integer structural gate (pre-floorz_cap= 207.95 mm, far from the snap boundary → cross-platform stable). Non-vacuity negatives: a perturbed Clairaut constant and a θ-table built without the meridian factor both fail the geometry check. Validator tests: reachability re-raise type, lead-in-exceeds-band rejection, happy-path kinematics.Local gate:
ruff,mypy(changed modules), fullpytest(292) green. Adversarial subagent review (no correctness defect; its findings — the validator test gap, an over-loose anchor tolerance, and the helper renames — are folded in).Part of #326.