Skip to content

Declare backend capabilities for the shared API tests - #3758

Merged
adamtheturtle merged 1 commit into
mainfrom
shared-backend-capabilities-20261014
Oct 14, 2026
Merged

adamtheturtle merged 1 commit into
mainfrom
shared-backend-capabilities-20261014

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Shared ordering, Content-Length, and rate-limit tests still choose behavior by concrete backend identity. Replace all six remaining backend-name conditions in shared assertions with a typed BackendCapabilities fixture.

The adapter declares deterministic target/duplicate order, deterministic query order, prompt oversized-body responses, and a rolling rate-limit window. Native defaults preserve the existing behavior: both mocks enable all four; real Vuforia enables none. Consumers can override each capability independently. Skip messages describe unsupported behavior, and the original request/assertion bodies are preserved.

Part of #3738 and #3737. After this change, comparisons against concrete backend enum members are confined to the adapter module.

Validation:

  • AST comparison verifies that every original test body and assertion is preserved apart from capability parameters, conditions, and skip messages.
  • Python 3.15: 76 selected cases pass with 56 expected skips, using synthetic credentials and no retries.
  • A separate consumer reuses the same assertions and both existing mock adapters at custom HTTP URLs. Supported and restricted capability configurations together pass 134 cases with 130 expected skips. This verifies that capability declarations control ordering and oversized-body eligibility and the rate-limit window assertion independently of backend names.
  • A local probe confirms all four real-service defaults are false without running real-service setup or making live requests.
  • All affected shared test modules and the capability type have 100% local statement and branch coverage.
  • Pre-commit and pre-push checks pass, including CI partition validation, Mypy, Pyright, public type completeness, Ty, Pyrefly, and check-manifest. Pylint passes on all seven changed files; git diff --check passes.

Source package behavior, workflows, dependencies, real-service restrictions, and coverage gates are preserved. Hosted full-suite validation will run on this PR.

This branch was successfully deployed

2 active deployments
development — d757a023 Deployed Oct 13, 2026 by adamtheturtle via pages #2400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant