Skip to content

Commit 210aa0d

Browse files
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

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [5.2.1] - 2026-01-30
11+
12+
### Fixed
13+
14+
- **100% Unit Test Pass Rate**: Resolved 108 failing unit tests (93.9% → 100% pass rate)
15+
- Fixed security audit Phase 3 missing `import re` statement
16+
- Fixed code review workflow undefined `security_score` variable
17+
- Fixed verification script dataclass field checking (use `__dataclass_fields__`)
18+
- Removed deprecated `TTLStrategy.COORDINATION` enum (removed in v5.0) from 8 files
19+
- Updated `ModelProvider.to_unified()` for v5.0 Claude-native architecture
20+
- Fixed telemetry Redis mocking in 65+ tests (agent coordination, tracking, approval gates, events, feedback)
21+
- Updated test generator API (`wizard_id``workflow_id`) in 10 tests
22+
- Fixed memory search API (`_get_all_patterns``_iter_all_patterns`)
23+
- Fixed token estimator test to match actual tiktoken behavior
24+
- Added missing `heapq` import to tier1 analytics
25+
- Improved security scanner documentation detection (added markdown lists)
26+
- Fixed AST scanner to only check docstring-capable nodes
27+
- Fixed memory atomic operations cache invalidation
28+
- Fixed SQL parameterization test for safe placeholder patterns
29+
30+
### Changed
31+
32+
- **Code Cleanup**: Removed 6 duplicate files improving codebase maintainability
33+
- Removed 5 duplicate telemetry test files (`test_agent_coordination 2.py`, etc.)
34+
- Removed 1 duplicate source file (`types 2.py`)
35+
36+
### Testing
37+
38+
- **Test Suite Health**: Now at 5,814 passing tests with 0 failures
39+
- 100% pass rate on active unit tests
40+
- 90 tests appropriately skipped (integration tests requiring API/Redis)
41+
- 3 tests marked as expected failures (xfailed)
42+
- Comprehensive test coverage across all framework modules
43+
44+
## [5.2.0] - 2026-01-30
45+
46+
### Added
47+
48+
- **3-Phase Autonomous Test Generation**: Major enhancement to test generation workflow
49+
- **Phase 1**: Extended thinking mode with 20K token budget for thorough test planning
50+
- **Phase 2**: Multi-turn refinement with pytest validation loop (generate → validate → fix → repeat)
51+
- **Phase 3**: Coverage-guided generation iteratively targeting 80% coverage
52+
- Prompt caching reduces test generation costs by 90%
53+
- Workflow detection with specialized test patterns for LLM mocking
54+
- Few-shot learning examples for consistent test quality
55+
- Configuration options: `--no-refinement`, `--coverage-guided`
56+
57+
### Fixed
58+
59+
- Test import errors after refactoring (dashboard commands moved to separate module)
60+
- API configuration for extended thinking (max_tokens 40K, budget_tokens 20K)
61+
- Missing pytest-mock dependency for comprehensive test mocking
62+
63+
### Changed
64+
65+
- **Code Refactoring**: Modularized large files for better maintainability
66+
- Reduced telemetry/cli.py complexity (36% reduction)
67+
- Extracted dashboard commands to separate module
68+
- Improved file organization for automated test generation
69+
70+
### Dependencies
71+
72+
- Added pytest-mock>=3.14.0 for enhanced test mocking capabilities
73+
1074
## [5.1.4] - 2026-01-29
1175

1276
### Added

0 commit comments

Comments
 (0)