Skip to content

feat(planning): wind cones via .wind endDiameter + cone_reducer golden - #313

Merged
CameronBrooks11 merged 3 commits into
mainfrom
feat/cone-s3b-wind-golden
Jun 29, 2026
Merged

CameronBrooks11 merged 3 commits into
mainfrom
feat/cone-s3b-wind-golden

Conversation

@CameronBrooks11

@CameronBrooks11 CameronBrooks11 commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Stage 3a S3b (#311) — the final slice: exposes cone winding end-to-end through .wind and locks the first cone golden. Completes the Stage 3a epic (#138).

What's here

  • Schema (schemaVersion 1.1) — optional, additive mandrelParameters.endDiameter. A reducing endDiameter makes the mandrel a cone (large end diameter at z=0, small end endDiameter at z=windLength); absent or equal → cylinder (unchanged). Older 1.0 files parse identically.
  • surface_from_mandrel maps the mandrel onto the Cylinder/Cone model; dispatch_layer derives the surface and routes a cone helical layer to build_cone_helical_developed_path (skip is surface-independent; hoop-on-cone is rejected). Cylinder routing untouched.
  • Planner validates per surface (cone → validate_cone_helical_layer) and threads the cone kinematics into dispatch; current_mandrel now carries endDiameter.
  • examples/cone_reducer — a 98→54 mm HPR reducer frustum example (helical geodesic), gated by the equivalence harness (Clairaut geometry + coverage + circuit count + a platform-robust move-count assertion). It is deliberately not byte-goldened: the geodesic's acos/asin coordinates are not bit-stable across platforms (Linux vs Windows differ ~1e-6 on boundary values), so a byte-exact golden is spuriously fragile — this is the harness's intended role.
  • Regenerated wind-schema.json + wind-schema.ts; documented endDiameter + the cone model + a format changelog in wind-format.md; roadmap Stage 3a → Done.

Verification

  • pytest 214 passed; all 7 existing cylinder goldens byte-identical; cone_reducer validated by the equivalence harness (no byte golden — see above).
  • ruff clean; scoped mypy (changed modules) clean. (Bare mypy hits a pre-existing numpy-stub/python_version artifact present on main too — CI's env passes it.)
  • CI schema-drift gate: wind-schema.json/.ts regenerate byte-identical to what's committed.
  • Adversarial review: no blockers — cylinder regression provably clean, cone end-to-end correct, schema additive/drift-free. The two stale-docstring NITs are fixed.

Deliberate scope / deferrals (flagged)

  • G-code header + metrics use the large-end diameter — a documented nominal approximation; precise cone metrics and an endDiameter header marker are a later slice (would touch the IR/serializer/parser with byte-risk to cylinders).
  • schemaVersion not hard-enforced when endDiameter is present — consistent with the documented additive/tolerant-reader policy.
  • Reducing frustum + helical only. Expanding cones, hoop-on-cone, and multi-segment profiles (cylinder-stub joins + Clairaut continuity) remain future work.

Closes #311. Completes epic #138.

Expose cone winding end-to-end. Add the additive, optional
mandrelParameters.endDiameter (schemaVersion 1.1): a reducing endDiameter makes
the mandrel a cone (large end `diameter` at z=0), absent/equal stays a cylinder.

- surface_from_mandrel maps the mandrel onto Cylinder/Cone; dispatch_layer derives
  the surface and routes a cone helical layer to build_cone_helical_developed_path
  (skip is surface-independent; hoop-on-cone is rejected). Cylinder path unchanged.
- planner validates per surface (cone -> validate_cone_helical_layer) and threads
  the cone kinematics into dispatch.
- examples/cone_reducer: a 98->54 mm HPR reducer frustum golden (helical geodesic),
  added to the byte-golden suite and tied to the equivalence harness. All seven
  existing cylinder goldens stay byte-identical.
- regenerate wind-schema.json + wind-schema.ts; document endDiameter + the cone
  model + a format changelog in wind-format.md; mark roadmap Stage 3a done.

minimal: the G-code header/metrics use the large-end diameter (a documented
nominal approximation); precise cone metrics + an endDiameter header marker are
deferred. Reducing frustum + helical only.

S3b of #138 (Stage 3a cones). Closes #311.
The API embeds MandrelParameters, so adding endDiameter (schemaVersion 1.1)
makes openapi.json + the generated TS client stale. Regenerated to satisfy the
CI drift gates. Refs #311.
…olden

The cone geodesic's acos/asin accumulation is not bit-stable across platforms
(Linux vs Windows differ ~1e-6 on boundary coordinates), so a byte-exact golden
is spuriously fragile (CI: Windows differed at one A-coordinate's last digit).
Drop examples/cone_reducer/expected.gcode and the byte-golden entry; rely on the
tolerance-based equivalence harness (Clairaut geometry + coverage + circuit
count) plus a platform-robust move-count assertion. This is the harness's
intended role: take over from byte-equality for non-bit-stable output.

Refs #311.
@CameronBrooks11
CameronBrooks11 merged commit b878232 into main Jun 29, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/cone-s3b-wind-golden branch June 29, 2026 21:53
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.

Stage 3a S3b — .wind cone surface (schemaVersion 1.1) + HPR reducer-frustum golden

1 participant