vectorcraft/crates/geom/src
Brandon Thomas 3e323bfa2a Robustness: VectorCraft never crashes — no panics in shipped code
Shipped code no longer unwraps, expects or panics: every one of the 124
unwrap()/expect()/panic!/unreachable! sites outside tests now handles the
failure (Result/Option, ?, let-else, defaults) and reports errors to the user.

- Lints: workspace clippy denies unwrap_used, expect_used, panic, todo,
  unimplemented and unreachable; clippy.toml allows them in tests, and
  integration tests, examples and testkit opt out explicitly.
- Safety net (vectorcraft_engine::guard): a panic in a top-level command rolls
  the document back and returns EngineError::Internal; a panicking tool is
  reset; the MCP server answers with an internal error and keeps serving; the
  UI frame and each control request are guarded.
- APIs that hid failures now return them: Rendered::to_png/to_jpeg/to_webp
  return Result (JPEG/WebP errors used to write empty files),
  FontDb::face returns Option, Region::top returns Option.
- Fuzzing: engine/tests/import_fuzz.rs feeds garbage, hostile and mutated SVG
  and PDF through import → render → export (30k cases locally, no panics).
- Docs: AGENTS.md/CLAUDE.md rule, docs/development.md "Robustness" section,
  README pointer and a PR template checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:28:59 +07:00
..
bez.rs M3.63: visual bounds and clicks take in the whole stroke 2026-10-05 02:55:23 +07:00
hit.rs M0.2: hit-test distance exact on cusp-like cubics (nearest-point accuracy 1e-9; proptest regression) 2026-10-02 00:16:23 -04:00
lib.rs M3.63: visual bounds and clicks take in the whole stroke 2026-10-05 02:55:23 +07:00
path.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
recognize.rs M2.9: Shaper tool — rough rectangles, ellipses, triangles/polygons/diamonds and lines become clean live shapes (geom::recognize), squares/circles snap; a scribble deletes the objects it crosses 2026-10-02 09:10:44 -04:00
shapes.rs M0: workspace skeleton — geom, color, doc, render, text, pathops, svg, tools, engine 2026-09-30 05:53:29 -04:00
snap.rs M0: workspace skeleton — geom, color, doc, render, text, pathops, svg, tools, engine 2026-09-30 05:53:29 -04:00