Skip to content

feat(planning): profile geodesic developed path + validator + equivalence harness (Stage 3b PR2) - #348

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/vk-developed-builder
Aug 8, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/vk-developed-builder

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Summary

PR2 of #326 (Stage 3b Phase 1), on top of PR1's VonKarman surface + numeric Clairaut kinematics. Adds the developed-path builder, the layer validator, and the equivalence-harness checks — all cloned from the existing cone equivalents. No .wind wiring 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, 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 — 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 inline r(z) and meridian factor (independent of surface.py).
  • Renamed the now-shared _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_circuits passes, and a len(moves) == 22552 integer structural gate (pre-floor z_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), full pytest (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.

…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.
@CameronBrooks11
CameronBrooks11 merged commit 2a63833 into main Aug 8, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/vk-developed-builder branch August 8, 2026 06:13
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.

1 participant