Skip to content

fix(pusher): exclude imageio_ffmpeg from the pusher image dependency probe - #22891

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/pusher-imageio-ffmpeg-probe
Oct 20, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/pusher-imageio-ffmpeg-probe

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Problem

Auto Deploy Backend Pusher to GKE (Development) has failed on main since 42fb4ff (first run after #22839 landed). The image builds, then the offline dependency probe fails:

Smoke checking pusher's 283 reachable third-party modules in gcr.io/based-hardware-dev/pusher:45e71a7
AssertionError: missing installed dependency modules: imageio_ffmpeg

(run 39440281508). Production pusher promotion selects a development-qualified digest, so no pusher build after #22839 can reach prod until this is fixed.

Cause

#22839 (chat video) added function-local imports of utils.media.video_frames to utils/other/chat_file.py. The probe in backend/scripts/runtime_image_contracts.py walks every import in a module, function-local ones included, so the pusher now reaches the messaging FFmpeg decoder:

pusher.main -> routers.pusher -> utils.pusher_finalization -> utils.conversations.finalizer -> process_conversation -> calendar_linking -> retrieval.tools.calendar_tools -> integration_base -> retrieval.agentic -> retrieval.tools -> file_tools -> utils.other.chat_file -> (lazy) utils.media.video_frames -> (lazy) utils.messaging.adapters.decoder -> (in function) imageio_ffmpeg

The video imports are already lazy, so there is no import-time break to fix. backend/pusher/pylock.toml does not ship imageio-ffmpeg.

Fix

Add imageio_ffmpeg to the pusher's dependency_probe_exclusions, with its reason, the same way onnxruntime is handled. Two facts make the exclusion safe:

  • The pusher never handles chat video.
  • get_media_decoder() catches ImportError and falls back to the system ffmpeg, which the pusher Dockerfile installs with apt. test_messaging_decoder.py already covers that fallback.

I didn't add the wheel to the pusher lock. That would put an unused ~30 MB FFmpeg binary into the image next to the apt one.

Other images: backend reaches the module too, but its pylock.runtime.toml already locks imageio-ffmpeg==0.6.0. No other registered image reaches it. The prod Cloud Run backend deploy of 42fb4ff (run 39438007788) succeeded.

Guard

  • test_pusher_dependency_probe_includes_jsonschema now also asserts that imageio_ffmpeg is absent from the pusher probe set.
  • New test_pusher_imageio_ffmpeg_exclusion_keeps_its_system_ffmpeg_fallback is a static tripwire. It fails if the decoder moves the wheel import to module level, drops the shutil.which('ffmpeg') fallback, or the pusher Dockerfile stops installing ffmpeg.

Failure-Class: FC-runtime-image-boundary

Verification

  • BACKEND_UNIT_TEST_FILE_LIST=<list: tests/unit/test_runtime_image_contracts.py, tests/unit/test_messaging_decoder.py> bash test.sh: 8 + 24 passed.
  • Ran third_party_dependency_modules() for every registered contract. Before the change, pusher listed imageio_ffmpeg; after it, it doesn't. backend still lists it, and its lock has it.
  • The real image smoke runs in the next dev pusher auto-deploy after merge.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…probe

#22839 added lazy chat-video imports to utils/other/chat_file.py. The
pusher's static probe walks function-local imports too, so pusher.main
now reaches utils.messaging.adapters.decoder and its in-function
`import imageio_ffmpeg`. The pusher lock does not ship that wheel, and
the dev pusher auto-deploy has failed its image smoke since 42fb4ff.

Pusher never processes chat video, and the decoder already falls back to
the system ffmpeg that the pusher Dockerfile installs with apt. Exclude
the module with its reason (same pattern as onnxruntime) and pin the
premise in a test: the wheel import stays function-local with the system
fallback, and the pusher image installs ffmpeg.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T16:42:58.029053Z a684832 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit c0ae626 into main Oct 20, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/pusher-imageio-ffmpeg-probe branch October 20, 2026 17:13
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.

1 participant