Summary
Two regressions were found in the typed-cache / async REST work:
- Cache compatibility shim preserved the import name but not old behavior. Existing callers using Cache.meta(...) or Cache(api).load('/datarefs') would fail because Cache.meta raised NotImplementedError and load no longer accepted a path argument.
- AsyncXPRestAPI.capabilities() built the v1 fallback probe from rest_url. When api_version was already v1 or v2, appending /v1/datarefs/count could produce a duplicated version path such as /api/v2/v1/datarefs/count, causing capabilities to stay empty for v1-only APIs.
Expected behavior
- Cache.meta(...) keeps the old dataref/command heuristic for compatibility.
- Cache(api).load('/datarefs') and Cache(api).load('/commands') continue to work for existing callers.
- Async capabilities fallback probes the unversioned API root: /api/v1/datarefs/count.
Fix status
A local fix has been implemented with regression tests:
- TestCacheCompatibility covers Cache.meta(...) and Cache(api).load(path).
- TestAsyncXPRestAPICapabilities covers the v1 fallback URL.
Verification
- uv run python -m unittest discover -v
- uv run ruff check xpwebapi tests
- uv run ruff format --check xpwebapi tests
Summary
Two regressions were found in the typed-cache / async REST work:
Expected behavior
Fix status
A local fix has been implemented with regression tests:
Verification