fix(mock): gate Animate behind MOCK_PROVIDERS — the last unmocked fal entry point#187
Merged
Conversation
Finding #7 from the 2026-07-20 self-play ledger — the last ungated fal entry point, same class as the expand hole (#184): an Animate click on a MOCK_PROVIDERS stack billed a real ltx-video call. mock.py gains mock_video_data_url(): a real 1-second 64x36 H.264 parchment clip (~1.7KB, generated once with ffmpeg, embedded base64) so the mock stack needs no video toolchain. A VALID mp4 matters because the client hands the URL straight to <video src> — a fake payload would render as a broken player and read as a product bug. animate_image returns it before the FAL_KEY check; the test runs under the suite's FAL_KEY-deleted fixture so a regression re-raises loudly, and asserts the ftyp magic to prove the payload is a real mp4.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
… paid
Audit follow-up to the animate gate: grep over _fal_subscribe callers
found one more reachable-from-live path — generate.py's extraction
refinement calls segment(), and SEGMENTER_PROVIDER=sam3_fal makes that
one paid fal call PER LABEL with no gate. Default ("vlm") was already
safe via the mocked llm seam; now the flag flip is too. Test spies
_segment_sam3 and asserts it never runs under mock.
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.
Finding #7 from the self-play ledger, same class as #184:
animate_imagehad nomock.on()gate, so Animate on a mock stack billed a real ltx-video call.mock.mock_video_data_url()— a real 1s 64×36 H.264 parchment clip (~1.7KB) generated once with ffmpeg and embedded, so the mock stack needs no video toolchain. Valid mp4 matters: the client hands it straight to<video src>.ftypmagic.generate,edit,continue,expand,zoomout,inpaintvia llm seam,animate) is gated — audited by grep over_fal_subscribecallers.Gates: ruff, mypy, pytest 86.35% ≥ 85 floor.
🤖 Generated with Claude Code