mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
2bf10435d5
* fix(python-client): add the missing async twins to the convenience wrapper (#4221) The class docstring promises an `a`-prefixed variant for every convenience method, but 27 of them had none. That is not just inconvenient: the sync methods go through `_run_async` -> `loop.run_until_complete`, which raises `RuntimeError: This event loop is already running` inside a live loop. So mental models, knowledge pages, directives and bank config were unreachable through the wrapper from exactly the contexts the docstring points at (FastAPI, LangGraph, CrewAI), and callers had to drop to the generated SDK for a whole feature area. Each of the 27 now has its implementation on `a<name>` with the sync method forwarding to it via `_run_async`, so there is one body per operation rather than two that can drift. `tests/test_async_sync_parity.py` guards the family: every public convenience method must have an async twin, the twins must actually be sync/async, and their signatures must match argument for argument (a twin that quietly drops a parameter is the #2975/#3042 failure mode). Plus the issue's repro as a regression test — the async twin called from inside a running event loop. * fix(dev): read the bank-config updates dict from aupdate_bank_config The client-coverage check anchored on the sync update_bank_config to find the enumerated updates dict. That body now lives on the async twin, with the sync method forwarding to it, so the check saw a forwarder and reported all 48 fields as accepted-but-never-forwarded.