Repository navigation
test(py): run shared reflection_api and flow_server conformance specs - #71
Merged
Merged
Conversation
Member
|
/gemini review |
huangjeff5
force-pushed
the
test/py-cross-sdk-conformance-specs
branch
from
November 10, 2026 22:56
16671e0 to
2e22152
Compare
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.
Python CI now runs two shared conformance specs from
genkit-ai/genkitthat only JS and Go ran before:reflection_api.yaml(the Dev UI's/api/runActionendpoint) andflow_server_tests.yaml(streaming a flow over HTTP withgenkit-fastapi'sserve_flow). Without them, a change to Python's reflection responses or SSE stream framing could drift from the other SDKs and nobody would notice until the Dev UI or a JS client broke. Test-only; no library code changes.Changes
GENKIT_SPECS_DIR, then a nearbygenkitcheckout, then downloads it from upstreammaininto a temp cache (partial downloads are cleaned up). CI prefetches both files next toagent.yamlandgenerate.yaml, so test runs make no network calls.go_compareportscompare1fromgo/tests/api_test.go. Every key in the spec must match, extra keys in the response are ignored, lists must be the same length, and the keys the JS runner skips (inputSchema,outputSchema,description,telemetry,latencyMs,usage) are skipped here too. In PythonTrue == 1, so booleans are compared by exact type.go_marshaldumps the request the same way and drops unset fields, so Python's default emptyoutputconfig doesn't add"output":{}where Go and JS omit it.parse_flow_streamfollows the JSstreamFlowclient: each frame isdata: <json>plus a blank line,messageframes are chunks,resultends the stream, and anerrorframe or a stream that ends early fails the test. Each chunk is also checked byte-for-byte against compactJSON.stringifyoutput.Breaking changes
None.
Notes for other SDK owners
Every upstream case passes with no
xfail. Two upstream details, no Python wire change:GenerationUsagetypes character and token counts asfloat("inputCharacters": 5.0). It sits underusage, which the spec runners skip.tests/test_js_app'sstreamyreturns"done: 5, ..."(with a colon).flow_server_tests.yaml, Go'stest_app, and this harness return"done 5, ...".