This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Fix format filtering for missing dimensions - #15
Merged
Conversation
When dimension filters (max_width, max_height, min_width, min_height) are specified, exclude formats that don't have dimensions defined. This prevents audio formats and other non-dimensional formats from appearing in buy-side UI results when filtering by specific dimensions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Tests cover: - Dimension filtering (exact, min/max, combined) - Type filtering (display, audio, video, native, dooh) - Name search filtering - Format ID filtering - Combined filters - Bug reproduction test for audio formats appearing with dimension filters All 23 tests pass, improving coverage of filter_formats from 19% to 64%. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Background
When the buy-side UI requested formats with specific dimension constraints, the creative agent was incorrectly returning audio formats (which have no dimensions) and display formats that did not match the requested dimensions. This was due to misleading comments in the filtering logic.
Changes
src/creative_agent/data/standard_formats.py: Updated the comment at line 1156 to accurately reflect that formats without dimensions are excluded when dimension filtering is requested. The underlying code logic correctly excluded these formats, but the comment implied they were being skipped over, which was confusing.Testing