Files
photocraft/crates/engine
FinnNkandClaude Opus 5.5 51e45fd394 fix(engine): refuse partial Color Balance and Hue/Saturation ATN exports (#8701)
* fix(engine): refuse partial Color Balance and Hue/Saturation ATN exports

A `layer.setAdjustment` step changes only the settings it names, but the
Color Balance and Hue/Saturation descriptors written to the ATN carry
every setting and filled absent ones with defaults, so a partial edit
replayed as one that also reset the rest. Strict export now refuses such
a step (with skipUnsupported it is listed in Skipped); complete ones
export and round-trip as before.

Fixes #8531

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): refuse Hue/Saturation ranges missing their own settings

A colour range written without its own hue, saturation and lightness
would replay with the missing ones reset to 0, so strict export refuses
it like a partial master setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): refuse wrong-shaped Color Balance and Hue/Saturation settings

Strict export now checks the triplets, numbers and flags it needs are of
the shape the descriptor writer reads, since it would write anything else
as 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): refuse malformed Hue/Saturation range bounds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(engine): cover malformed and valid Hue/Saturation range bounds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): refuse fractional Hue/Saturation range bounds

The descriptor stores them as integers, so a fractional bound would be
rounded on export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:38:48 -04:00
..