test(v2): live contract tests for all 5 client.v2 endpoints#109
Open
yzld2002 wants to merge 2 commits into
Open
test(v2): live contract tests for all 5 client.v2 endpoints#109yzld2002 wants to merge 2 commits into
yzld2002 wants to merge 2 commits into
Conversation
Add tests/contract/test_v2_smoke.py covering files.upload, extract (sync), extract_jobs (create+wait), parse (sync), and parse_jobs (create+wait) against live staging, mirroring test_v1_smoke.py conventions.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds live staging contract coverage for all five synchronous and job-based V2 client surfaces.
Changes:
- Adds five V2 contract smoke tests.
- Adds a PDF fixture for parse tests.
- Uses bounded polling and skips when staging credentials are unavailable.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/contract/test_v2_smoke.py |
Exercises V2 upload, extract, and parse APIs. |
tests/contract/sample.pdf |
Provides parse-test input. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…review) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Adds live contract tests for all 5
client.v2endpoints —files.upload,extract(sync),extract_jobs(create+wait),parse(sync),parse_jobs(create+wait) — intests/contract/test_v2_smoke.py(markercontract), plus a small PDF fixture (tests/contract/sample.pdf) for the parse checks.How they run
pr-gates.ymlcontract-testsjob (rye run pytest tests/contract -m contract -n 0) — no workflow change. That job is scoped tospec-sync/*PRs and skips cleanly withoutLANDINGAI_ADE_STAGING_APIKEY(forks/local), so ordinary PRs (like this one) are not gated on live staging.environment="staging"→ V2 routes toapi.ade.staging.landing.ai. Assertions are structural (types/shape/JobStatus.COMPLETED), not exact-value, since it's a live gateway.wait()calls are bounded (timeout=300)../scripts/lintclean (ruff + pyright-strict + mypy).As of 2026-07-12, all
*.staging.landing.aihosts return404on every path (including theopenapi.jsonendpoints that served200on 2026-07-08) — an aide/infra-side change, not a test defect. The pre-existingtest_v1_smoke.pyandexamples/v2_smoke_test.pyfail identically, confirming it's environment-level. The same V2 code passed 5/5 live against staging on 2026-07-08, so these tests are correct by construction; a fresh green run is pending staging recovery. (Separately noted: prod V2 is now live —api.ade.landing.ai/v2/parse→ 401, prod specaide.landing.ai/openapi.json→ 200.)Related: #95 (V2 SDK), the spec-sync
contract-testsjob inpr-gates.yml.🤖 Generated with Claude Code