Skip to content

Feat/smart change detection devops costs#17

Merged
aleksandardodevski111 merged 6 commits into
mainfrom
feat/smart-change-detection-devops-costs
Jan 26, 2026
Merged

Feat/smart change detection devops costs#17
aleksandardodevski111 merged 6 commits into
mainfrom
feat/smart-change-detection-devops-costs

Conversation

@aleksandardodevski111
Copy link
Copy Markdown
Collaborator

Features

1. Test Enhancement Suggestions

  • Analyzes existing test files and suggests improvements
  • Detects missing error handling, edge cases, async tests, input validation
  • Generates framework-specific code snippets (Jest/Vitest, Mocha, Pytest)

2. Project Classification Caching (Token Optimization)

  • Caches project classification in database (business logic vs QA)
  • Avoids re-running classification on every analysis
  • Added --show-classification flag to display on demand

3. Smart Change Detection & DevOps Cost Estimation

  • Automatically detects test, code, and DevOps file changes
  • Estimates AWS infrastructure costs for Terraform/CloudFormation
  • Test coverage reporting

Bug Fixes

  • Fixed cost trend chart
  • Fixed fixes array initialization

Aleksandar Dodevski added 6 commits January 9, 2026 17:04
- Added analyzeTestQuality() to analyze existing tests and suggest improvements
- Detects missing test scenarios: error handling, edge cases, async ops, validation, state changes
- Generates enhancement code suggestions for Jest, Mocha, Pytest, Vitest
- Integrated into smart change detection workflow
- Displays test enhancements separately from new test suggestions in CLI
- Checks for:
  * Error handling and exception tests
  * Edge case and boundary value tests
  * Async operation tests
  * Input validation tests
  * Return value verification
  * State change and side effect tests
  * Integration test suggestions
- Enhanced TestSuggestion interface with isEnhancement and existingTestFile flags
- Provides actionable code snippets to improve test coverage and quality
… flag

- Cache project classification in database to avoid re-running on every analysis (saves tokens)
- Add project_classification column to pr_analysis table with migration
- Add getProjectClassification() function to retrieve cached results
- Add --show-classification CLI flag to display classification on demand
- Remove automatic console output for classification (now silent by default)
- Update README with new flag documentation
- Update AgentResult type with projectClassification field
Resolved conflicts:
- src/db/index.ts: Keep both project_classification and peer review fields
- src/agents/pr-analyzer-agent.ts: Keep MCP chatModel support from main
- Added @modelcontextprotocol/sdk dependency
- Resolved conflicts by keeping both feature sets
- Merged imports in base-pr-agent-workflow.ts
- Accepted dist files from main (will regenerate)
- Kept all peer review features from PR #18
- Kept all test enhancement and DevOps cost features from PR #17
## Features
- Added coverage-analyzer.ts with nyc/Istanbul coverage parsing (LCOV, JSON formats)
- Added ESLint static analysis integration
- New CLI flags:
  * --scan-coverage: Run test coverage analysis
  * --show-coverage: Display coverage metrics
  * --show-static-analysis: Run ESLint analysis
  * --peer-review: Enable Jira peer review (moved from config-only)

## Coverage Analysis
- Parses coverage-summary.json and lcov.info reports
- Identifies files with low coverage (<50%)
- Suggests uncovered functions and branches for testing
- Formats coverage report for CLI output

## Static Analysis
- Runs ESLint on project files
- Reports errors, warnings, and fixable issues
- Integrates with existing test enhancement suggestions

## Technical Details
- Created src/tools/coverage-analyzer.ts with full TypeScript types
- Exported types: CoverageMetrics, FileCoverage, UncoveredCode, CoverageAnalysis
- Integrated into analyze command flow
Added documentation for new CLI flags:
- --scan-coverage: Run test coverage analysis
- --show-coverage: Display coverage metrics
- --show-static-analysis: Run ESLint analysis
- --peer-review: Enable Jira integration
- Example for full analysis with all static analysis features
@aleksandardodevski111 aleksandardodevski111 merged commit 8c14abb into main Jan 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant