Repository navigation
v0.2.1 聚焦库模式(library mode)可用性:将 OpenAPI schema 从 http/openapi 特性中抽为独立的 schema 特性,把依赖 axum / prometheus 的代码统一门控在 http 特性之后,并修复 schema 特性单独启用时的编译失败与测试不稳定问题。
新增
- 新增独立
schema特性(依赖 utoipa):库使用方无需引入 axum / prometheus 即可导出 OpenAPI 类型;EmbedRequest、EmbedResponse、OpenAIEmbedRequest、SimilarityMetric、AggregationMode、RateLimitStatus等领域类型的ToSchemaderive 改为按特性条件启用(9d4005c21)
修复
- schema 特性单独启用时编译失败:显式添加 utoipa
macros特性(crate::utoipa::Number被macros门控)(2610ced69) - schema-only 模式下遗漏的 http 依赖门控:
error.rs的sanitize_error_message及相关常量、3 个边界测试,lib.rs测试模块的 http-only imports,module_registry/tests.rs中PrometheusCollectorModule相关测试,全部补齐#[cfg(feature = "http")](2610ced69) - bin target 在 schema-only 模式下编译失败:为
[[bin]]添加required-features = ["http"](2610ced69) - config 测试环境变量竞争:
test_confers_load_from_minimal_toml与test_confers_toml_overrides_defaults补齐ENV_LOCK并清理环境变量,消除VECBOOST_JWT_SECRET并行竞争失败(2610ced69) - worker 测试 flaky:
test_worker_loop_exits_immediately_when_not_running的 TOCTOU 竞争修复,改为等待is_alive == false && current_workers == 0(2610ced69)
变更
- 依赖 axum 的代码统一门控到
http特性:VecboostError::IntoResponse、metrics endpoint 与 prometheus exporter、PrometheusCollectorModule、pipeline::handler及依赖 axum 类型的测试代码(55ccc7cfa)
维护
- 同步更新 CHANGELOG.md 与 .gitignore(2610ced69)
Full Changelog: v0.2.0...v0.2.1