Repository navigation
Validate model-returned product and image ids #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
baf13ef
Use an explicit MIME allow-list and support AVIF
christophervoelpel 052b9bd
Validate model-returned product and image ids
christophervoelpel e9fd413
Trim duplicate MIME mapping assertions
christophervoelpel 36d345e
Reject unresolved storyboard images before candidate dispatch
christophervoelpel 0e63430
Merge branch 'codex/address-pr196-20260921' into codex/address-pr201-…
christophervoelpel b59dc83
Enforce 1:1 key coverage with assertCountEqual and subTest
christophervoelpel a864cd8
Merge remote-tracking branch 'origin/fix/explicit-mime-allowlist' int…
christophervoelpel 1c2ab85
Merge remote-tracking branch 'origin/main' into fix/validate-storyboa…
christophervoelpel a273ab6
Retry on empty scene fields and isolate per-scene reference images
christophervoelpel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
response_schema,video_promptandscene_nameare typed as"string"without"minLength": 1. Currently, the retry loop only checks(product_id, image_id)againstvalid_product_image_combinationsand immediately breaks out of the retry loop withis_valid = Trueeven ifvideo_promptorscene_nameis an empty string (""). Those scenes are then silently dropped after the loop at lines 447–448 (if not image_id or not product_id or not video_prompt or not scene_name: continue), which can leavevalid_scenesempty ({"storyboard": []}) without having triggered a retry.Including
not video_promptandnot scene_namein the retry validation condition ensures empty scene fields trigger the retry loop instead of bypassing retries and being silently discarded post-loop.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, applied in a273ab6. An empty
video_promptorscene_namenow fails the in-loop validation and triggers a retry, instead of passing validation and then being dropped by the post-loop filter (which could store{"storyboard": []}without ever retrying).New test
test_execute_empty_scene_fields_trigger_retrycovers both fields as subtests. It asserts a second Gemini call and that the stored storyboard keeps its scene. Both subtests fail against the previous commit and pass now. Full Python suite: 713 passed.