refactor(core): retire the dead crease-line path + gitignore render artifacts #11

Merged
toph merged 1 commit from v0.10-cleanup into main 2026-06-30 06:16:22 +00:00
Owner

Cleanup #6 — retire dead code and ignore render scratch. No behaviour change; beloch fold output is identical.

Since #10 switched fold_string to the face-based path (eval_foldedto_json_folded), the old crease-line pipeline is dead. This removes it:

  • lib/planarize.ml, lib/faces.ml — deleted.
  • Eval.eval (the crease list evaluator) and the Eval.crease type — deleted; corners, folded, and eval_folded stay.
  • lib/state.ml — trimmed to just provenance (the vertex/edge/t/add_* machinery only fed Planarize).
  • beloch.ml — drops the Planarize/Faces re-exports.
  • The orphaned planarize/faces/state test groups — deleted (69 tests, was 76; the removed tests only exercised the dead path).
  • .gitignore — adds lib/parser.conflicts and root-level render scratch (/*.fold, /*.svg, /*.png).

Assumptions made at forks (no input requested):

  • Kept the now-unused Geom helpers (signed_area, ccw_compare, clip_to_unit_square, segment_intersection) rather than pruning them. They were only used by Faces/Planarize, but they are small, tested, exact-geometry utilities with no .mli (so no unused-value warning), and plausibly reused by future slices (e.g. signed_area/ccw_compare for layer geometry). Pruning them would be churn for little gain.
  • lib/parser.conflicts is gitignored, not just deleted — it is an empty, stale menhir --explain artifact; a fresh build does not regenerate it (the grammar is conflict-free), but --explain would write it again if a future grammar change introduced a conflict, so ignoring it is the durable fix.
  • Root-level *.fold/*.svg/*.png are gitignored (not examples/, which is .bel only) — these are beloch fold / fold2svg scratch outputs that shouldn't be committed.
  • Left State named State (now just provenance) rather than renaming to Provenance, to keep the diff minimal and the pr.State.axiom access sites stable.

fold2svg itself (the legend wording fix) is a separate PR so this one stays core-only.

Cleanup #6 — retire dead code and ignore render scratch. No behaviour change; `beloch fold` output is identical. Since #10 switched `fold_string` to the face-based path (`eval_folded` → `to_json_folded`), the old crease-line pipeline is dead. This removes it: - `lib/planarize.ml`, `lib/faces.ml` — deleted. - `Eval.eval` (the `crease list` evaluator) and the `Eval.crease` type — deleted; `corners`, `folded`, and `eval_folded` stay. - `lib/state.ml` — trimmed to just `provenance` (the vertex/edge/`t`/`add_*` machinery only fed `Planarize`). - `beloch.ml` — drops the `Planarize`/`Faces` re-exports. - The orphaned `planarize`/`faces`/`state` test groups — deleted (69 tests, was 76; the removed tests only exercised the dead path). - `.gitignore` — adds `lib/parser.conflicts` and root-level render scratch (`/*.fold`, `/*.svg`, `/*.png`). **Assumptions made at forks (no input requested):** - **Kept the now-unused `Geom` helpers** (`signed_area`, `ccw_compare`, `clip_to_unit_square`, `segment_intersection`) rather than pruning them. They were only used by `Faces`/`Planarize`, but they are small, tested, exact-geometry utilities with no `.mli` (so no unused-value warning), and plausibly reused by future slices (e.g. `signed_area`/`ccw_compare` for layer geometry). Pruning them would be churn for little gain. - **`lib/parser.conflicts` is gitignored, not just deleted** — it is an empty, stale menhir `--explain` artifact; a fresh build does not regenerate it (the grammar is conflict-free), but `--explain` would write it again if a future grammar change introduced a conflict, so ignoring it is the durable fix. - **Root-level `*.fold`/`*.svg`/`*.png` are gitignored** (not `examples/`, which is `.bel` only) — these are `beloch fold` / `fold2svg` scratch outputs that shouldn't be committed. - Left `State` named `State` (now just provenance) rather than renaming to `Provenance`, to keep the diff minimal and the `pr.State.axiom` access sites stable. `fold2svg` itself (the legend wording fix) is a separate PR so this one stays core-only.
Since #10 routed beloch fold through the face-based path, the old crease-line
pipeline is unused. Removes lib/planarize.ml, lib/faces.ml, Eval.eval/Eval.crease,
and State's vertex/edge machinery (kept State.provenance). Drops the orphaned
planarize/faces/state tests. gitignores lib/parser.conflicts (empty stale menhir
report) and root-level render scratch (*.fold/*.svg/*.png).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
toph merged commit 9ab8e6b4c3 into main 2026-06-30 06:16:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch!11
No description provided.