Stage 5 generate, user status, and housekeeping migration#11
Conversation
There was a problem hiding this comment.
3 issues found across 38 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/client/protocol/testdata/stream_generate_basic_response.txt">
<violation number="1" location="internal/client/protocol/testdata/stream_generate_basic_response.txt:2">
P2: Fix the length prefix to match the frame size; the current `310` prefix makes this response look incomplete to the stream parser.</violation>
</file>
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
| @@ -0,0 +1,3 @@ | |||
| )]}' | |||
| 310 | |||
There was a problem hiding this comment.
P2: Fix the length prefix to match the frame size; the current 310 prefix makes this response look incomplete to the stream parser.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/client/protocol/testdata/stream_generate_basic_response.txt, line 2:
<comment>Fix the length prefix to match the frame size; the current `310` prefix makes this response look incomplete to the stream parser.</comment>
<file context>
@@ -0,0 +1,3 @@
+)]}'
+310
+[["wrb.fr",null,"[null,[\"c_000000000000001\",\"r_000000000000001\",\"rcid_000000000000001\"],null,null,[[\"rcid_000000000000001\",[\"Sample assistant response.\"]]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"completion_context_000000000000001\"]"]]
</file context>
|
Followed up on cubic review:
I did not change the Verification:
|
dc92844 to
f5c4b06
Compare
|
Followed up on the latest review feedback. P1 fixes:
P2 fixes included:
Verification:
|
Summary
Verification
Notes
Summary by cubic
Adds
StreamGenerateprotocol codec and streaming transport, migrates the generate flow to a clean protocol/transport split, and fixes incremental parsing of streaming frames. Routes user status and quota through the unified RPC path and extends housekeeping RPCs with adebug housekeepingcommand.New Features
StreamGeneratecodec and media extractors ininternal/client/protocol/rpcswith fixtures/tests; extractors support new and old video/audio paths.internal/client/transportwithCallStreamGenerate; maps 429 toRateLimitError.cmd/debug housekeeping.GetUserStatusdecoder with tests; protocol fixtures added.Refactors
internal/client/generate.gowithgenerate_*; moved wire encode/decode toprotocol/rpcs.FetchUserStatusand quota calls throughCallRPC/batch, removing manual HTTP.upload.goon direct HTTP (Stage 5 out of scope).Written for commit f5c4b06. Summary will update on new commits. Review in cubic