Skip to content

Keep request timeout policy in the backend adapter - #3765

Merged
adamtheturtle merged 2 commits into
mainfrom
shared-request-timeout-policy-20261014
Oct 14, 2026
Merged

adamtheturtle merged 2 commits into
mainfrom
shared-request-timeout-policy-20261014

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Shared prepared requests currently turn timeouts into skips when the URL starts with a canonical Vuforia host. A consumer using that URL therefore inherits real-service policy, while the real adapter using a custom URL does not.

Add a typed, scoped timeout handler. The request sender uses a small context manager which propagates the original timeout by default. The real VWS and Model Target adapters install the existing skip behavior for their setup context. Nested contexts restore the previous handler, including when a handler raises. This removes the timeout branch's coverage exemption.

The new tests raise timeouts directly inside the same context used by the sender. They do not replace request methods, credential readers, or cleanup functions. The public real Model Target setup fixture verifies skip-policy installation and removal without account access or network calls.

Part of #3738 and #3737. Follows merged #3764; this does not complete the remaining shared-suite extraction work.

Validation:

  • Full local suite excluding real-service and Docker-build cases: 2,014 passed, 839 skipped.
  • Focused timeout, Model Target response policy, and retry tests: 36 passed. The 21 timeout cases cover canonical/custom URLs, base/connect/read timeouts, real-adapter skip behavior, original exception identity, and nested policy cleanup after exceptions.
  • All 2,832 existing collected cases and IDs preserved; 21 cases added.
  • Independent consumer smoke: 4 passed, with native adapter, real-credential, settings, and Flask imports blocked; no monkeypatching.
  • New policy and tests and changed shared sender fully covered locally.
  • Pre-commit, pre-push checks (including partition and all type checkers), changed-file Pylint, and diff checks passed.

Docker and live-service validation remain with hosted CI.

This branch was successfully deployed

2 active deployments
development — 303c3915 Deployed Oct 14, 2026 by adamtheturtle via pages #2417
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