Version 1.0.2
Release Notes - v1.0.2
Release Date: 2025-12-23
Overview
This release fixes a bug in the circular dependency detection system that were causing false positive reports for legitimate package hierarchies.
Bug Fixes
Critical: False Circular Dependency Detection
Fixed two interconnected bugs that caused the tool to incorrectly report circular dependencies in valid package structures.
Bug #1: Incorrect Import Categorization
Issue: Internal packages were being misclassified as standard library packages when the module name didn't contain a dot (e.g., app, service, api).
Root Cause: The categorizeImport() function checked for stdlib packages before checking for internal packages. The stdlib detection logic returns true for any import path whose first component lacks a dot, incorrectly matching simple module names.
Impact: Internal imports were excluded from circular dependency analysis, but could still participate in false positive detection through other code paths.
Fix: Reordered import categorization to check for internal packages first.
Bug #2: Package Name vs Import Path Confusion
Issue: The dependency graph was built using Go package names (from package declarations) instead of import paths (directory structure), causing false circular dependencies when:
- Multiple directories used the same package name (e.g.,
package mysqlin different locations) - Import paths were truncated to just their last component
Root Cause:
- Files were grouped by
PackageNamefield instead of their import path - Import paths like
app/internal/repository/mysqlwere reduced to justmysql - Multiple distinct packages with the same name collapsed into a single graph node
Impact: Common patterns like repository/mysql and pkg/mysql would be treated as the same package, creating phantom circular dependencies.
Fix: Complete refactoring of dependency graph construction.
Testing
Test Coverage
- All existing unit tests updated and passing
- New test scenarios added for package name collision detection
- Full test suite: 100% passing (11 packages)
Regression Testing
Verified the fix works correctly for:
- ✅ Multiple packages with same name in different paths (correctly distinguished)
- ✅ Actual circular dependencies still detected correctly
- ✅ Import categorization now accurate (internal vs stdlib vs external)
Breaking Changes
None. This is a bug fix release with no API changes.
Migration Guide
No migration needed. Simply upgrade to v1.0.2 to benefit from the fixes.
Known Issues
None.
Upgrade Instructions
# If installed via go install
go install github.com/daniel-munoz/code-review-assistant@v1.0.2
# Or download the binary from releases
# https://github.com/daniel-munoz/code-review-assistant/releases/tag/v1.0.2