Repository navigation
fix(flow): parse rpc error envelopes and workflow history - #58
Open
google-labs-stitch[bot] wants to merge 3 commits into
Conversation
- Match flow.google.com and parse HTTP 200 batchexecute error frames - Add LcEY2c, SPrCad, sAVZzc, jeNy9c, and maseQ to generation RPC IDs - Preserve primary clip URLs when workflow history[1..] items fail - Track failed history items so video extend aborts on the next poll
- Keep primary media status and error separate from history failures - Compare watched and scene clip failures against baseline snapshots - Match generation batchexecute rpcids and wrb.fr frames by exact ID - Decode JSPB field offsets and google.rpc.Status arrays from wrb.fr - Read CDP response bodies only for active generation POST responses - Key failed history markers by unique ID or anonymous index
- Keep createdIso and trim format reads from build 20261129.06 - Resolve scene clips and history from verified build formats
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
Supersedes #38 on current
main(v2.4.0, Google Flow buildboq_labs-ai-sandbox-frontend_20261129.06_p0).On current
main,src/cdp.rsfetches response bodies on every HTTP>= 400response from Flow hosts and skips HTTP 200batchexecutewrb.frandererror envelopes, whilets/read_store_snapshot.tsignorestile.history(where_.BNrecords failed edit variants while keepingprimaryMediaIdandMbunchanged) and reads onlyhist[0]on sceneXgmaps while letting failed scene variants overwriteexisting.media_status.This pull request scopes CDP response body reads to active generation RPCs, parses
batchexecuteJSPB error frames, and tracks workflow history failures acrosstile.historyand sceneXghistory without overriding primarymedia_statusorurl.Changes
batchexecuteJSPB error envelopes (src/cdp.rs,src/engine.rs,src/generation.rs):flow.google.comfromFLOW_URLinis_flow_api_hostalongsidelabs.googleandaisandbox-pa.googleapis.com.Network.getResponseBodyonly whennetwork_tx.receiver_count() > 0and the response is a Flow-hostPOSTthat matches(status >= 400 && is_generation_rpc_url(url)) || (status == 200 && has_generation_batchexecute_rpc(url)).BATCH_GENERATION_RPC_IDS, addingLcEY2c,SPrCad,sAVZzc,jeNy9c, andmaseQ) as exact comma/%2C-separated tokens in/batchexecuterpcidsquery parameters (has_generation_batchexecute_rpc) and filterwrb.frframes by exactframe[1]RPC ID (is_generation_rpc_id) so co-batched non-generation RPC errors never fail a generation job.wrb.fr([2, 9, 10]payload oneof, extension-pivot object indexing, andgoogle.rpc.Statusarray on field 5) anderbatch error frames (fields 2, 4, 9, 10), ignoring trailingerframes once a generationwrb.frdata frame resolves in the same envelope.20261129.06_p0(ts/types.ts,ts/scene_tiles.ts,ts/read_store_snapshot.ts,src/assets.rs):clipsandhistoryfromVERIFIED_BUILDS(PcandXgin20261129.06_p0,UcandCgin20261120.00_p0,Tcandtgin20261117.10_p0, plus legacyOcandYf), and preservecreatedIso(Ybdates withouthcURL leakage) andsnapshotFormat()?.trim(Kc/Ocandcj/Si/uc).media_statusandmedia_errorbound strictly to the tile or clip primary media (primaryStatus || nullandprimaryError) so an olderhistory[1..]failure never overrides a"pending"or"success"primary media item, while keepingprimary_readyand cold-cacheas29sURL lookups intact.failed_historymarkers uniquely asid:<cleanId>(orid:<cleanId>#<occ>) andanon:<index>(<key>|<status>|<error>) and deduplicate by<key>inmergeFailedHistorywhile upgrading empty error text.src/scenes.rs,src/generation.rs,src/characters.rs):failed_history,media_error,primary_media_id, andmedia_status(FlowAsset::new_failure,watch_baseline, andclip_entered_error) so pending edits after an older failed variant keep polling normally while newly appended failures stop on the next poll tick.Verification
cargo xtask ci,cargo xtask collect-licenses,cargo deny --locked --workspace check, andflow-mcp --headless doctor --json(Verified Google Flow build (boq_labs-ai-sandbox-frontend_20261129.06_p0)).BATCH_GENERATION_RPC_IDS,eq.qg = "wrb.fr"(gq = [2, 9, 10], field 5google.rpc.Status),sC.qg = "er",tile.history, and scenePc/Xgdirectly against the liveboq_labs-ai-sandbox-frontend_20261129.06_p0bundle.boq_labs-ai-sandbox-frontend_20261129.06_p0(LQstore,Mb/hc/Yc/Of/Ybmedia fields,Kc/Oc/cj/Si/uctrim bounds, andPc/Xgscene history) that pending edits with older failed history keepmedia_status: "pending", ready primaries preserve URLs andYbtimestamps, empty-ID failures deduplicate acrosstile.historyandscene.Xg, and new failures surface exact upstream error messages.