Repository navigation
fix(errors,migrated): stop reporting two things we never observed (#803, #789) - #876
Merged
Merged
Conversation
…, #789) Both are the same failure shape: gflow asserting something no code path measured, on the exact field a user would check to find out what went wrong. #803 — AisandboxAuthError's default remediation read "SAPISID cookie missing, expired, or unreadable. Re-run `gflow auth login`". v0.74.0 fixed the two `gflow credits` sites; the other three inherited the default, so every route through `_run_with_aisandbox_retry` — createScene, commitWorkflow, createEntity, projectInitialData, upsampleImage and the rest — still said it. None of them reads SAPISID: the credential is a Bearer token minted by labs' session endpoint, and SAPISID's only job is getting that endpoint to answer at all. By the time any of these raise, SAPISID is demonstrably working. The advice was not merely wrong, it was expensive. On a profile with no browser-strategy marker a failed re-login rolls the marker back and starts the #791 loop, so the remediation could cost the user the working session they still had. Each site now says what was actually rejected: a non-JSON reply is named as an interstitial or redirect, a token-less session is named as the flow.google.com shape, and a 401 after refresh names the route that refused it. The class default no longer asserts a SAPISID failure at all. KNOWN_ISSUES records that v0.74.0 covered only the credits half. #789 — model_name_type echoed the requested --model back on flow.google.com. The ogiZ0b reply carries no model field; the 2026-09-08 wire spike enumerates the whole payload and there is none. recorder.py persists that echo as AssetRecord.model, so `gflow data` read it back as though Flow had confirmed it. With a hidden model picker (#788) the model actually selected can differ from the one requested, which makes the echo not just unverified but wrong on the one field that would reveal it. Now None on that host, typed str | None, documented in USAGE. labs.google is unchanged — there the value is Flow's own. Also here: - CI runs the five hermetic e2e files. Every Flow origin in them is served by page.route().fulfill(), so they need no account, no profile, no network and no credits — only the Chromium the test job already installs. They are the regression tests for #593, #773, #859 and #860, and because pyproject's addopts exclude `-m e2e` and no job overrode it, they ran nowhere: a regression of any of those four would have gone green. 27 tests, ~4 min, with a count guard so an empty run cannot pass as a green one. - AGENTS.md described `gflow docs` as "(list/print/search ...)", which reads as subcommands beside its neighbours; `gflow docs list` errors. Says the real shape now.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Summary
Two bugs of one shape — gflow asserting something no code path measured, on the exact field a user checks to find out what went wrong — plus the CI gap that let their neighbours' regression tests run nowhere.
#803 — auth errors blamed a cookie the route never reads
AisandboxAuthError's default remediation read "SAPISID cookie missing, expired, or unreadable. Re-rungflow auth login --profile <name>and retry."v0.74.0 corrected the two
gflow creditssites. The other three inherited the default, so every route through_run_with_aisandbox_retrystill said it —createScene,commitWorkflow,updateSceneWorkflows,getSceneWorkflows,createEntity,patchEntity,projectInitialData,batchDeleteAssets,upsampleImage, the concat/status routes.None of them reads SAPISID. The credential is a Bearer token minted by labs'
/fx/api/auth/session; SAPISID's only role is getting that endpoint to answer at all. By the time any of these three raise, SAPISID has demonstrably just worked.The advice was not merely wrong — it was expensive. On a profile with no browser-strategy marker, a failed re-login rolls the marker back and starts the #791 loop, so the remediation could cost the user the working session they still had.
Now each site says what was actually rejected:
client.py_fetch_access_tokenaccess_token_run_with_aisandbox_retry{route}— the sign-in is the one thing proven workingKNOWN_ISSUES.mdrecords that v0.74.0 covered only the credits half.#789 — the migrated host reported a model it never observed
model_name_typeechoed the requested--modelback onflow.google.com. TheogiZ0breply carries no model field:2026-09-08-migrated-image-submit-wire.mdenumerates the entire payload — media id, workflow id, seed, prompt, signed URL, dimensions, sibling workflow record — and there is none. (GEM_PIX_2in that spike is the settings-pane DOM, i.e. what was selected, not what the reply returned.)recorder.pypersists the value asAssetRecord.model, sogflow dataread the echo back as though Flow had confirmed it. And with a hidden model picker (#788) the model actually selected can differ from the one requested — which makes the echo not merely unverified but wrong on the single field that would reveal it.Now
Noneon that host, typedstr | None, documented in USAGE.labs.googleis untouched: there the value comes from Flow's ownmodelNameType.The request echo is unaffected — the envelope's top-level
"model": "NARWHAL"still reports what you asked for. What is gone is the claim that Flow agreed.CI ran zero e2e tests
Five files under
tests/e2e/are hermetic: every Flow origin is served bypage.route(...).fulfill(...), so they need no account, no profile, no network and no credits — only the Chromium thetestjob already installs for the real-DOM fixture tests.They are the regression tests for #593, #773, #859 and #860.
pyproject.toml'saddoptsexcludes-m e2eand no workflow overrode it, so they ran nowhere: a regression of any of those four fixes would have gone green. Now wired in behind the samepython-version == '3.13'condition as the Chromium install, with a count guard so an empty run cannot pass as a green one.27 tests, ~4 min locally. The other 42 e2e files genuinely need a logged-in profile and stay excluded.
Also
AGENTS.mddescribedgflow docsas(list/print/search …), which reads as subcommands beside its neighbours (gflow credits (user/list),gflow image (t2i/i2i/…)).gflow docs listerrors — the real shape is bare /<topic>/--search TERM.Verification
#789 — live, five layers, $0 (Flow's daily image quota, no credits):
pytest -m e2e_image tests/e2e/test_migrated_host_e2e.pyon a liveflow.google.comprofile → 2 passed in 86s:test_e2e_t2i_runs_on_a_moved_accountandtest_e2e_mcp_i2i_runs_on_the_migrated_host. Both surfaces, CLI and the MCP twin.gflow image t2i --jsonon that profile:nullevidence rather than an empty envelope. (My first read of this was flat rather than intoimages[]and returnedNonefor everything; that was an instrument error, not a result.)ff d8 ff e0 00 10 4a 46 49 46(JPEG/JFIF), catalog row present viagflow data media.#803 — offline only, and here is the blocker. The three raise sites need Flow to answer with a non-JSON body or a token-less session on an aisandbox route. Attempting to reach one live (
gflow character liston a migrated profile) never got there: the labs tRPC route answers 404 "Flow RPCs have been deprecated and disabled" first, so_fetch_access_tokenis not called. I could not force the condition on the profiles available here. Covered by 4 new unit tests plus the existingtest_credits_http.pysuite (78 passed); the live leg needs a profile in the state that produces it.That attempt did surface a new misleading error of the same class, filed with its capture as #875 rather than fixed here — a fix discovered ten minutes before a release gets less scrutiny than the code it patches.
Gates:
ruff check·ruff format --check· repo hygiene (1167 files) · doc links (197 files) · website PII · website mirror in sync · council memory ·pyright src(0 errors) — all green. Unit suite 1775 passed, 3 skipped.Closes #803
Closes #789
Summary by CodeRabbit
Bug Fixes
nullinstead of echoing the requested model.Documentation
Tests