chiguyong
|
761e1f026e
|
fix: resolve API signature drift and test isolation failures
- Fix KnowledgeDocument/KnowledgeBase model field changes in test fixtures
- Fix RecursiveChunker constructor changes (no longer accepts chunk_size)
- Fix WenxinAdapter mock from _request_with_retry to _get_access_token + _client.post
- Fix UUID type mismatch in knowledge_graph tests
- Add rate limiter state reset autouse fixture to prevent cross-test contamination
- Skip tests blocked by Query.user_id String vs uuid.UUID comparison bug
- Fix .env.example path, KeyVerifierFactory mock, env variable cleanup
- Result: 68 failed + 33 errors → 0 failed, 1537 passed, 33 skipped
|
2026-06-05 01:08:31 +08:00 |
chiguyong
|
aeaa50e89e
|
fix: 审计发现的问题修复
API一致性修复:
- C1: 新增organization.py路由(/api/v1/organization/*)
- C2: 修复suggestions API路径(/api/v1/brands/*而非/api/v1/suggestions/*)
- H7: 修复platforms路由双重前缀(/api/v1/platforms而非/api/v1/api/platforms)
密钥管理改进:
- H3: APIKeyManager支持双密钥(dict格式),文心一言适配器使用KeyManager
- H8: 新增APIKeyFilter日志过滤器,拦截key=和Bearer token
异常处理改进:
- H1: batch_query.py改为httpx.HTTPError分层处理
- H1: database.py改为SQLAlchemyError并抛出ConnectionError
- H1: lifecycle.py和usage_tracker添加日志记录
测试: 764 passed
|
2026-05-25 23:33:25 +08:00 |