Skip to content

Full Pipeline: fix losing an animation when a 0-byte .webp was left behind - #7

Merged
HalRiveria merged 2 commits into
mainfrom
fix/leftover-webp-animation-loss
Dec 1, 2026
Merged

HalRiveria merged 2 commits into
mainfrom
fix/leftover-webp-animation-loss

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

Full Pipeline could lose an animation when a 0-byte .webp sat next to its animated .avif, which a force-killed run can leave behind.

Both engines took the pair. The animated engine converts the .avif into that .webp and deletes the .avif. The image engine had queued the same .webp while it was still empty, so it wasn't recognized as animated. If its turn came after the animated conversion, it turned the first frame into a still .jxl and deleted the .webp, and the chapter was zipped with only the still. In other orders the image job failed and the chapter was left unzipped, or the two engines hit a file lock (the cause of a flaky test failure in CI).

The same could happen with Overwrite on, when a static .webp shares its name with an animated .avif.

Fix: when animated conversion is on, the image engine leaves a .webp alone if the chapter has an animated .avif of the same name. It's the animated engine's output file.

Behavior change: with Overwrite off, a chapter holding a static .webp and an animated .avif of the same name is now left unzipped with both files in place, like any other .avif/.webp pair. Before, the .webp was converted to .jxl and the .avif was zipped unconverted. The README's wording covers this now.

Tests:

  • The 0-byte test now checks what ends up in the zip; it used to pass even when the animation was lost. New cases: one process slot, Overwrite on, animated conversion off (unchanged). Five assertions failed before and pass now.
  • One older scenario relied on the behavior above to check that a warning doesn't block zipping. It now uses a chapter with an unrelated skipped animated .webp, and also checks that the pair isn't zipped.
  • All harnesses pass on Windows PowerShell 5.1. The Controller harness can't run on PowerShell 7, with or without this change (it compiles fake executables).
  • With the real cjxl and ImageMagick, 48 chapters with a leftover 0-byte .webp at 8 slots: before, 8 lost the animation and 4 weren't zipped; after, all 48 zipped with the animation. 15 chapters at 1, 2 and 4 slots were also all fine after.

🤖 Generated with Claude Code

HalRiveria and others added 2 commits November 30, 2026 21:06
…write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria
HalRiveria merged commit 0a8fa25 into main Dec 1, 2026
1 check passed
@HalRiveria
HalRiveria deleted the fix/leftover-webp-animation-loss branch December 1, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants