Harden Flow generation and restore project lifecycle - #59
Merged
Merged
Conversation
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
This updates the current
flow.google.combatchexecute path in four related areas:jHPbkeRPC instead of requiring one permanently pinnedFLOW_PROJECT_ID/api/flow/*calls that omitproject_id, while keeping explicit project reuse availablePUBLIC_ERROR_UNUSUAL_ACTIVITY: do not auto-retry it, serialize CAPTCHA-bearing submits, enforce a minimum launch interval, and open a local cooldown circuit breaker when Google returns the block[null, null, 1, 1], current text-to-video 360p model/option slots, and video client descriptor type2It also exposes generation guard/session-project state in
/api/flow/statusand logs an optionalX-FlowKit-Callerlabel for generation endpoints without logging prompts, media IDs, or credentials.Why
PUBLIC_ERROR_UNUSUAL_ACTIVITYis a Google risk/reCAPTCHA rejection, not merely a replayed token. Retrying it as a generic CAPTCHA failure can amplify the condition. During live validation, the same server/account/browser could submit successfully through the Flow UI while the older FlowKit first-frame payload was rejected. Capturing the accepted UI request showed the stale default crop; after matching the current UI shape, a direct FlowKiteb1hJffirst-frame submit was accepted successfully.The current Flow UI also still supports creating projects through the current
jHPbkebatchexecute RPC, so unrelated work no longer needs to accumulate in one permanently pinned project.Compatibility
project_id/flow_project_idreuse still worksFLOW_PROJECT_IDfallback remains for older internal callers_360pin the model key continue to work;resolutioncan also be supplied explicitlyTests
373 passedon this upstream-based branch after the live-capture payload update.