Commit Graph

6 Commits

Author SHA1 Message Date
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 7bbc977175 fix: add autouse fixture to clear dependency_overrides after each test 2026-06-04 22:20:28 +08:00
chiguyong 680d8fc9e1 chore: unify test dirs, remove debug scripts, add content/diagnosis/attribution fixtures 2026-06-02 21:15:15 +08:00
chiguyong b41da42d74 feat(geo): U1-U9 monetization closed loop implementation
U1: GEO diagnosis auto data collection (DataCollectorService + 11 tests)
U2: Free GEO health score public page (HealthScoreAPI + 7 tests)
U3: Onboarding redesign with conversion layer (Step0 + UpgradePrompt + 14 tests)
U4: Real payment integration (WeChat/Alipay gateway + PaymentOrder + 12 tests)
U5: AI content generation & distribution (Publishers + PublishEngine + 11 tests)
U6: Attribution system & ROI reports (AttributionEngine + ROICalculator + 12 tests)
U7: Email integration & Dashboard monetization UI (EmailScheduler + templates + 22 tests)
U8: Integration tests & shared fixtures (monetization flow + fixture consolidation + 12 tests)
U9: E2E smoke tests (HealthScorePage + acquisition/core flow + 4 E2E cases)

Total: 101 new backend tests passing, 4 E2E test cases
All third-party integrations use mock mode by default with config center management
2026-06-01 07:39:05 +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
chiguyong 84ed5bf31a feat: GEO平台P0-P1核心功能重构 2026-05-23 09:34:58 +08:00