issue-211: Validate SVG import (icon and illustration) against the live instance #244
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!244
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-211/validate-svg-import-icon-and-illustration-against"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
211: Validate SVG import (icon and illustration) against the live instance
Closes #211 — 211.
Generated in 14m 53s.
Review findings
Now let me apply the fixes. First, the viewBox stroke-scale regression test:Now the live-write-check "no matching asset" branch:I've applied the feasible fixes and re-run the only gate (
npm test). The new viewBox regression test passes (test 369) and the stub harness still reportsALL CHECKS PASSED; the sole failure remains the pre-existingmongodbmanifest assertion (scripts/local-install.test.mjs:1875), which this diff does not touch.Review Findings — 211
Summary
Fixed the three code/test findings: added the missing
convertSvgregression test for a stroke width scaled by the rootviewBoxviewport matrix (Medium), taught check 9's linked-swatch assertion to handle the "no#2BA8A2asset in the file" case with a NOTE and a literal-fill assertion instead of a misleading failure (Low), and corrected thematrixScaledoc plus thefindings.mdresidual note to state that non-uniform axis-aligned scales also reach rects and circles (Low). Gate:npm test→ 823 tests, 821 pass, 1 fail, 1 skipped; the single failure is the pre-existing, unrelatedmongodb-manifest assertion also seen on the merge-base. Left unresolved: the Medium live-instance/UI validation (environment-blocked — noPENPOT_TOKEN/browser) and the Low branch/commit-naming deviation (this stage may not create branches or amend commits).Critical
High
Medium
extensions/penpot/src/svg.test.ts:722— the fix documents that "the viewBox viewport scale is covered by the same change because it is part of the root matrix", but the only converter regression test uses<g transform="scale(2)">; no test asserts a stroke width scaled by the rootviewBoxviewport matrix (the tool test usesPRIMITIVES_SVG, which has nowidth/height, so its root matrix is identity). Suggested fix: add aconvertSvgtest with<svg viewBox="0 0 10 10" width="20" height="20"><rect … stroke-width="3"/></svg>and assertstrokeWidth === 6(geometry is already20) so the documented claim is pinned.extensions/penpot/findings.md:1963— the issue asks to validate the SVG import "against the live instance", but the live run and all five UI observations are still unperformed (environment-blocked: noPENPOT_TOKEN, instance only answers unauthenticatedget-profile). The document says so plainly, but the issue's central criterion remains open. Suggested fix: before closing, run check 9 with credentials and paste the five UI observations into this section, or explicitly descope the issue to "source-verified + harness-covered" and split the UI pass into a follow-up.Low
extensions/penpot/scripts/live-write-check.mjs:1422— check 9's linked-swatch assertion is hard-coded to succeed only when check 1 has already committedpi-197-tealto a fresh scratch file (the dependency is noted in a comment, but the failure mode is handled only for the duplicate case, not for "no matching asset at all"). Running check 9 in isolation, or after check 1 fails before staging its colours, fails the assertion with a misleading message. Suggested fix: mirror the ambiguity branch — if no#2BA8A2asset exists in the file, print a NOTE and assert the literal-fill outcome instead of failing.extensions/penpot/src/svg.ts:384— thematrixScaledoc says "the x-axis length is used for paths, the only shapes that accept one", but a non-uniform axis-aligned scale (scale(sx sy),matrix(sx,0,0,sy,…)) also reachesconvertRectandconvertCircle/transformCircle, where the stroke is scaled by the x-factor while the geometry'sryis scaled byd.findings.md:1955mentions only "a plain stroked rect". Suggested fix: clarify the comment (rotation/skew only ever reaches paths; non-uniform axis-aligned scale reaches rects/circles too) and add circles to the residual note.AGENTS.md:26— the branch/commit deviate from the documented issue-driven convention: the branchfeature/issue-211/validate-svg-import-icon-and-illustration-againsttruncates the title slug, and the commit subject is211: Validate SVG import …rather than the requiredissue-211: Validate SVG import …. Suggested fix: per AGENTS.md, use<type>/issue-<N>/<full-kebab-slug>andissue-<N>: <summary>for the commit/PR title (e.g.issue-211: Validate SVG import (icon and illustration) against the live instance).