fastvideo/tests/contract/ guards against drift in the two public-facing adapter shapes that PR 8 locks down: * test_dynamo_shape.py: mock Dynamo-style handler implementing the adapter template from docs/design/server_contracts/dynamo.md. It imports only fastvideo + fastvideo.api, translates a Dynamo-shape NvCreateVideoRequest dict into a typed GenerationRequest, runs it through an async generator that matches endpoint.serve_endpoint(handler.generate, ...), and round-trips the continuation-state envelope. A source scan asserts the adapter function body touches no private FastVideo module. * test_dreamverse_shape.py: the flat init-time kwarg bag the internal gpu_pool.py passes today lands entirely on typed GeneratorConfig fields (no leakage into pipeline.experimental) after PR 6's typed replacement work. Per-request Dreamverse shape round-trips through legacy_generate_call_to_request -> normalize_generation_request; output.return_state (PR 7) stays wired through. Failures in this suite appear at FastVideo CI — before the Dynamo-side integration or private Dreamverse adapter see the drift. Co-authored-by: Junda (David) Su <90978028+Davids048@users.noreply.github.com> Co-authored-by: Matthew Noto <99706358+RandNMR73@users.noreply.github.com> Co-authored-by: XOR-op <17672363+XOR-op@users.noreply.github.com> Co-authored-by: Zhang Peiyuan <42993249+jzhang38@users.noreply.github.com>
10 lines
429 B
Python
10 lines
429 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
"""Contract tests guarding FastVideo's public API against drift.
|
|
|
|
These tests run against the public surface only (`fastvideo.VideoGenerator`,
|
|
`fastvideo.api.*`) — never via private helpers. They fail at FastVideo CI
|
|
if a change breaks the shape the Dynamo backend package and the private
|
|
Dreamverse adapter depend on, so drift is caught here before it reaches
|
|
downstream integrators.
|
|
"""
|