From 8c8cf3a14c782320bc085843fe51bf92e6cb3c3c Mon Sep 17 00:00:00 2001 From: Flavio Oliva Date: Sun, 29 Nov 2026 22:28:18 +0000 Subject: [PATCH 1/5] fix(upscale): treat the 720p and 270p exports as free (#1599) Both exports were measured to spend no credits (docs/superpowers/spikes/2026-11-29-export-billing-720p-270p.md), so they join 1080p and 2K in _FREE_UPSCALES: a refused 720p or 270p export reads charged no / next_action wait, and one that times out or returns the wrong file reads no / retry, with a hint that a re-run spends no credits. The unmeasured branch stays for any other scale; tests keep it covered with a hypothetical one. ERRORS.md, the MCP tool description, the contract table and the CHANGELOG follow. --- CHANGELOG.md | 7 +++++++ docs/ERRORS.md | 19 ++++++++--------- .../SCENARIO.md | 8 +++---- src/gflow_cli/api/refusal.py | 21 ++++++++++--------- src/gflow_cli/mcp/tools.py | 3 ++- tests/api/test_migrated_video_upscale.py | 17 +++++++-------- tests/api/test_refusal.py | 15 +++++++------ website/docs/ERRORS.md | 19 ++++++++--------- 8 files changed, 59 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cd3ca567..4b2c4c0e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- **The 720p and 270p video exports read as free + ([#1599](https://github.com/ffroliva/gflow-cli/issues/1599)).** Both were measured to spend no + credits ([spike](docs/superpowers/spikes/2026-11-29-export-billing-720p-270p.md)), so a 720p or + 270p export that Flow refuses as unusual activity now reads `charged: no` / `next_action: wait` + (was `maybe` / `wait`), and one that times out or returns the wrong file reads `no` / `retry` + (was `maybe` / `retry` or `maybe` / `reconcile`), like 1080p. Their hints say a re-run spends + no credits. - **The video download-menu upscales run headless by default** ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). Under `auto` on flow.google.com, `video upscale --scale 720p` and `--scale 270p` drive the download menu in a headless browser, on the CLI and on `gflow_upscale_video`: each ran twice headless matching a diff --git a/docs/ERRORS.md b/docs/ERRORS.md index 32aa1f341..009a4af91 100644 --- a/docs/ERRORS.md +++ b/docs/ERRORS.md @@ -161,9 +161,9 @@ place today: refused the same way on the UI path reads `no` / `wait` too. - `image upscale` and `video upscale`: Flow refusing the upscale or export RPC as `PUBLIC_ERROR_UNUSUAL_ACTIVITY` is `WafRejectionError` (exit 10), never retryable, and its - `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p - video, 2K image) read `no` / `wait`; 720p and the 270p GIF, whose billing has not been measured, - read `maybe` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated + `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p, + 720p and the 270p GIF for video, 2K for image; + [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated the same), and a refusal on the `jwpduf` status poll, which runs after Flow accepted the export, read `maybe` / `reconcile`. No `retry_after` is given: no cooldown has been measured. Any other refusal of those RPCs stays `WireFormatError` (exit 7). @@ -171,8 +171,7 @@ place today: export RPC; a refusal there follows the same scale rule, and any other `as29s` error is ignored, because the page also uses `as29s` for its own reads. An `as29s` refusal during a fresh export ends it the same way, since it means the page itself is refused; there it reads - the scale's refusal outcome even after Flow accepted the export, so a 720p or 270p export - reads `maybe` / `wait` rather than the `reconcile` a `jwpduf` refusal would give + the scale's refusal outcome even after Flow accepted the export ([#1570](https://github.com/ffroliva/gflow-cli/issues/1570)). The direct path reads the same refusal on the `jwpduf` poll and on the `as29s` read of the finished clip's URL, for a 1080p upscale, a text-to-video or an image-to-video, and stops at @@ -180,11 +179,11 @@ place today: ([#1597](https://github.com/ffroliva/gflow-cli/issues/1597)). On the download-menu path, an upscale that times out after its click (`TransportTimeoutError`, exit 9), returns bytes that are not the file asked for, or has its export RPC refused for any - other reason (`WireFormatError`, exit 7) follows the same scale rule: 1080p video and 2K image - read `no` / `retry` (re-running spends nothing), 4K reads `maybe` / `reconcile` and is never - retryable, and 720p and the 270p GIF keep their class's outcome (`maybe` / `retry` for a - timeout, `maybe` / `reconcile` for wrong bytes) until their billing is measured - ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571)). On the direct 1080p route a + other reason (`WireFormatError`, exit 7) follows the same scale rule: the free scales + (1080p, 720p and 270p video, 2K image) read `no` / `retry` (re-running spends nothing), and + 4K reads `maybe` / `reconcile` and is never retryable + ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571), + [#1599](https://github.com/ffroliva/gflow-cli/issues/1599)). On the direct 1080p route a failure after the request was sent stays `maybe` / `reconcile`, like every direct request. `RelaunchFailed` (exit 15, `no` / `retry`) is raised when the browser cannot start again, either for the retry after a refusal (its detail names the refusal) or for a request that diff --git a/docs/superpowers/plans/2026-11-28-upscale-refusal-contract/SCENARIO.md b/docs/superpowers/plans/2026-11-28-upscale-refusal-contract/SCENARIO.md index 5774e772c..9bd9aa247 100644 --- a/docs/superpowers/plans/2026-11-28-upscale-refusal-contract/SCENARIO.md +++ b/docs/superpowers/plans/2026-11-28-upscale-refusal-contract/SCENARIO.md @@ -16,7 +16,7 @@ nothing was charged. | Failure | Exit | `charged` | `next_action` | Evidence | |---|---|---|---|---| | `UNUSUAL_ACTIVITY` on `p0UkFb`, 1080p | 10 | `no` | `wait` | 1080p export measured free (2026-10-07 menu, 2026-11-27 direct) | -| `UNUSUAL_ACTIVITY` on `p0UkFb`, 720p / 270p | 10 | `maybe` | `wait` | unmeasured: billing of these exports has not been observed | +| `UNUSUAL_ACTIVITY` on `p0UkFb`, 720p / 270p | 10 | `no` | `wait` | measured 0 credits (2026-11-29, #1574; changed by #1599) | | `UNUSUAL_ACTIVITY` on `p0UkFb`, 4K | 10 | `maybe` | `reconcile` | 4K bills on click; refusal billing unmeasured | | `UNUSUAL_ACTIVITY` on `jwpduf` (any scale) | 10 | `maybe` | `reconcile` | the status poll runs after the export was accepted | | `UNUSUAL_ACTIVITY` on `as29s` during an export (stored render) | 10 | per scale, as `p0UkFb` | per scale | a rendered clip sends no `p0UkFb` (#1570) | @@ -27,7 +27,7 @@ nothing was charged. | Scale not offered by Flow | 22 | `no` | `none` | unchanged (#1338) | | Other export RPC error, timeout or wrong bytes, free scale (menu path) | 7 / 9 | `no` | `retry` | 1080p video and 2K image measured free (#1571) | | Other export RPC error, timeout or wrong bytes, 4K | 7 / 9 | `maybe` | `reconcile` | 4K may bill; never retryable (#1571) | -| Other export RPC error, timeout or wrong bytes, 720p / 270p | 7 / 9 | `maybe` | class default (`reconcile` / `retry`) | billing unmeasured; the hint says so (#1571) | +| Other export RPC error, timeout or wrong bytes, 720p / 270p | 7 / 9 | `no` | `retry` | measured 0 credits (#1574; changed by #1599) | | Any failure after the send, direct 1080p route | 7 / 9 | `maybe` | `reconcile` | the direct path never resends | `retry_after` is never set: no cooldown has been measured, so no number is promised. The @@ -52,7 +52,7 @@ the live wire), **unmeasured** (inferred; a spike is filed). | # | Dimension | Scale / route / stage / retry / surface | Severity | Expected behaviour | Tag | Test category | |---|---|---|---|---|---|---| | 1 | D2 D7 | 1080p / menu / `p0UkFb` reply / none / CLI | High | `WafRejectionError`, exit 10, `no` / `wait`; hint says nothing was charged and names the cooldown | refusal frame measured on submits; on `p0UkFb` unmeasured | Unit + E2E (`e2e_auth`, route-fulfilled) | -| 2 | D2 D7 | 720p, 270p / menu / `p0UkFb` / none / CLI | High | exit 10, `maybe` / `wait`; hint does not claim nothing was charged | unmeasured | Unit | +| 2 | D2 D7 | 720p, 270p / menu / `p0UkFb` / none / CLI | High | exit 10, `no` / `wait` | measured (#1574) | Unit | | 3 | D2 D7 | 4K / menu / `p0UkFb` / none / CLI | Critical | exit 10, `maybe` / `reconcile`; hint says check the project and balance before re-running; never "nothing was charged" | unmeasured | Unit | | 4 | D2 D7 | any / menu / `jwpduf` reply / none / CLI | Critical | exit 10, `maybe` / `reconcile` | unmeasured | Unit | | 5 | D7 | any / menu / `p0UkFb` other reason / none / CLI | Medium | `WireFormatError`, exit 7, unchanged | measured (#1014 era) | Unit (existing) | @@ -93,7 +93,7 @@ the live wire), **unmeasured** (inferred; a spike is filed). 2. PR C: timeout and wrong bytes on free scales read `no` / `retry` (row 16), delivered by #1571. 3. PR D: `--json` on `gflow video upscale` and `gflow image upscale` (row 17). 4. Spike: scope of an export refusal (page, process, profile) on `p0UkFb`. -5. Spike: billing of the 720p and 270p exports on the wire. +5. Spike: billing of the 720p and 270p exports on the wire (done: 0 credits, #1574). 6. Spike (paid, owner approval required): whether a refused 4K upscale is billed. ## Suggested BDD scenarios diff --git a/src/gflow_cli/api/refusal.py b/src/gflow_cli/api/refusal.py index dff7fead6..7a1c07174 100644 --- a/src/gflow_cli/api/refusal.py +++ b/src/gflow_cli/api/refusal.py @@ -30,9 +30,10 @@ log = structlog.get_logger(__name__) _COOLDOWN = "the 30-60 minute cooldown described in docs/ACCOUNT_SAFETY.md" -#: Upscales whose export was measured to spend no credits (1080p video on 2026-10-07 and -#: 2026-11-27; 2K image in the e2e suite). Every other scale is ``maybe`` until measured. -_FREE_UPSCALES = frozenset({"1080p", "2k"}) +#: Upscales whose export was measured to spend no credits: 1080p video (2026-10-07, +#: 2026-11-27), 720p video and the 270p GIF (2026-11-29, #1574), 2K image (e2e suite). Any +#: other scale is ``maybe`` until measured. +_FREE_UPSCALES = frozenset({"1080p", "720p", "270p", "2k"}) #: The status poll runs only after Flow accepted the export, so a refusal there may follow #: a billed request. _AFTER_ACCEPT_RPCS = frozenset({"jwpduf"}) @@ -76,9 +77,9 @@ def unusual_activity_refusal( def upscale_refusal(*, rpcid: str, code: int | None, scale: str) -> WafRejectionError: """The refusal of an upscale or export RPC at ``scale`` (``1080p``, ``4k``, ``2k``, ...). - A free scale reads ``no`` / ``wait``; an unmeasured one ``maybe`` / ``wait``; 4K (video - bills on click; image is unmeasured and treated the same) and the post-accept status poll - read ``maybe`` / ``reconcile``. + A free scale (1080p, 720p, 270p, 2K) reads ``no`` / ``wait``; an unmeasured one ``maybe`` / + ``wait``; 4K (video bills on click; image is unmeasured and treated the same) and the + post-accept status poll read ``maybe`` / ``reconcile``. """ scale = scale.strip().lower() charged: Charged @@ -109,10 +110,10 @@ class UpscaleFailureOutcome(TypedDict, total=False): def upscale_failure_outcome(scale: str) -> UpscaleFailureOutcome: """The outcome of an upscale that timed out or returned the wrong bytes after its click. - A free scale (1080p video, 2K image) is a free retry: ``no`` / ``retry``. 4K may have - billed (a 4K video bills on click; 4K image billing is unmeasured and treated the same): - ``maybe`` / ``reconcile``, never retried. An unmeasured scale (720p, the 270p GIF) keeps - its error class's own outcome (#1571). + A free scale (1080p, 720p and 270p video, 2K image) is a free retry: ``no`` / ``retry``. + 4K may have billed (a 4K video bills on click; 4K image billing is unmeasured and treated + the same): ``maybe`` / ``reconcile``, never retried. Any other scale keeps its error + class's own outcome (#1571). """ scale = scale.strip().lower() if scale in _FREE_UPSCALES: diff --git a/src/gflow_cli/mcp/tools.py b/src/gflow_cli/mcp/tools.py index 0d7e15e02..2a45d1a6d 100644 --- a/src/gflow_cli/mcp/tools.py +++ b/src/gflow_cli/mcp/tools.py @@ -1905,7 +1905,8 @@ async def gflow_upscale_image( "Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p; " "4k requires Flow Ultra); a scale the clip's menu does not list returns " "UpscaleUnavailableError (exit 22) naming the scales it does list. " - "Measured: 1080p export spent 0 credits (2026-10-07); 4k Ultra export spends credits " + "Measured: 1080p export spent 0 credits (2026-10-07), as did 720p and the 270p GIF " + "(2026-11-29); 4k Ultra export spends credits " "(measured 50 credits on Omni 1.2 Flash, 2026-11-23). " "A 1080p upscale of a catalogued measured source goes over direct HTTP with a " "headless browser that only mints the reCAPTCHA token. Under auto, the download-menu " diff --git a/tests/api/test_migrated_video_upscale.py b/tests/api/test_migrated_video_upscale.py index 279d02759..d7888d9d2 100644 --- a/tests/api/test_migrated_video_upscale.py +++ b/tests/api/test_migrated_video_upscale.py @@ -506,8 +506,8 @@ async def _fake_wait_for_timeout(ms: int) -> None: ("rpcid", "scale", "label", "charged", "next_action"), [ ("p0UkFb", "1080p", "1080p Upscaled", "no", "wait"), - ("p0UkFb", "720p", "720p Upscaled", "maybe", "wait"), - ("p0UkFb", "270p", "270p Animated GIF", "maybe", "wait"), + ("p0UkFb", "720p", "720p Upscaled", "no", "wait"), + ("p0UkFb", "270p", "270p Animated GIF", "no", "wait"), ("p0UkFb", "4k", "4K Upscaled 50 credits", "maybe", "reconcile"), ("jwpduf", "1080p", "1080p Upscaled", "maybe", "reconcile"), ("as29s", "1080p", "1080p Upscaled", "no", "wait"), # a stored render (#1570) @@ -563,8 +563,8 @@ async def test_migrated_video_upscale_closes_the_promo_over_the_menu() -> None: ("scale", "label", "charged", "next_action", "cost"), [ ("1080p", "1080p Upscaled", "no", "retry", "spends no credits"), - ("720p", "720p Upscaled", "maybe", "retry", "has not been measured"), - ("270p", "270p Animated GIF", "maybe", "retry", "has not been measured"), + ("720p", "720p Upscaled", "no", "retry", "spends no credits"), + ("270p", "270p Animated GIF", "no", "retry", "spends no credits"), ("4k", "4K Upscaled 50 credits", "maybe", "reconcile", "spends credits"), ], ) @@ -587,8 +587,8 @@ async def test_export_timeout_outcome_follows_the_scale( ("scale", "label", "data", "charged", "next_action"), [ ("1080p", "1080p Upscaled", _mp4((1280, 720)), "no", "retry"), - ("720p", "720p Upscaled", b"not an mp4 file", "maybe", "reconcile"), - ("270p", "270p Animated GIF", b"not a gif file", "maybe", "reconcile"), + ("720p", "720p Upscaled", b"not an mp4 file", "no", "retry"), + ("270p", "270p Animated GIF", b"not a gif file", "no", "retry"), ], ) async def test_wrong_export_bytes_outcome_follows_the_scale( @@ -600,15 +600,14 @@ async def test_wrong_export_bytes_outcome_follows_the_scale( await _run(page, scale) err = exc_info.value assert (err.charged, err.resolved_next_action()) == (charged, next_action) - if scale != "1080p": - assert "spends no credits" not in err.remediation_hint + assert "spends no credits" in err.remediation_hint @pytest.mark.parametrize( ("scale", "label", "charged", "next_action"), [ ("1080p", "1080p Upscaled", "no", "retry"), - ("720p", "720p Upscaled", "maybe", "reconcile"), + ("720p", "720p Upscaled", "no", "retry"), ("4k", "4K Upscaled · 50 credits", "maybe", "reconcile"), ], ) diff --git a/tests/api/test_refusal.py b/tests/api/test_refusal.py index 9b499fd0e..fd89a966b 100644 --- a/tests/api/test_refusal.py +++ b/tests/api/test_refusal.py @@ -17,8 +17,9 @@ [ ("1080p", "p0UkFb", "no", "wait"), ("2k", "SPrCad", "no", "wait"), - ("720p", "p0UkFb", "maybe", "wait"), - ("270p", "p0UkFb", "maybe", "wait"), + ("720p", "p0UkFb", "no", "wait"), + ("270p", "p0UkFb", "no", "wait"), + ("360p", "p0UkFb", "maybe", "wait"), # a scale whose billing is not measured ("4k", "p0UkFb", "maybe", "reconcile"), ("4k", "SPrCad", "maybe", "reconcile"), ("1080p", "jwpduf", "maybe", "reconcile"), @@ -43,7 +44,7 @@ def test_upscale_refusal_contract(scale: str, rpcid: str, charged: str, next_act @pytest.mark.parametrize( - ("scale", "rpcid"), [("4k", "p0UkFb"), ("720p", "p0UkFb"), ("1080p", "jwpduf")] + ("scale", "rpcid"), [("4k", "p0UkFb"), ("360p", "p0UkFb"), ("1080p", "jwpduf")] ) def test_a_refusal_that_may_have_billed_never_says_nothing_was_charged( scale: str, rpcid: str @@ -165,8 +166,9 @@ def test_a_refusal_beside_a_safety_frame_returns_the_policy_error_and_does_not_r ("1080p", {"charged": "no", "next_action": "retry"}), ("2K", {"charged": "no", "next_action": "retry"}), ("4k", {"charged": "maybe", "next_action": "reconcile"}), - ("720p", {}), - ("270p", {}), + ("720p", {"charged": "no", "next_action": "retry"}), + ("270p", {"charged": "no", "next_action": "retry"}), + ("360p", {}), # a scale whose billing is not measured ], ) def test_upscale_failure_outcome(scale: str, expected: dict[str, object]) -> None: @@ -179,5 +181,6 @@ def test_upscale_cost_note_claims_no_cost_only_for_measured_scales() -> None: from gflow_cli.api.refusal import upscale_cost_note assert upscale_cost_note("1080p") == "it spends no credits" - assert "not been measured" in upscale_cost_note("720p") + assert upscale_cost_note("720p") == "it spends no credits" + assert "not been measured" in upscale_cost_note("360p") assert "credit balance" in upscale_cost_note("4K") diff --git a/website/docs/ERRORS.md b/website/docs/ERRORS.md index 32aa1f341..009a4af91 100644 --- a/website/docs/ERRORS.md +++ b/website/docs/ERRORS.md @@ -161,9 +161,9 @@ place today: refused the same way on the UI path reads `no` / `wait` too. - `image upscale` and `video upscale`: Flow refusing the upscale or export RPC as `PUBLIC_ERROR_UNUSUAL_ACTIVITY` is `WafRejectionError` (exit 10), never retryable, and its - `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p - video, 2K image) read `no` / `wait`; 720p and the 270p GIF, whose billing has not been measured, - read `maybe` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated + `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p, + 720p and the 270p GIF for video, 2K for image; + [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated the same), and a refusal on the `jwpduf` status poll, which runs after Flow accepted the export, read `maybe` / `reconcile`. No `retry_after` is given: no cooldown has been measured. Any other refusal of those RPCs stays `WireFormatError` (exit 7). @@ -171,8 +171,7 @@ place today: export RPC; a refusal there follows the same scale rule, and any other `as29s` error is ignored, because the page also uses `as29s` for its own reads. An `as29s` refusal during a fresh export ends it the same way, since it means the page itself is refused; there it reads - the scale's refusal outcome even after Flow accepted the export, so a 720p or 270p export - reads `maybe` / `wait` rather than the `reconcile` a `jwpduf` refusal would give + the scale's refusal outcome even after Flow accepted the export ([#1570](https://github.com/ffroliva/gflow-cli/issues/1570)). The direct path reads the same refusal on the `jwpduf` poll and on the `as29s` read of the finished clip's URL, for a 1080p upscale, a text-to-video or an image-to-video, and stops at @@ -180,11 +179,11 @@ place today: ([#1597](https://github.com/ffroliva/gflow-cli/issues/1597)). On the download-menu path, an upscale that times out after its click (`TransportTimeoutError`, exit 9), returns bytes that are not the file asked for, or has its export RPC refused for any - other reason (`WireFormatError`, exit 7) follows the same scale rule: 1080p video and 2K image - read `no` / `retry` (re-running spends nothing), 4K reads `maybe` / `reconcile` and is never - retryable, and 720p and the 270p GIF keep their class's outcome (`maybe` / `retry` for a - timeout, `maybe` / `reconcile` for wrong bytes) until their billing is measured - ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571)). On the direct 1080p route a + other reason (`WireFormatError`, exit 7) follows the same scale rule: the free scales + (1080p, 720p and 270p video, 2K image) read `no` / `retry` (re-running spends nothing), and + 4K reads `maybe` / `reconcile` and is never retryable + ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571), + [#1599](https://github.com/ffroliva/gflow-cli/issues/1599)). On the direct 1080p route a failure after the request was sent stays `maybe` / `reconcile`, like every direct request. `RelaunchFailed` (exit 15, `no` / `retry`) is raised when the browser cannot start again, either for the retry after a refusal (its detail names the refusal) or for a request that From fa40d154c525a1310a07482051ae40ff1855115b Mon Sep 17 00:00:00 2001 From: Flavio Oliva Date: Sun, 29 Nov 2026 22:41:17 +0000 Subject: [PATCH 2/5] docs(upscale): fold the 720p/270p outcome into the unreleased entries; note it in MCP.md Addresses the code and lean reviews: the earlier [Unreleased] entries for #1563 and #1571 now state the final per-scale outcome instead of a separate, contradicting entry; MCP.md records the 720p/270p measurement; the test fallback scale is labelled. --- CHANGELOG.md | 25 +++++++++---------------- docs/ERRORS.md | 3 ++- docs/MCP.md | 2 +- tests/api/test_refusal.py | 4 ++-- website/docs/ERRORS.md | 3 ++- website/docs/MCP.md | 2 +- 6 files changed, 17 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b2c4c0e4..bf2204835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,13 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- **The 720p and 270p video exports read as free - ([#1599](https://github.com/ffroliva/gflow-cli/issues/1599)).** Both were measured to spend no - credits ([spike](docs/superpowers/spikes/2026-11-29-export-billing-720p-270p.md)), so a 720p or - 270p export that Flow refuses as unusual activity now reads `charged: no` / `next_action: wait` - (was `maybe` / `wait`), and one that times out or returns the wrong file reads `no` / `retry` - (was `maybe` / `retry` or `maybe` / `reconcile`), like 1080p. Their hints say a re-run spends - no credits. - **The video download-menu upscales run headless by default** ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). Under `auto` on flow.google.com, `video upscale --scale 720p` and `--scale 270p` drive the download menu in a headless browser, on the CLI and on `gflow_upscale_video`: each ran twice headless matching a @@ -77,9 +70,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#1563](https://github.com/ffroliva/gflow-cli/pull/1563)).** When Flow refuses `image upscale` or `video upscale` as `PUBLIC_ERROR_UNUSUAL_ACTIVITY` on the download-menu path, the command now exits **10** (`WafRejectionError`) instead of **7** (`WireFormatError`); under - `GFLOW_CLI_EXIT_CODES=2` it is 10 instead of 43. It is never retryable. 1080p video and 2K image - read `charged: no` / `next_action: wait`; 720p and 270p read `maybe` / `wait` until their billing - is measured; 4K and a refusal on the `jwpduf` status poll read `maybe` / `reconcile`, and their + `GFLOW_CLI_EXIT_CODES=2` it is 10 instead of 43. It is never retryable. The scales measured to spend + no credits (1080p, 720p and the 270p GIF for video, 2K for image; + [#1599](https://github.com/ffroliva/gflow-cli/issues/1599)) read `charged: no` / + `next_action: wait`; 4K and a refusal on the `jwpduf` status poll read `maybe` / `reconcile`, and their hint no longer says nothing was charged. The MCP tools `gflow_upscale_image` and `gflow_upscale_video` return the same fields. - **A final submit refusal reads `next_action: wait`.** The `WafRejectionError` raised after the @@ -104,13 +98,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `as29s`. A `PUBLIC_ERROR_UNUSUAL_ACTIVITY` refusal there now raises `WafRejectionError` (exit 10) with the scale's outcome, instead of waiting out the export budget and timing out. - **An upscale that times out or returns the wrong file reads its scale's outcome - ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571)).** On the download-menu path, a - 1080p video export or a 2K image upscale that times out, returns bytes that are not the - requested file, or has its export RPC refused for a reason other than unusual activity now - reads `charged: no` / `next_action: retry` (it read `maybe` / `retry` or `maybe` / + ([#1571](https://github.com/ffroliva/gflow-cli/issues/1571)).** On the download-menu path, an + upscale at a free scale (1080p, 720p or 270p video, 2K image) that times out, returns bytes that + are not the requested file, or has its export RPC refused for a reason other than unusual + activity now reads `charged: no` / `next_action: retry` (it read `maybe` / `retry` or `maybe` / `reconcile`). A 4K image upscale that times out now reads `maybe` / `reconcile` and is no - longer retryable, as a 4K video already did. 720p and the 270p GIF keep their outcomes, and - their hints no longer say that re-running spends no credits, which has not been measured. + longer retryable, as a 4K video already did. - **`video upscale` on the download-menu path waits for the clip before clicking, and gives 720p and 1080p exports 240 s ([#1564](https://github.com/ffroliva/gflow-cli/pull/1564)).** The first click on the clip editor's download button waits up to 3 s for the editor's first data reply, diff --git a/docs/ERRORS.md b/docs/ERRORS.md index 009a4af91..5737acc6a 100644 --- a/docs/ERRORS.md +++ b/docs/ERRORS.md @@ -163,7 +163,8 @@ place today: `PUBLIC_ERROR_UNUSUAL_ACTIVITY` is `WafRejectionError` (exit 10), never retryable, and its `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p, 720p and the 270p GIF for video, 2K for image; - [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated + [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; + 4K (a 4K video bills on click; 4K image billing is unmeasured and treated the same), and a refusal on the `jwpduf` status poll, which runs after Flow accepted the export, read `maybe` / `reconcile`. No `retry_after` is given: no cooldown has been measured. Any other refusal of those RPCs stays `WireFormatError` (exit 7). diff --git a/docs/MCP.md b/docs/MCP.md index be907d28d..52931cf7a 100644 --- a/docs/MCP.md +++ b/docs/MCP.md @@ -195,7 +195,7 @@ is [BROWSER_MODES](BROWSER_MODES.md). * `gflow_usage_stats(weeks)`: Summarize local gflow-cli usage statistics over the last N weeks (default 12, range 1..53). Returns command invocation counts across surfaces from local telemetry (or null when telemetry is off) and generation counts by command, model, status, and month from the local catalog. Its `telemetry` block includes `state`, `switch`, `upload` (`enabled` and `reason`), and the current report (#1164). The tool reads local data and spends no credits; like other MCP calls, its telemetry hook may start a separate weekly upload when eligible. MCP does not expose telemetry `on` or `off`; those controls are CLI-only by design. * `gflow_download_media(media_id, out_dir, profile)`: Fetches an already-generated asset from Flow by its media ID and writes it to disk — the recovery path for a generation that was billed but whose download failed. Spends no credits. The bytes are verified against the size Flow reports before the file is written, and the catalog's `local_files` row is updated. Returns `path`, `bytes`, `media_id`, `workflow_id`, `project_id` and `profile`. The transfer retries a dropped connection internally ([#895](https://github.com/ffroliva/gflow-cli/issues/895)), so a failure marked `retryable` means pause and call again — not immediately, and not in a tight loop: each call opens a browser under a per-profile lease, and a second concurrent call fails on that lease instead (exit 11). * `gflow_upscale_image(media_id, scale, project, out_dir, profile)`: Upscales an already-generated image to 2K or 4K; it opens a headed browser under `auto` (a headless 2K upscale was refused as unusual activity on one of two accounts, #1554). `scale` is `2k` or `4k` (4K requires Ultra; Pro accounts support 2K). A scale the download menu does not list is exit 22 (`upscale-unavailable`), naming the listed scales. 2K spends no credits; whether 4K does has not been measured, so a 4K refusal reads `charged: maybe` / `next_action: reconcile`. -* `gflow_upscale_video(media_id, scale, project, out_dir, profile, browser_visibility)`: Upscales or exports an already-generated video to 4K Ultra (spends credits), 1080p Full HD, downloads it at 720p (the original, or for a clip with a smaller original Flow's 720p upscale), or exports a 270p animated GIF. `scale` is `4k`, `1080p`, `720p`, or `270p`. Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p; `4k` requires Flow Ultra); a scale the clip's download menu does not list returns `UpscaleUnavailableError` (exit 22) naming the listed scales (#1338). Driven on `flow.google.com` only; 1080p was measured free (2026-10-07) while 4K spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). A 1080p upscale of a clip the local catalog records as Omni 1.2 Flash, 4 s, 16:9 goes over direct HTTP with a headless browser that only mints the reCAPTCHA token; 1080p planned through the menu drives it in a headed browser. The result names the `route` the upscale took (`ui` when a planned direct attempt fell back to the menu) and the `visibility`. Under `auto`, the download-menu scales (720p, 270p, and 4K unmeasured) run in a headless browser (#1554). +* `gflow_upscale_video(media_id, scale, project, out_dir, profile, browser_visibility)`: Upscales or exports an already-generated video to 4K Ultra (spends credits), 1080p Full HD, downloads it at 720p (the original, or for a clip with a smaller original Flow's 720p upscale), or exports a 270p animated GIF. `scale` is `4k`, `1080p`, `720p`, or `270p`. Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p; `4k` requires Flow Ultra); a scale the clip's download menu does not list returns `UpscaleUnavailableError` (exit 22) naming the listed scales (#1338). Driven on `flow.google.com` only; 1080p was measured free (2026-10-07), as were 720p and the 270p GIF (2026-11-29) while 4K spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). A 1080p upscale of a clip the local catalog records as Omni 1.2 Flash, 4 s, 16:9 goes over direct HTTP with a headless browser that only mints the reCAPTCHA token; 1080p planned through the menu drives it in a headed browser. The result names the `route` the upscale took (`ui` when a planned direct attempt fell back to the menu) and the `visibility`. Under `auto`, the download-menu scales (720p, 270p, and 4K unmeasured) run in a headless browser (#1554). * `gflow_list_tools()`: Lists the prompt tools (name/title/description/category) accepted by the generate tools' `tools` param. Each `tools` item is `{"name": , "options": {...}}`, e.g. `[{"name": "creative-director"}]`. * `gflow_list_models()`: The image and video model catalog, the same object as `gflow models --json` ([#883](https://github.com/ffroliva/gflow-cli/issues/883)); each model entry is what `gflow models show --json` prints ([#1196](https://github.com/ffroliva/gflow-cli/issues/1196)): per model `name`, `label` (image: Flow's menu name), the CLI's `--model` `aliases` (the generate tools accept each of them as `model`, plus wider spellings such as `narwhal` or `veo_lite`), `ref_cap`, `default` (image), and `max_duration`, `durations` (video: the clip lengths `duration` accepts for that model) and `retires_on` (video: the ISO date Flow retires the model, or `null`; [#1375](https://github.com/ffroliva/gflow-cli/issues/1375)). `aspects` and video `tiers` sit on each section (`image` / `video`), not on the per-model entry, so `models show --json` does not carry them. Built from the same enums the generate tools use, so every alias it lists is accepted back. Static: no profile, no browser, no spend. * `gflow_instructions_list(project, profile)`: Lists a project's persistent Agent-Mode instruction cards (live server brief; credits-free). diff --git a/tests/api/test_refusal.py b/tests/api/test_refusal.py index fd89a966b..341ef68a4 100644 --- a/tests/api/test_refusal.py +++ b/tests/api/test_refusal.py @@ -19,7 +19,7 @@ ("2k", "SPrCad", "no", "wait"), ("720p", "p0UkFb", "no", "wait"), ("270p", "p0UkFb", "no", "wait"), - ("360p", "p0UkFb", "maybe", "wait"), # a scale whose billing is not measured + ("360p", "p0UkFb", "maybe", "wait"), # not a valid scale: exercises the unmeasured fallback ("4k", "p0UkFb", "maybe", "reconcile"), ("4k", "SPrCad", "maybe", "reconcile"), ("1080p", "jwpduf", "maybe", "reconcile"), @@ -168,7 +168,7 @@ def test_a_refusal_beside_a_safety_frame_returns_the_policy_error_and_does_not_r ("4k", {"charged": "maybe", "next_action": "reconcile"}), ("720p", {"charged": "no", "next_action": "retry"}), ("270p", {"charged": "no", "next_action": "retry"}), - ("360p", {}), # a scale whose billing is not measured + ("360p", {}), # not a valid scale: exercises the unmeasured fallback ], ) def test_upscale_failure_outcome(scale: str, expected: dict[str, object]) -> None: diff --git a/website/docs/ERRORS.md b/website/docs/ERRORS.md index 009a4af91..5737acc6a 100644 --- a/website/docs/ERRORS.md +++ b/website/docs/ERRORS.md @@ -163,7 +163,8 @@ place today: `PUBLIC_ERROR_UNUSUAL_ACTIVITY` is `WafRejectionError` (exit 10), never retryable, and its `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p, 720p and the 270p GIF for video, 2K for image; - [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated + [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; + 4K (a 4K video bills on click; 4K image billing is unmeasured and treated the same), and a refusal on the `jwpduf` status poll, which runs after Flow accepted the export, read `maybe` / `reconcile`. No `retry_after` is given: no cooldown has been measured. Any other refusal of those RPCs stays `WireFormatError` (exit 7). diff --git a/website/docs/MCP.md b/website/docs/MCP.md index be907d28d..52931cf7a 100644 --- a/website/docs/MCP.md +++ b/website/docs/MCP.md @@ -195,7 +195,7 @@ is [BROWSER_MODES](BROWSER_MODES.md). * `gflow_usage_stats(weeks)`: Summarize local gflow-cli usage statistics over the last N weeks (default 12, range 1..53). Returns command invocation counts across surfaces from local telemetry (or null when telemetry is off) and generation counts by command, model, status, and month from the local catalog. Its `telemetry` block includes `state`, `switch`, `upload` (`enabled` and `reason`), and the current report (#1164). The tool reads local data and spends no credits; like other MCP calls, its telemetry hook may start a separate weekly upload when eligible. MCP does not expose telemetry `on` or `off`; those controls are CLI-only by design. * `gflow_download_media(media_id, out_dir, profile)`: Fetches an already-generated asset from Flow by its media ID and writes it to disk — the recovery path for a generation that was billed but whose download failed. Spends no credits. The bytes are verified against the size Flow reports before the file is written, and the catalog's `local_files` row is updated. Returns `path`, `bytes`, `media_id`, `workflow_id`, `project_id` and `profile`. The transfer retries a dropped connection internally ([#895](https://github.com/ffroliva/gflow-cli/issues/895)), so a failure marked `retryable` means pause and call again — not immediately, and not in a tight loop: each call opens a browser under a per-profile lease, and a second concurrent call fails on that lease instead (exit 11). * `gflow_upscale_image(media_id, scale, project, out_dir, profile)`: Upscales an already-generated image to 2K or 4K; it opens a headed browser under `auto` (a headless 2K upscale was refused as unusual activity on one of two accounts, #1554). `scale` is `2k` or `4k` (4K requires Ultra; Pro accounts support 2K). A scale the download menu does not list is exit 22 (`upscale-unavailable`), naming the listed scales. 2K spends no credits; whether 4K does has not been measured, so a 4K refusal reads `charged: maybe` / `next_action: reconcile`. -* `gflow_upscale_video(media_id, scale, project, out_dir, profile, browser_visibility)`: Upscales or exports an already-generated video to 4K Ultra (spends credits), 1080p Full HD, downloads it at 720p (the original, or for a clip with a smaller original Flow's 720p upscale), or exports a 270p animated GIF. `scale` is `4k`, `1080p`, `720p`, or `270p`. Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p; `4k` requires Flow Ultra); a scale the clip's download menu does not list returns `UpscaleUnavailableError` (exit 22) naming the listed scales (#1338). Driven on `flow.google.com` only; 1080p was measured free (2026-10-07) while 4K spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). A 1080p upscale of a clip the local catalog records as Omni 1.2 Flash, 4 s, 16:9 goes over direct HTTP with a headless browser that only mints the reCAPTCHA token; 1080p planned through the menu drives it in a headed browser. The result names the `route` the upscale took (`ui` when a planned direct attempt fell back to the menu) and the `visibility`. Under `auto`, the download-menu scales (720p, 270p, and 4K unmeasured) run in a headless browser (#1554). +* `gflow_upscale_video(media_id, scale, project, out_dir, profile, browser_visibility)`: Upscales or exports an already-generated video to 4K Ultra (spends credits), 1080p Full HD, downloads it at 720p (the original, or for a clip with a smaller original Flow's 720p upscale), or exports a 270p animated GIF. `scale` is `4k`, `1080p`, `720p`, or `270p`. Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p; `4k` requires Flow Ultra); a scale the clip's download menu does not list returns `UpscaleUnavailableError` (exit 22) naming the listed scales (#1338). Driven on `flow.google.com` only; 1080p was measured free (2026-10-07), as were 720p and the 270p GIF (2026-11-29) while 4K spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). A 1080p upscale of a clip the local catalog records as Omni 1.2 Flash, 4 s, 16:9 goes over direct HTTP with a headless browser that only mints the reCAPTCHA token; 1080p planned through the menu drives it in a headed browser. The result names the `route` the upscale took (`ui` when a planned direct attempt fell back to the menu) and the `visibility`. Under `auto`, the download-menu scales (720p, 270p, and 4K unmeasured) run in a headless browser (#1554). * `gflow_list_tools()`: Lists the prompt tools (name/title/description/category) accepted by the generate tools' `tools` param. Each `tools` item is `{"name": , "options": {...}}`, e.g. `[{"name": "creative-director"}]`. * `gflow_list_models()`: The image and video model catalog, the same object as `gflow models --json` ([#883](https://github.com/ffroliva/gflow-cli/issues/883)); each model entry is what `gflow models show --json` prints ([#1196](https://github.com/ffroliva/gflow-cli/issues/1196)): per model `name`, `label` (image: Flow's menu name), the CLI's `--model` `aliases` (the generate tools accept each of them as `model`, plus wider spellings such as `narwhal` or `veo_lite`), `ref_cap`, `default` (image), and `max_duration`, `durations` (video: the clip lengths `duration` accepts for that model) and `retires_on` (video: the ISO date Flow retires the model, or `null`; [#1375](https://github.com/ffroliva/gflow-cli/issues/1375)). `aspects` and video `tiers` sit on each section (`image` / `video`), not on the per-model entry, so `models show --json` does not carry them. Built from the same enums the generate tools use, so every alias it lists is accepted back. Static: no profile, no browser, no spend. * `gflow_instructions_list(project, profile)`: Lists a project's persistent Agent-Mode instruction cards (live server brief; credits-free). From 0a5ca94f40da1a8fc3fc760adb6f7dbc54ca6193 Mon Sep 17 00:00:00 2001 From: Flavio Oliva Date: Sun, 29 Nov 2026 22:45:06 +0000 Subject: [PATCH 3/5] docs(upscale): record the 720p/270p measurement in USAGE; say what is unmeasured about 4K Addresses the council review on #1606: USAGE's Cost line names the 720p and 270p measurement, and the headless notes say it is 4K's headless run that is unmeasured, not its billing. Adds a 270p row to the other-export-error test. --- docs/CONFIGURATION.md | 2 +- docs/MCP.md | 2 +- docs/USAGE.md | 3 ++- src/gflow_cli/mcp/tools.py | 4 ++-- tests/api/test_migrated_video_upscale.py | 1 + website/docs/CONFIGURATION.md | 2 +- website/docs/MCP.md | 2 +- website/docs/USAGE.md | 3 ++- 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 94808d773..90c67d8a9 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -425,7 +425,7 @@ GFLOW_CLI_HISTORY_PROMPTS=redacted gflow image t2i "confidential brief" **Default:** `auto`. A request the direct transport can send (a measured shape) launches Chrome **headless**, and that browser only mints the reCAPTCHA token; a surface that still needs Flow's UI launches **headed**, except the surfaces measured headless (`video extend` on flow.google.com, -the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K unmeasured), and image-to-image from one local `--ref` +the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K, whose headless run is unmeasured), and image-to-image from one local `--ref` file in an existing project on an otherwise direct request), which launch headless. A run that holds any UI item launches headed for the whole run. A refusal Flow did not charge is retried once from a new headless browser process. The per-command list is [BROWSER_MODES](BROWSER_MODES.md). diff --git a/docs/MCP.md b/docs/MCP.md index 52931cf7a..cfc8f9634 100644 --- a/docs/MCP.md +++ b/docs/MCP.md @@ -119,7 +119,7 @@ shape, and any video with a `max_credits` cap, opens a headed browser. The excep `auto` runs it headless ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)), as do the page fallback of `gflow_media_trash` / `gflow_media_restore`, a `gflow_generate_image` call whose only reference is one local file in an existing project, when the request would go direct once the file is uploaded, -and the `gflow_upscale_video` download-menu scales (720p, 270p, and 4K, which is unmeasured). A refusal Flow did not +and the `gflow_upscale_video` download-menu scales (720p, 270p, and 4K, whose headless run is unmeasured). A refusal Flow did not charge is retried once from a new headless browser; a second one is final (`WafRejectionError`, `charged: "no"`, `retryable: false`, `next_action: "wait"`). `headless` for any other Flow UI shape is unsupported in v0.108.0 ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). The diff --git a/docs/USAGE.md b/docs/USAGE.md index 17b0cc0f0..361fa435b 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -445,7 +445,8 @@ Notes: gflow could not pick its item. - **flow.google.com only.** There is no labs.google route; `GFLOW_CLI_FLOW_HOST=labs.google` refuses the command with exit 36. -- **Cost:** the 1080p export was measured free (1 observation, 2026-10-07); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). +- **Cost:** the 1080p export was measured free (1 observation, 2026-10-07), as were the 720p + export and the 270p GIF ([2026-11-29](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). - Saved as `/videos//_.` (`.mp4` or `.gif`). ## `gflow image generate` / `gflow video generate` diff --git a/src/gflow_cli/mcp/tools.py b/src/gflow_cli/mcp/tools.py index 2a45d1a6d..7e84c92b4 100644 --- a/src/gflow_cli/mcp/tools.py +++ b/src/gflow_cli/mcp/tools.py @@ -1910,8 +1910,8 @@ async def gflow_upscale_image( "(measured 50 credits on Omni 1.2 Flash, 2026-11-23). " "A 1080p upscale of a catalogued measured source goes over direct HTTP with a " "headless browser that only mints the reCAPTCHA token. Under auto, the download-menu " - "scales (720p, 270p, and 4k, which is unmeasured) run in a headless browser; 1080p " - "planned through the menu opens a visible one (browser_visibility overrides). The " + "scales (720p, 270p, and 4k, whose headless run is unmeasured) run in a headless browser; " + "1080p planned through the menu opens a visible one (browser_visibility overrides). The " "result names route and visibility." ), ) diff --git a/tests/api/test_migrated_video_upscale.py b/tests/api/test_migrated_video_upscale.py index d7888d9d2..8bb06a0de 100644 --- a/tests/api/test_migrated_video_upscale.py +++ b/tests/api/test_migrated_video_upscale.py @@ -608,6 +608,7 @@ async def test_wrong_export_bytes_outcome_follows_the_scale( [ ("1080p", "1080p Upscaled", "no", "retry"), ("720p", "720p Upscaled", "no", "retry"), + ("270p", "270p Animated GIF", "no", "retry"), ("4k", "4K Upscaled · 50 credits", "maybe", "reconcile"), ], ) diff --git a/website/docs/CONFIGURATION.md b/website/docs/CONFIGURATION.md index bc68322aa..a1fa06015 100644 --- a/website/docs/CONFIGURATION.md +++ b/website/docs/CONFIGURATION.md @@ -425,7 +425,7 @@ GFLOW_CLI_HISTORY_PROMPTS=redacted gflow image t2i "confidential brief" **Default:** `auto`. A request the direct transport can send (a measured shape) launches Chrome **headless**, and that browser only mints the reCAPTCHA token; a surface that still needs Flow's UI launches **headed**, except the surfaces measured headless (`video extend` on flow.google.com, -the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K unmeasured), and image-to-image from one local `--ref` +the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K, whose headless run is unmeasured), and image-to-image from one local `--ref` file in an existing project on an otherwise direct request), which launch headless. A run that holds any UI item launches headed for the whole run. A refusal Flow did not charge is retried once from a new headless browser process. The per-command list is [BROWSER_MODES](BROWSER_MODES.md). diff --git a/website/docs/MCP.md b/website/docs/MCP.md index 52931cf7a..cfc8f9634 100644 --- a/website/docs/MCP.md +++ b/website/docs/MCP.md @@ -119,7 +119,7 @@ shape, and any video with a `max_credits` cap, opens a headed browser. The excep `auto` runs it headless ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)), as do the page fallback of `gflow_media_trash` / `gflow_media_restore`, a `gflow_generate_image` call whose only reference is one local file in an existing project, when the request would go direct once the file is uploaded, -and the `gflow_upscale_video` download-menu scales (720p, 270p, and 4K, which is unmeasured). A refusal Flow did not +and the `gflow_upscale_video` download-menu scales (720p, 270p, and 4K, whose headless run is unmeasured). A refusal Flow did not charge is retried once from a new headless browser; a second one is final (`WafRejectionError`, `charged: "no"`, `retryable: false`, `next_action: "wait"`). `headless` for any other Flow UI shape is unsupported in v0.108.0 ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). The diff --git a/website/docs/USAGE.md b/website/docs/USAGE.md index 4b564a7db..8ecdc733c 100644 --- a/website/docs/USAGE.md +++ b/website/docs/USAGE.md @@ -445,7 +445,8 @@ Notes: gflow could not pick its item. - **flow.google.com only.** There is no labs.google route; `GFLOW_CLI_FLOW_HOST=labs.google` refuses the command with exit 36. -- **Cost:** the 1080p export was measured free (1 observation, 2026-10-07); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). +- **Cost:** the 1080p export was measured free (1 observation, 2026-10-07), as were the 720p + export and the 270p GIF ([2026-11-29](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). - Saved as `/videos//_.` (`.mp4` or `.gif`). ## `gflow image generate` / `gflow video generate` From 980772f8e4028a4074c571c2c2b5a1c7096ecb03 Mon Sep 17 00:00:00 2001 From: Flavio Oliva Date: Sun, 29 Nov 2026 22:48:07 +0000 Subject: [PATCH 4/5] docs(changelog): say which 720p operations the measurement covers Addresses CodeRabbit on #1606. --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2204835..ef6de1ee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,7 +72,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 exits **10** (`WafRejectionError`) instead of **7** (`WireFormatError`); under `GFLOW_CLI_EXIT_CODES=2` it is 10 instead of 43. It is never retryable. The scales measured to spend no credits (1080p, 720p and the 270p GIF for video, 2K for image; - [#1599](https://github.com/ffroliva/gflow-cli/issues/1599)) read `charged: no` / + [#1599](https://github.com/ffroliva/gflow-cli/issues/1599); a 720p export is the original + download for a clip whose original is 720p, and Flow's upscale for a smaller original, and + both were measured) read `charged: no` / `next_action: wait`; 4K and a refusal on the `jwpduf` status poll read `maybe` / `reconcile`, and their hint no longer says nothing was charged. The MCP tools `gflow_upscale_image` and `gflow_upscale_video` return the same fields. From 8a0ba1053859c19f550e96fd9053039e2dfd5fd5 Mon Sep 17 00:00:00 2001 From: Flavio Oliva Date: Sun, 29 Nov 2026 22:58:24 +0000 Subject: [PATCH 5/5] docs(config): say which surfaces launch headless, not that all were measured Addresses CodeRabbit on #1606. --- docs/CONFIGURATION.md | 4 ++-- website/docs/CONFIGURATION.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 90c67d8a9..43e90721b 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -424,7 +424,7 @@ GFLOW_CLI_HISTORY_PROMPTS=redacted gflow image t2i "confidential brief" **Values:** `auto` | `headless` | `headed` **Default:** `auto`. A request the direct transport can send (a measured shape) launches Chrome **headless**, and that browser only mints the reCAPTCHA token; a surface that still needs Flow's -UI launches **headed**, except the surfaces measured headless (`video extend` on flow.google.com, +UI launches **headed**, except the surfaces that launch headless (`video extend` on flow.google.com, the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K, whose headless run is unmeasured), and image-to-image from one local `--ref` file in an existing project on an otherwise direct request), which launch headless. A run that holds any UI item launches headed for the whole run. A refusal Flow did not charge is retried once from a new headless browser process. The @@ -434,7 +434,7 @@ per-command list is [BROWSER_MODES](BROWSER_MODES.md). | Value | Measured shapes (direct HTTP) | Flow UI surfaces | |---|---|---| -| `auto` | headless | headed, except the surfaces measured headless ([BROWSER_MODES](BROWSER_MODES.md)) | +| `auto` | headless | headed, except the surfaces that launch headless ([BROWSER_MODES](BROWSER_MODES.md)) | | `headed` | headed | headed | | `headless` | headless | headless: unsupported in v0.108.0, see [#1554](https://github.com/ffroliva/gflow-cli/issues/1554) | diff --git a/website/docs/CONFIGURATION.md b/website/docs/CONFIGURATION.md index a1fa06015..9f7f3c4b9 100644 --- a/website/docs/CONFIGURATION.md +++ b/website/docs/CONFIGURATION.md @@ -424,7 +424,7 @@ GFLOW_CLI_HISTORY_PROMPTS=redacted gflow image t2i "confidential brief" **Values:** `auto` | `headless` | `headed` **Default:** `auto`. A request the direct transport can send (a measured shape) launches Chrome **headless**, and that browser only mints the reCAPTCHA token; a surface that still needs Flow's -UI launches **headed**, except the surfaces measured headless (`video extend` on flow.google.com, +UI launches **headed**, except the surfaces that launch headless (`video extend` on flow.google.com, the page fallback of `media trash` / `media restore`, the video download-menu upscales (720p, 270p, and 4K, whose headless run is unmeasured), and image-to-image from one local `--ref` file in an existing project on an otherwise direct request), which launch headless. A run that holds any UI item launches headed for the whole run. A refusal Flow did not charge is retried once from a new headless browser process. The @@ -434,7 +434,7 @@ per-command list is [BROWSER_MODES](BROWSER_MODES.md). | Value | Measured shapes (direct HTTP) | Flow UI surfaces | |---|---|---| -| `auto` | headless | headed, except the surfaces measured headless ([BROWSER_MODES](BROWSER_MODES.md)) | +| `auto` | headless | headed, except the surfaces that launch headless ([BROWSER_MODES](BROWSER_MODES.md)) | | `headed` | headed | headed | | `headless` | headless | headless: unsupported in v0.108.0, see [#1554](https://github.com/ffroliva/gflow-cli/issues/1554) |