Commit 210aa0d
fix: Resolve 108 unit test failures and improve code quality (v5.2.1)
This release achieves 100% unit test pass rate (5,814 passed, 0 failed)
through systematic bug fixes and code quality improvements.
## Critical Fixes
- Fix security audit Phase 3 missing `import re` statement
- Fix code review workflow undefined `security_score` variable
- Fix verification script dataclass field checking (use `__dataclass_fields__`)
## Architecture Updates
- Remove deprecated `TTLStrategy.COORDINATION` enum (v5.0) from 8 files
- Update `ModelProvider.to_unified()` for v5.0 Claude-native architecture
- Replace coordination TTL with `TTLStrategy.SESSION` (30 min)
## Test Fixes (108 → 0 failures)
- Fix telemetry Redis mocking in 65+ tests:
- Agent coordination, tracking, approval gates, events, feedback loop
- Update `_redis` → `_client` in mock backends
- Fix stream key prefixes and method names
- Update test generator API in 10 tests:
- `wizard_id` → `workflow_id`
- `wizard_module/class` → `workflow_module/class`
- Fix memory tests:
- Update `_get_all_patterns` → `_iter_all_patterns`
- Fix atomic operations cache invalidation
- Update TTL strategy test values
- Fix security tests:
- Add markdown list detection in scanner
- Fix AST scanner to check only docstring-capable nodes
- Update SQL parameterization test patterns
- Fix analytics/CLI tests:
- Add missing `heapq` import to analytics.py
- Fix tier1 CLI integration with analytics
- Fix misc tests:
- Token estimator updated to match tiktoken behavior
- Core EmpathyOS test updated for removed enum
## Code Cleanup
- Remove 6 duplicate files:
- 5 duplicate telemetry test files
- 1 duplicate source file (types 2.py)
## Test Statistics
- Total: 5,907 tests
- Passed: 5,814 (98.4%)
- Skipped: 90 (1.5%) - Integration tests requiring API/Redis
- XFailed: 3 (0.1%) - Expected failures
- Failed: 0 (0.0%) ✅
## Files Modified
- 26 source/test files updated
- 2 project files updated (CHANGELOG.md, pyproject.toml)
- Version bumped: 5.2.0 → 5.2.1
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 6270066 commit 210aa0d
57 files changed
Lines changed: 1533 additions & 4351 deletions
File tree
- patterns
- debugging
- scripts
- src/empathy_os
- memory
- mixins
- models/telemetry
- workflows
- document_gen
- tests
- behavioral/generated
- batch100
- batch101
- batch12
- batch13
- batch997
- unit
- memory
- models
- security
- telemetry
- test_generator
- workflows
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
10 | 74 | | |
11 | 75 | | |
12 | 76 | | |
| |||
0 commit comments