@aaswe/codebase-ai
Version:
AI-Assisted Software Engineering (AASWE) - Rich codebase context for IDE LLMs
210 lines (171 loc) • 12.6 kB
Markdown
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.4] - 2025-08-25
### 🚀 CRITICAL BUG FIX - Comprehensive TTL Aggregation + Automatic Memory Scaling
### Major TTL System Fixes
- **TTL Output Directory Aggregation**: Fixed critical `--output` parameter bug preventing TTL file aggregation
- **Root Cause**: Phase 3 of AutoAnalysisWorkflow was being skipped entirely with "Skipping enhanced TTL generation" comment
- **Fix**: Replaced skipped Phase 3 with active [`aggregateTTLFilesToOutputDirectory`](src/services/project-analysis/AutoAnalysisWorkflow.ts:1408-1530) method
- **Impact**: TTL files now properly aggregate to specified output directory instead of staying scattered in source directories
- **Comprehensive Module Analysis**: Fixed TTL files containing incomplete module data
- **Root Cause**: TTL aggregation was copying existing single-file TTL files instead of creating comprehensive module analysis
- **Before Fix**: Each TTL file contained analysis of only 1 source file (e.g., 1 class instead of 3 classes in a module)
- **After Fix**: Each TTL file contains analysis from ALL source files in the module directory
- **Technical Solution**: Rewrote [`createModuleAnalysis`](src/services/project-analysis/AutoAnalysisWorkflow.ts:763-901) method to combine `file.analysisResult` from ALL files
### Revolutionary Automatic Memory Scaling
- **Zero-Configuration Neo4j Memory Optimization**: System now automatically detects codebase size and configures Neo4j memory without any user intervention
- **Automatic Detection**: [`MemoryScalingService`](src/services/infrastructure/MemoryScalingService.ts) analyzes project file count across 15+ programming languages
- **Smart Configuration**: Dynamically sets `NEO4J_HEAP_SIZE` and `NEO4J_PAGECACHE_SIZE` based on project category:
- **Micro Projects** (< 500 files): 1g heap / 512m cache
- **Small Projects** (< 2K files): 2g heap / 1g cache
- **Medium Projects** (< 10K files): 4g heap / 2g cache
- **Large Projects** (< 50K files): 8g heap / 4g cache
- **Enterprise** (< 100K files): 12g heap / 6g cache
- **Massive Codebases** (100K+ files): 16g heap / 8g cache
- **System Validation**: Automatically checks available system memory and provides upgrade recommendations
- **Integration**: Seamlessly integrated into [`full-start`](src/cli/index.ts:266-287) command as Phase 0 before container startup
### Enhanced User Experience & Progress Tracking
- **Real-Time Progress Indicators**: Added visual progress tracking during long-running analysis operations
- **Progress Updates**: Shows elapsed time and file count every 10 seconds (e.g., "⏳ Analysis in progress... (40s elapsed, processing 184 files)")
- **User Feedback**: Clear visual confirmation that system is working during multi-minute analysis operations
- **Smart Thresholds**: Progress indicators only appear for codebases with 50+ files to avoid spam
- **Comprehensive File Filtering**: Enhanced ignore patterns filter out 80+ types of irrelevant files
- **Multi-Language Support**: Covers 15+ programming languages and frameworks
- **Build Artifacts**: Filters node_modules, dist, build, target, bin, obj, vendor, venv, __pycache__, coverage, logs
- **IDE Files**: Excludes .vscode, .idea, .vs, swap files, OS files (.DS_Store, Thumbs.db)
- **Version Control**: Ignores .git, .svn, .hg directories and associated files
- **Language-Specific**: Intelligent filtering for Java (.class, .jar), Python (.pyc, .pyo), C++ (.o, .so), etc.
- **Improved File Discovery**: Enhanced from 181 to 184 files detected with better pattern matching
### Augmented Code Context Engine Validation
- **Successfully Tested**: Revolutionary three-layer intelligence system fully operational
- **Layer 1**: 19 comprehensive TTL knowledge files aggregated correctly (keycloak-config-cli validation)
- **Layer 2**: Neo4j graph database processed 184 Java files with graceful memory management
- **Layer 3**: Complete source code indexing serving 200+ files via MCP protocol
- **Production Resilience**: System demonstrates graceful fallback from Neo4j to TTL-based analysis when memory limits are reached
- **Real-World Testing**: Validated with 5-minute analysis run processing 184 files
- **Error Recovery**: Graceful handling of Neo4j transaction limits with continued TTL generation
- **System Monitoring**: Phase 0 memory configuration with 62GB system validation and 1g/512m Neo4j allocation
---
## [1.1.3] - 2025-08-25
### 🔄 Critical Full-Start Workflow Fix + Auto-Analysis
### Major Workflow Improvements
- **Fixed Full-Start Command**: Completely redesigned `full-start` workflow to solve critical initialization order issues
- **Before**: MCP server started immediately → `TTL Files: 0 loaded` → Analysis ran separately
- **After**: 4-phase workflow ensures proper initialization order and TTL file loading
---
## [1.1.2] - 2025-08-22
### Critical TTL Directory Isolation Fix + Visual Documentation
### Critical Fixes
- **TTL Directory Restriction Bug**: Fixed critical issue causing MCP server to load data from multiple projects simultaneously
- **Root Cause**: TTLContextLoader used global glob patterns (`**/*.module-knowledge.ttl`) that searched entire filesystem
- **Impact**: Before fix: 82 TTL files loaded (41 AIDe + 41 target project), After fix: 41 TTL files (target project only)
- **Technical Solution**: Updated `loadAllTTLFiles()` and `initializeFileWatcher()` methods in `TTLContextLoader.ts`
- **CLI Integration**: Added missing `directories: ttlDirectories` configuration at line 650 in `cli/index.ts`
- **Docker Configuration**: Enhanced `Dockerfile` with `--ttl-directories ./knowledge` parameter
### Validation Results
- **TTL Context Loader**: `Successfully loaded 41/41 TTL files` (target project only)
- **WebSocket MCP Server**: `Successfully loaded 41 TTL files` (clean data isolation)
- **Stdio MCP Server**: `Loaded 41 TTL files in stdio server` (no cross-project contamination)
- **MCP Data Verification**: Confirmed serving correct Java code data from keycloak project only
### Documentation Enhancements
- **Visual Overview**: Added Neo4j knowledge graph visualization to README
- Interactive module nodes with dependency relationships
- Entity metrics and architectural patterns visualization
- **Technical Architecture**: Complete documentation of 5-layer AASWE system
- **Multi-Project Support**: Clear project isolation and data boundaries
### System Reliability
- **Project Data Isolation**: Complete separation between different analyzed codebases
- **MCP Server Integrity**: All three TTL loading mechanisms now respect directory restrictions
- **Docker Volume Mapping**: Proper `${ANALYSIS_PROJECT_PATH:-./}/knowledge:/app/knowledge` configuration
- **Container Health**: Validated full system operation with Neo4j + Redis + MCP server stack
---
## [1.1.1] - 2025-08-22
### 🔒 Security & Reliability Release - CodeRabbit Fixes
### Security Fixes
- **SQL/Cypher Injection Prevention**: Added input validation and sanitization in `MCPStdioServer.ts`
- Strict type checking for filePath parameters
- Regex-based parameter sanitization to prevent injection attacks
- Proper validation with MCPServerError responses
- **Error Response ID Correlation**: Fixed error response handling in MCP protocol
- Updated `sendError()` method to accept and use proper request IDs
- All error responses now correlate with originating requests
- Maintains JSON-RPC protocol specification compliance
### Performance & Reliability Improvements
- **Memory Leak Prevention**: Fixed memory accumulation in CLI process management
- Replaced infinite promise with heartbeat intervals in `cli/index.ts`
- Proper SIGINT/SIGTERM signal handling and cleanup mechanisms
- Prevents long-running process memory leaks
- **Metrics Division by Zero**: Fixed calculation errors in server metrics
- Proper edge case handling when totalRequests = 0
- Accurate average response time calculation from first request
- Reliable performance monitoring metrics
### Build & Infrastructure Fixes
- **Docker Native Module Compilation**: Fixed container build issues
- Removed `--ignore-scripts` flag to allow proper native module builds
- Fixed source file copy sequence in Dockerfile
- All dependencies now compile correctly in containerized environments
- **Docker Context Optimization**: Improved build performance
- Excludes local `dist/` directory to prevent stale artifacts
- Added `!docs/**/*.md` inclusion for complete documentation
- Optimized context size for faster builds
### Code Quality Enhancements
- **Path Normalization**: Enhanced cross-platform compatibility
- Robust Windows/Linux path handling with `toPosix()` helper function
- Efficient deduplication using `Set` instead of array filtering
- Cleaner, more maintainable path variation generation
- **Package Lock Synchronization**: Updated package-lock.json to version 1.1.1
### Known Non-Critical Issues
- **RDF Storage Layer Warning**: Non-critical `baseDirectory` initialization error during startup
- System continues to function normally despite warning
- TTL files load successfully (38/38 files loaded)
- MCP server starts and operates correctly
- Will be addressed in future release
### Testing & Validation
- **Docker Build Success**: All security fixes validated with successful container builds
- **TypeScript Compilation**: No errors during build process
- **NPM Dependencies**: All packages install correctly with synchronized lock file
- **System Functionality**: Complete MCP server operation confirmed (4 tools, 38 TTL files)
---
## [1.1.0] - 2025-08-22
### 🎉 Major Release - Complete MCP Integration & Bug Fixes
### Added
- **Dual MCP Transport Support**: Full Model Context Protocol integration with both WebSocket and stdio transports
- **RooCode/Cline IDE Integration**: Direct CLI IDE support via stdio MCP transport
- **Enhanced TTL Context Loading**: Recursive TTL file discovery and loading (38+ files for keycloak-config-cli)
- **Docker Health Check Dependencies**: Proper container startup orchestration
- **Comprehensive Resource Discovery**: 146+ resources accessible via MCP protocol
- **4 MCP Tools Available**: `get_context`, `query_knowledge`, `analyze_code`, `get_file_content`
### Fixed
- **Critical TTL Aggregation Bug**: Fixed Neo4j Cypher query syntax in `AutoAnalysisWorkflow.ts` (line 247)
- TTL files now show real entity counts instead of zeros
- Replaced invalid `ANY()` clauses with direct string interpolation
- **Container Startup Race Conditions**: Neo4j now starts before AASWE server
- **RDF Storage Configuration Issues**: Disabled problematic monitoring that caused recurring "baseDirectory" errors
- **Docker Volume Mounting**: Proper `ANALYSIS_PROJECT_PATH` environment variable support
- **Neo4j Connection Reliability**: Eliminated connection refused errors during startup
### Changed
- **Version Bump**: 1.0.19 → 1.1.0
- **Repository URLs**: Updated to `https://github.com/AssahBismarkabah/AIDe.git`
- **README Documentation**: Comprehensive setup and MCP integration instructions
- **Package Self-Dependency**: Updated to version 1.1.0
### Technical Improvements
- **TTL File Processing**: Complete recursive directory scanning for knowledge files
- **MCP Server Architecture**: Unified server manager supporting dual transports
- **Container Health Monitoring**: Proper health check implementations
- **CLI Enhanced Detection**: Prefers local docker-compose over NPM package versions
- **Error Handling**: Improved error messages and graceful failure handling
### Testing & Validation
- **End-to-End Testing**: Complete system tested with keycloak-config-cli Java project
- **MCP Connectivity**: Confirmed working with 4 tools and 146 resources
- **Docker Orchestration**: Full containerized deployment operational
- **IDE Integration**: RooCode configuration tested and validated
- **Multi-Language Support**: Validated with Java, TypeScript, and configuration files
### Dependencies
- All dependencies maintained at current stable versions
- No breaking changes introduced
- Backward compatible with existing configurations
---
## [1.0.19] - Previous Release
- Initial stable release with basic functionality