test(api): install rustls CryptoProvider in setup_app#6
Conversation
Fork-overlay for our forgejo runner — not relevant to upstream since they use GitHub Actions. Builds into /dev/shm on kbuild (24G tmpfs), rust-cache pinned to v2.7.7 for node20 act_runner compatibility, scoped tests to store:: to avoid pre-existing failures in api/space tests. Co-Authored-By: Claude Opus 4.7 <[email protected]>
rustls 0.23 requires a CryptoProvider to be installed at process startup before any TLS handshake. main() handles this with `rustls::crypto::ring::default_provider().install_default()`, but tests bypass main(), so any test reaching object_store via LanceStore::new fails with 'no process-level CryptoProvider available'. Add a Once-guarded install_crypto_provider() helper in the api tests module and call it at the top of setup_app(). Once::call_once handles the constraint that install_default may be called at most once per process (any subsequent attempts return Err). Affected: ~20 tests in omem-server/src/api/mod.rs that all flow through setup_app(). store:: tests aren't affected (they don't go through the S3/object_store code path). Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
The failing check is A few ways to handle:
Whichever you prefer. Otherwise standing by to address any actual review feedback on the test fix itself. |
- test(api): install rustls CryptoProvider in setup_app (PR #6) Fixes ~20 api test failures from missing TLS provider - fix(retrieve): replace min-max RRF normalization with scale-and-clamp (PR #9) Preserves absolute quality signal; weak matches no longer inflate to 1.0 RRF_SCALE=61 so ideal dual-leg rank-1 maps to ~1.0. Closes #7 - feat(api): expose memory_type on create and update (PR #10) POST /v1/memories accepts memory_type (pinned|insight|session) PUT /v1/memories/:id can change memory_type Default remains 'pinned' for backwards compat Co-authored-by: doctatortot <[email protected]>
|
Applied in We took the This unblocked the api tests — they now pass (except 5 pre-existing space membership issues unrelated to your change). Also ran |
|
BTW — we also tracked down the 5 space-membership test failures you flagged as pre-existing. Root cause was not a LanceDB timing issue but a URL encoding bug in the tests: space IDs have the format Fix: use All 379 tests pass now, 0 failures. Commit: |
rustls 0.23 requires a CryptoProvider to be installed at process startup before any TLS handshake.
main()does this; tests bypassmain(), so any test reaching object_store viaLanceStore::newfails withno process-level CryptoProvider available.Add a
Once-guardedinstall_crypto_provider()helper in the api tests module and call it at the top ofsetup_app().Once::call_oncehandles the constraint thatinstall_defaultmay be called at most once per process (any subsequent attempts returnErr).I hit this while working on #4 and worked around it by scoping CI to
store::only. This unblocks the ~20 api tests so future test additions don't have to dodge the same hole.No production behavior change — tests only.