Skip to content

Stage 2 / S2 — developed-surface geometry + single IR lowering + equivalence harness; cut over helical #296

Closed

Description

@CameronBrooks11

Part of the Stage 2 epic #137. Depends on S1.

Goal: Build the developed-surface path geometry + a single primitive → Motion IR lowering, stand up the equivalence harness that replaces byte-equality as the regression gate, and cut helical (the hardest pattern) over to it first.

Scope

  • Developed-surface geometry: represent a constant-angle path as a straight line in the unwrapped cylinder (z, θ) plane (closed-form — cylinder is developable, no ODE), with turnarounds/dwell at the ends.
  • One lowering primitive → IR mapping (z, θ) + delivery-head kinematics to X/A/B Moves, consuming the Stage 1 Motion IR (planning/ir.py).
  • Equivalence harness (the new gate, since output bytes change):
    • coverage invariants — circuit count, full angular coverage, gcd/divisibility/lock-slot conditions;
    • simulator parity — nominal_metrics time/material within tolerance vs the pre-cutover output;
    • geometry — achieved fiber angle matches target alpha within tolerance.
  • Cut helical over to the unified path; regenerate the helical goldens (FIBERPATH_UPDATE_GOLDENS=1) and document why they changed.

Done when

  • Helical plans through the developed-surface primitive + single lowering.
  • Equivalence harness is green for helical on all examples/ parts incl. rocketry/ and runs in CI.
  • Regenerated helical goldens are committed with a rationale.

Activity

  1. added
    enhancement
    python
    on Jun 29, 2026
  2. CameronBrooks11 commented on Jun 29, 2026

    @CameronBrooks11
    MemberAuthor

    Done in PR #301 (merged).

    Delivered: the developed-surface (z, θ) primitive + single PatternSpec → Motion IR lowering (fiberpath/planning/developed.py), helical cut over to it (plan_helical_layer now delegates), and the equivalence harness (tests/planning/_equivalence.py + test_pattern_equivalence.py) — coverage (gcd tiling/no-gap), on-surface fiber angle, delivery-head lean, and old-vs-new metric parity. The harness is validated both ways (passes on the cutover, fails on broken inputs).

    Scope change — byte-equality kept, goldens not regenerated. The mirror lowering came out byte-identical to the prior emitter across all cases (high-angle negative tail term, skipInitialNearLock, pattern-4/skip-3, degenerate lead-in/out), so the existing byte-equal goldens still pass. Retiring a passing gate would buy nothing, so the originally-planned "regenerate goldens / remove helical byte-equality" steps are deferred to the first slice that actually changes bytes — the clean structural collapse (one move per vertex) or cones (#138). The equivalence harness exists and is validated, ready for that moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions