You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MediaDownloadError: decide its retry flag and whether an HTTP-error signed URL should raise it (from #898) #941
Two decisions split out of #898, raised by the PR #912 council. Each one changes a public contract, so neither was folded into the #898 fix.
1. MediaDownloadError is retryable (inherited from NetworkError)
get_signed_media raises it for two callers whose needs are opposite:
The generation download (gflow video / image). The clip exists and is billed. If a scheduler follows docs/MCP.md / USAGE.md and re-runs anything marked retryable: true, it bills again. The right action is gflow data download / gflow_download_media.
The gflow_download_media recovery tool. Here a retry is correct and spends nothing (MCP.md documents "pause and call again").
A single class-level flag can't be right for both. Options:
Set retryable per raise site, by caller.
Raise a distinct subclass from the generation path.
Keep the flag as it is and change the remediation text.
2. An HTTP error answer on the signed URL still leaves the asset pending
After Flow reports the clip done, an error status from the signed URL (an expired link, for example) raises WireFormatError (exit 7):
migrated_composer.py: status ≥300
ui_automation_video.py: status ≥400
Both messages already say the clip exists (expired_link_hint). Raising MediaDownloadError(media_id=…) there would mark the asset generated, but it would change exit 7 to 6.
Evidence needed before deciding
Which callers branch on exit 6 or 7 or on retryable: CLI scripts, the MCP worker, and the docs.
Part 1 is done in PR #1064 (merged). Per raise site:
retryable: false for the generation downloads (flow.google.com fetch_mp4, which extend also uses; the labs video download), the clip writer, and client.download_image after its retries.
retryable: true (unchanged) for the free recovery (gflow data download / gflow_download_media).
Evidence: nothing in gflow auto-retries, so the flag is a promise to external schedulers. MCP.md defines true as "re-run without operator intervention", and #1010 already made billed post-submit failures false. Exit code 6 is unchanged.
Part 2 is still open and needs a maintainer decision. An HTTP error status on the signed URL (migrated_composer ≥300, ui_automation_video ≥400) still raises WireFormatError, exit 7, and leaves the asset pending. Raising MediaDownloadError(media_id=…) would mark it generated, but it changes exit 7 to 6 for scripts.
Activity
docs(plan): link the #898 follow-up decisions to #941
fix(errors): a generated image's exhausted download is not retryable …
Merge pull request #1064 from ffroliva/bugfix/941-billed-download-not…
ffroliva commentedon Oct 23, 2026
Part 1 is done in PR #1064 (merged). Per raise site:
retryable: falsefor the generation downloads (flow.google.comfetch_mp4, which extend also uses; the labs video download), the clip writer, andclient.download_imageafter its retries.retryable: true(unchanged) for the free recovery (gflow data download/gflow_download_media).Evidence: nothing in gflow auto-retries, so the flag is a promise to external schedulers. MCP.md defines
trueas "re-run without operator intervention", and #1010 already made billed post-submit failuresfalse. Exit code 6 is unchanged.Part 2 is still open and needs a maintainer decision. An HTTP error status on the signed URL (
migrated_composer≥300,ui_automation_video≥400) still raisesWireFormatError, exit 7, and leaves the assetpending. RaisingMediaDownloadError(media_id=…)would mark it generated, but it changes exit 7 to 6 for scripts.fix(errors): a billed clip's failed download is not retryable (ffroli…
Merge pull request #1084 from ffroliva/bugfix/941-signed-url-http-error
fix(download): an HTTP error on a done clip's signed URL is a recover…