Repository navigation
Skip unsupported Noise gradients in overlays, strokes, and fills - #481
Merged
shimoda-uec merged 2 commits intoOct 16, 2026
Merged
Conversation
Signed-off-by: shimoda-uec <[email protected]>
shimoda-uec
force-pushed
the
fix/462-noise-gradient-overlay
branch
from
October 9, 2026 11:08
b3719b0 to
f23f2c9
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The changelog references issue #462 instead of the pull request number required by repository conventions.
1 open finding
What changed in this PR
Skips unsupported Noise gradient overlays instead of aborting PSD conversion.
Changes:
- Detects Noise gradients and logs a warning.
- Adds a regression fixture and conversion test.
- Documents the fix in the changelog.
| File | Description |
|---|---|
src/psd2svg/core/effects.py |
Skips Noise gradient overlays safely. |
tests/test_effects.py |
Verifies successful conversion and warning behavior. |
tests/fixtures/effects/noise-gradient-overlay.psd |
Provides the regression input. |
CHANGELOG.md |
Records the user-facing fix. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kyamagu
reviewed
Oct 16, 2026
kyamagu
left a comment
Collaborator
There was a problem hiding this comment.
The overlay guard works and the regression test covers it, but the same KeyError: b'Clrs' can still be raised from other gradient consumers. See the inline comments.
Signed-off-by: shimoda-uec <[email protected]>
kyamagu
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
KeyError: b'Clrs'.Verification
PYTHONPATH=src pytest -q tests/test_effects.py tests/test_paint.py tests/test_gradient.py(27 passed)ruff checkandruff format --checkpassed for changed Python files.mypyreports three existingcomposite_overlay_fillargument-type errors; no new errors.pytest -qrun was stopped after 852 passed, 65 failed. Failures included blend-mode and browser/rasterizer tests in this environment; the earlier PR run also reproduced blend-mode failures on cleanmain. All PR CI checks passed on this update, including Linux and Windows test jobs.Fixture provenance
The PSD is the
noise_gradient.psdattached to #462 by its reporter. The issue describes it as authored in Adobe Photoshop; the Photoshop version was not provided. It is 27 KB and contains a single Noise gradient overlay reproduction.AI assistance
OpenAI Codex (GPT-6) drafted the code change, regression tests, and this PR description. The Noise gradient descriptor and conversion behavior were checked against the attached PSD and existing stroke and fill fixtures.
Fixes #462