Repository navigation
feat(fakes): add fault injection and scripted write_file functionCall to mock-gemini - #7
Conversation
9c9a14a to
128c794
Compare
mayawang
left a comment
There was a problem hiding this comment.
LGTM. Non-blocking: worth confirming the scripted write_file arg names (Path/Content/Overwrite) against a real agy request; the 429 uses Retry-After, while google-genai reads RetryInfo.retryDelay from error.details, so a backoff test may not hit the real path; and tool_write_path/content aren't type-checked in /_mock/config.
The merge-base changed after approval.
|
Thanks! Pushed two quick updates (sorry for resetting the approval stamp and that this comment is supposed to be sent at pr 10 instead of here):
|
mayawang
left a comment
There was a problem hiding this comment.
Thanks for confirming the arg names! Still LGTM.
The merge-base changed after approval.
128c794 to
3c29cbc
Compare
|
Rebased onto main after #6 merged, since GitHub kept auto-dismissing the approval because of the old merge-base. The code hasn't changed. Mind re-stamping when you get a chance? |
mayawang
left a comment
There was a problem hiding this comment.
Re-stamping LGTM after the rebase.
Extends
fakes/mock-geminiwith runtime fault injection and multi-turnwrite_filefunctionCallscripting for Antigravity (agy) E2E testing:FAULTenv orPOST /_mock/config):429(rate limit withRetry-After: 1),500(internal error),503(UNAVAILABLEfor retry testing),slow(delayed JSON/SSE), andtruncated_sse(streaming requests get a cut-off SSE chunk; non-streaming:generateContentgets a200JSON body cut off mid-way).write_filefunctionCall(TOOL_WRITE_PATH/TOOL_WRITE_CONTENT): Turn 1 emits awrite_filefunctionCallonly whenwrite_fileis declared intools(tool-less side requests receive plain text); Turn 2 (oncefunctionResponseis returned) replies withREPLY_TEXT.POST /_mock/config): Validates keys, fault values, andslow_delay(finite number>= 0, rejecting booleans) before acquiring the lock so invalid requests return400without partial state updates; resets onPOST /_mock/reset.fakes/mock-gemini/selftest.shto cover all fault modes, non-streaming truncated JSON, tool-less probes, config validation, and 2-turnwrite_filefunctionCall.