Skip to content

fix(errors): a billed clip's failed download is not retryable (#941 part 1) - #1064

Merged
ffroliva merged 2 commits into
developfrom
bugfix/941-billed-download-not-retryable
Oct 23, 2026
Merged

ffroliva merged 2 commits into
developfrom
bugfix/941-billed-download-not-retryable

Conversation

@ffroliva

Copy link
Copy Markdown
Owner

Summary

#941 part 1, decided with the evidence the issue asked for:

Decision: set retryable per raise site. get_signed_media takes retryable: bool | None = None, passed to the MediaDownloadError it raises:

  • MigratedComposer.fetch_mp4 (the flow.google.com generation download) passes False.
  • The labs video download (ui_automation_video, getMediaUrlRedirect) passes False.
  • _save_clip's storage failure passes False.
  • migrated_recover.recover_clip (gflow data download / gflow_download_media) keeps the class default true. It spends nothing, and MCP.md documents "pause and call again".

Exit code 6 and type are unchanged. docs/MCP.md § Error envelope and CHANGELOG are updated.

Not done: part 2. An HTTP error status on the signed URL still raises WireFormatError (exit 7) and leaves the asset pending. Moving it to MediaDownloadError changes exit 7 to 6, a separate public-contract change for the owner to decide. So this PR is Refs #941, not Closes.

Refs #941

Test plan

  • TDD: the existing test_it_exits_6_and_is_marked_retryable pinned the old contract. It became …_is_not_retryable_after_billing and went red, then green. A new test pins the recovery download (get_signed_media default) at retryable: true.
  • Transport and MCP download-envelope tests: 1361 passed. /gflow:check gates: offline suite 5416 passed.
  • e2e: out of scope. This only changes the flag on an error raised after the download has failed; reproducing it needs a CDN connection reset on all 3 attempts, which can't be produced on demand against live Flow.

…art 1)

MediaDownloadError inherited retryable=true from NetworkError, so a scheduler
re-running retryable failures would bill the clip twice. get_signed_media takes
a per-call retryable; the generation downloads and the clip writer pass False,
the free recovery keeps the class default.

Refs #941
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e286563b-3cfe-4e13-be22-bbb1e5eb515e
📥 Commits

Reviewing files that changed from the base of the PR and between 1d4238e and 1695106.

📒 Files selected for processing: 9
  • CHANGELOG.md
  • docs/MCP.md
  • src/gflow_cli/api/client.py
  • src/gflow_cli/api/transports/_common.py
  • src/gflow_cli/api/transports/migrated_composer.py
  • src/gflow_cli/api/transports/ui_automation_video.py
  • tests/api/test_client_image.py
  • tests/api/transports/test_signed_media_retry.py
  • website/docs/MCP.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…either (#941 council)

client.download_image raised a plain NetworkError (retryable) after its own
retries; a re-run spends daily quota again.
@ffroliva

Copy link
Copy Markdown
Owner Author

Council review: YELLOW. The video paths and the constructor forwarding are correct, and the recovery path stays retryable: true.

  • MEDIUM, fixed: client.download_image raised a plain NetworkError (retryable) after its own retries, even though the image was already generated. It is now retryable: false, with a test; a re-run spends daily quota again.
  • LOW, fixed: MCP.md's NetworkError line points to the new exception.
  • docs/PROJECT_STATUS.md:347 is a dated history entry, so it is left as is.

Suite: 5417 passed. Part 2 (exit 7 → 6 on an HTTP error from the signed URL) stays open on #941 for the owner.

@ffroliva
ffroliva merged commit 1117602 into develop Oct 23, 2026
17 checks passed
@ffroliva
ffroliva deleted the bugfix/941-billed-download-not-retryable branch October 23, 2026 09:36
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