Repository navigation
Add funkbox loop fits: check a finished video file against a --target and its seam - #84
Merged
Merged
Conversation
…ts seam From the 2026-11-29 promo run's product feedback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RsXeVj1YR1UgjH3YehPng
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.
Why
Musicians check a Spotify Canvas file against the rules before they upload. velveteen's Canvas guide (updated 2026-11-28) has a whole "Upload Fixes" section on rejected files. audora's browser Canvas checker (updated 2026-11-08) tests length, 9:16, height and MP4. Neither checks what a loop depends on: whether the last frame flows into the first.
loop render --target canvas(#75) only checks loops funkbox renders itself. Rules: Spotify's Canvas guidelines.What changed
New
funkbox/loops/fits.pyandfunkbox loop fits FILE --target canvas|square [--json]. It checks any video file, made with funkbox or not, and prints oneok/FAIL/warnline per rule:warnfor Canvas, not a FAIL, because Spotify's page does not state it as a rule;funkbox/gl/loopcheck.py's thresholds.It also prints the file size as info. The exit code is 1 when any rule FAILs, and 2 when the file is missing.
The rules come from the existing
TARGETSinfunkbox/loops/targets.py, sorender --targetandfitscannot drift apart.Docs: a
loop fitsline in the quick-start block ofdocs/loops.mdand a paragraph after the target sections.No MCP tool was added or changed (the tool count and
docs/catalog.jsonare unchanged). An MCP option can follow if wanted.How it was tested
tests/test_loop_fits.py(11 tests) encodes small synthetic waves with ffmpeg. It covers:--jsonoutput.loop render --preset lava-lamp --target canvasoutput fits (seam 9.59 vs typical 8.78; 24.0 MB). A 3.1 s cut of it fails the seam (53.07 vs 8.88). A 9:16 loop checked as--target squarefails the shape rule.FUNK_GL_BACKEND=egl python -m pytest -qgives 1568 passed and 21 skipped.ruff formatandruff checkare clean.Nothing under
promo/changed.From the 2026-11-29 promo run's product feedback.
Generated by Claude Code