2-stop linearGradient SVG digitizes to 200 OK with 0 stitch objects (silent empty success) #132

Closed
opened 2026-09-16 01:38:29 +00:00 by Mark · 0 comments
Owner

Summary

A 2-stop linearGradient SVG returns HTTP 200 with 1 region and 0 stitch objects — a success-shaped empty result.

Verified live 2026-09-15 against easystitch-service :8080 (which wraps this engine):

Request: POST /v1/digitize, multipart, 100x100 SVG with a single rect fill="url(#g)", settings maxColors=4, stitchPreference=balanced.

Response: {"regions": [{"id": "r0", "polygon": [...rect...], "color": "#000000", "stitchType": "tatami_fill"}], "stitchObjects": [], "stats": {...}} — HTTP 200.

Gradient support landed earlier (gradient resolver + wiring per #96), and a 3-stop gradient previously produced 8 stitch objects / 10,400 stitches. This 2-stop case produces none — either a resolver gap or a silent fallback that swallows the resolution failure and emits the raw region.

Expected

Gradient fills flatten to stops and produce stitch objects. If a gradient cannot be resolved, fail loudly (4xx/error) — never 200 with empty stitchObjects.

Where to look

  • gradient resolution module and its call site in the SVG parse/digitize pipeline
  • any silent except around resolution that falls back to emitting the un-resolved region

Severity

P1 — silent empty success. The webUI now surfaces an error (frontend commit 468ab77), but the engine should not emit this shape.

## Summary A 2-stop linearGradient SVG returns HTTP 200 with **1 region and 0 stitch objects** — a success-shaped empty result. Verified live 2026-09-15 against `easystitch-service :8080` (which wraps this engine): Request: `POST /v1/digitize`, multipart, 100x100 SVG with a single rect `fill="url(#g)"`, settings `maxColors=4, stitchPreference=balanced`. Response: `{"regions": [{"id": "r0", "polygon": [...rect...], "color": "#000000", "stitchType": "tatami_fill"}], "stitchObjects": [], "stats": {...}}` — HTTP 200. Gradient support landed earlier (gradient resolver + wiring per #96), and a 3-stop gradient previously produced 8 stitch objects / 10,400 stitches. This 2-stop case produces none — either a resolver gap or a silent fallback that swallows the resolution failure and emits the raw region. ## Expected Gradient fills flatten to stops and produce stitch objects. If a gradient cannot be resolved, fail loudly (4xx/error) — never 200 with empty `stitchObjects`. ## Where to look - gradient resolution module and its call site in the SVG parse/digitize pipeline - any silent `except` around resolution that falls back to emitting the un-resolved region ## Severity P1 — silent empty success. The webUI now surfaces an error (frontend commit 468ab77), but the engine should not emit this shape.
Mark 2026-09-18 02:24:18 +00:00
Sign in to join this conversation.
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
Mark/easystitch#132
No description provided.