Repository navigation
A package-wide bug audit. Eight bugs fixed, each with a regression test.
Bumped to a minor rather than a patch because several fixes change visible output: every template's name string, video dimensions for odd sizes, and JPEG corner pixels. Check any code that matches on template names.
Crashes and broken features
Negative pointIndex crashed the app. AnimationPattern.apply bounds-checked with index < result.count, letting a negative index reach a trapping subscript. PointAnimation.pointIndex is public and unvalidated, so passing a negative value took the process down.
The noise shader could never load. ParameterizedNoiseView looked the shader up via ShaderLibrary, which searches the main app bundle — but ParameterizedNoise.metal compiles into the package's own resource bundle. The lookup could not resolve for any consumer, so the view fatal-errored at render time. It now resolves through ShaderLibrary.bundle(.module).
Wrong output
Template names were mangled. rawValue.capitalized rendered mysticTwilight as "Mystictwilight" instead of "Mystic Twilight", affecting all 68 templates anywhere name was displayed.
Mood tagging silently missed matches. Template name tokens are lemmatized (dunes becomes dune) but the mood keyword lists stored the unlemmatized plurals, so saharaDunes never matched .earthy, and neonNights and fieryEmbers failed the same way.
tags and moods ordering was nondeterministic. Moods were collected by iterating a Dictionary, so the order changed between runs. They now follow TemplateMood.allCases.
JPEG export wrote black corners. Rendered gradients have transparent rounded corners and JPEG has no alpha channel, so the corners encoded to black. Images are now flattened onto white before encoding.
Odd video dimensions silently mismatched. A 321x241 request produced a 320x240 track because H.264 rounds odd dimensions down, while the pixel buffer pool and drawing context stayed odd. Output size now rounds to even so every stage agrees.
Races and robustness
Append after cancel. Cancellation could run on the actor while a frame render was suspended on the main actor, letting the loop append a pixel buffer after markAsFinished()/cancelWriting() — which raises. The loop now re-checks its finished state after the suspension point.
Extended-range sRGB. rgbaComponents() clamps components, since wide-gamut colors can return values outside 0...1 and produce malformed hex, and no longer falls back to a colorspace that would raise from getRed.
Tooling
swiftlint --strict was already failing on main; those violations are cleared. The pre-commit hook passed staged paths to SwiftLint explicitly, which makes SwiftLint ignore the excluded: list — so touching any template file failed the hook on deliberately-excluded files. It now uses --force-exclude and --strict to match CI.
Full changelog: 2.6.1...2.7.0