Repository navigation
test(migrated): cover the image drive path that reddened develop's Sonar gate - #765
Merged
Merged
Conversation
…nar gate `run_images` and the trust branches of `submit_images_and_observe` had no offline coverage at all — every image test mocked `run_images` away. That put `new_coverage` at 77.4% against an 80% gate, so #750's merge turned develop's SonarCloud check red even though the PR itself was 14/14 green: SonarCloud is skipped on fork PRs, so the gate first ran on the merge commit. The coverage gap and the risk were the same thing. What was untested was the orchestration that decides whether a run is trustworthy: - `run_images` end to end against the existing FakePage — the happy t2i path, the pre-submit refusal of an unported form, the missing-`--project` ConfigurationError, and the case where references upload but never become mention chips. That last one is the silent-degrade-to-T2I failure: Flow accepts the submit, bills it, and returns a plausible image that ignored the reference. - The image submit's own credits check. It is a second copy of the video path's, so it needed its own proof: a drained wallet REPLACES Flow's submit button (#721), and reporting that as selector drift tells the user to file a frontend bug that no code change can fix. Both directions are pinned — warning present means insufficient credits, warning absent means the anchor really is gone and drift is correct. - The submit-stays-disabled timeout. migrated_composer.py coverage 88% -> 92%, uncovered lines 92 -> 67; `run_images` (2094-2124) goes from entirely unexecuted to fully covered. No src/ change, so no Flow surface is touched and an e2e run is out of scope for this commit rather than left blank.
ffroliva
force-pushed
the
test/760-migrated-image-drive-coverage
branch
from
September 8, 2026 22:03
4832592 to
638198e
Compare
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 develop is red
#750's own checks were 14/14 green, but
SonarCloud analysisis skipped on fork PRs — so the gate first ran on the merge commitb4746204and failed there:Only that one condition. No new smells, no unreviewed hotspots. 42 uncovered new lines in
migrated_composer.py, 3 inbatchexecute.py; the single biggest block wasrun_images(2094-2124), entirely unexecuted because every image test mocked it away.What is covered now
The coverage gap and the risk were the same thing — what was untested is the orchestration that decides whether a run is trustworthy:
run_imageshappy t2igoto, no submit)--projectConfigurationErrorup front, not a mid-run failure with the editor already mountedInsufficientCreditsError, not driftThe credits pair matters because the image path carries its own copy of the video path's check, so it needed its own proof: a drained wallet REPLACES Flow's submit button (#721), and calling that selector drift tells the user to file a frontend bug no code change can fix.
Verification
Scope
No
src/change, so no Flow surface is touched and an e2e run is explicitly out of scope for this PR rather than left blank.Separately: pip-audit is also red on develop, and is NOT from this or #750
Dependency audit (pip-audit)fails onb4746204with 5 CVEs inhttpx2/httpcore22.9.1 (fixes at 2.10.0/2.11.0/2.12.0). Neither #750 nor #762 toucheduv.lockorpyproject.toml, and the same job passed on #750's PR run about an hour earlier — so this is a newly published advisory against an unchanged lock, and it needs a lock bump in its own PR.Refs #639