vectorcraft/crates/svg/tests
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
..
blend_export.rs M3.73: blend modes follow the reference formulas on screen, in SVG and in PDF 2026-10-05 00:27:31 +07:00
container_export.rs M3.68: groups, layers and type have their own fills, strokes and effects, with Contents and Characters rows 2026-10-05 00:59:34 +07:00
dash_align.rs M3.68: groups, layers and type have their own fills, strokes and effects, with Contents and Characters rows 2026-10-05 00:59:34 +07:00
effects_export.rs M3.43: effects render on type, placed images, symbol instances, blends, envelopes, meshes and repeats; a fill or stroke's own raster effects render and export as SVG filters on that element 2026-10-04 23:15:13 +07:00
focal.rs M3.98: radial annotator extent ellipse, aspect handle and off-centre focal point 2026-10-05 04:43:43 +07:00
mask_options.rs M3.87: SVG opacity masks keep their Clip and Invert options 2026-10-05 03:11:04 +07:00
prop_svg.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
roundtrip.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
stroke_export.rs M3.68: groups, layers and type have their own fills, strokes and effects, with Contents and Characters rows 2026-10-05 00:59:34 +07:00
text_stroke.rs M3.40: stroke on type — the Stroke panel edits the characters' stroke 2026-10-05 01:09:55 +07:00