Autonomous Remediation
Enable Autonoma to automatically fix issues before they impact your users
How Auto-Fix Works
Auto-Fix uses Autonoma's predictive models to identify issues and apply proven fixes automatically. Every fix is validated, tested, and can be rolled back instantly if needed.
Prediction & Analysis
Autonoma detects an issue pattern and analyzes potential fixes based on historical data and best practices.
{
"prediction": {
"type": "memory_leak",
"confidence": 0.96,
"impact": "high",
"fix_available": true
}
}
Validation & Testing
The proposed fix is validated against your test suite and analyzed for potential side effects.
Syntax Valid
Tests Pass
No Side Effects
Apply & Monitor
The fix is applied with continuous monitoring. Any anomalies trigger instant rollback.
Configuring Auto-Fix
Basic Configuration
const autonoma = new Autonoma({
apiKey: process.env.AUTONOMA_API_KEY,
// Enable auto-fix globally
autoFix: {
enabled: true,
confidence: 0.90, // Minimum confidence threshold
// Categories to auto-fix
categories: [
'memory-leaks',
'performance',
'null-reference',
'resource-cleanup',
],
// Safety settings
rollback: {
enabled: true,
threshold: {
errorRate: 0.01, // 1% error rate triggers rollback
responseTime: 200, // 200ms latency triggers rollback
}
}
}
});
Advanced Auto-Fix Rules
// Fine-grained control over auto-fix behavior
const autoFixConfig = {
// Global settings
enabled: true,
dryRun: false, // Test mode: log but don't apply
// Category-specific rules
rules: {
'memory-leaks': {
enabled: true,
confidence: 0.95,
maxFixesPerHour: 10,
requireApproval: false,
},
'security-high': {
enabled: false, // Manual review required
notifyChannels: ['email', 'slack'],
},
'database-migrations': {
enabled: true,
confidence: 0.99,
requireApproval: true,
approvers: ['team-lead@company.com'],
schedule: 'maintenance-window', // Only during maintenance
},
'performance': {
enabled: true,
confidence: 0.90,
conditions: {
timeOfDay: '02:00-06:00', // Low traffic hours
cpuUsage: '< 50%', // When resources available
}
}
},
// Exclusions
exclude: {
files: [
'**/vendor/**',
'**/node_modules/**',
'**/*.min.js',
],
patterns: [
/GENERATED CODE/,
/DO NOT MODIFY/,
]
},
// Notifications
notifications: {
beforeFix: true,
afterFix: true,
onRollback: true,
channels: {
slack: {
webhook: process.env.SLACK_WEBHOOK,
channel: '#autonoma-fixes',
},
email: {
recipients: ['devops@company.com'],
}
}
}
};
Rollback Configuration
Configure automatic rollback triggers to ensure safety:
{
rollback: {
enabled: true,
automatic: true,
// Triggers for automatic rollback
triggers: {
errorRate: {
threshold: 0.01, // 1% increase in errors
window: '5m', // Within 5 minutes
},
responseTime: {
threshold: 1.5, // 50% increase
percentile: 'p95', // 95th percentile
},
httpStatus: {
5xx: { threshold: 10 }, // 10 server errors
4xx: { threshold: 50 }, // 50 client errors
},
custom: [
{
metric: 'memory_usage',
threshold: '> 90%',
duration: '2m',
}
]
},
// Rollback behavior
strategy: 'instant', // 'instant' | 'gradual'
notifyBeforeRollback: false, // Don't wait for approval
preserveData: true, // Keep fix attempt data
}
}
Auto-Fix Best Practices
Start Conservative
Begin with high confidence thresholds and gradually lower them as you build trust.
- Start with 95%+ confidence
- Enable for low-risk categories first
- Monitor fix success rates
Version Control Integration
Track all auto-fixes in your version control system:
- Auto-commit fixes with clear messages
- Create fix branches for review
- Tag releases with auto-fixes
Security Considerations
Maintain security while enabling auto-fix:
- Require manual review for auth code
- Exclude sensitive configuration files
- Audit all auto-fix actions
Timing & Scheduling
Control when auto-fixes are applied:
- Schedule during low-traffic periods
- Respect maintenance windows
- Rate limit fixes to prevent storms
Monitoring Auto-Fix
Dashboard Metrics
Recent Auto-Fix Activity
Memory leak fixed in UserService.js
2 minutes ago • Confidence: 98%
SQL query optimization in analytics.py
15 minutes ago • Confidence: 94%
Rollback: Connection pool fix
1 hour ago • Error rate increased
Common Auto-Fix Scenarios
Memory Leaks
Automatically adds cleanup code for event listeners, timers, and subscriptions.
// Before
componentDidMount() {
window.addEventListener('resize', this.handleResize);
}
// After (Auto-fixed)
componentDidMount() {
window.addEventListener('resize', this.handleResize);
}
componentWillUnmount() {
window.removeEventListener('resize', this.handleResize);
}
Null Reference Errors
Adds null checks and optional chaining to prevent runtime errors.
// Before
const userName = user.profile.name;
// After (Auto-fixed)
const userName = user?.profile?.name || 'Guest';
Resource Optimization
Optimizes database queries, API calls, and resource usage patterns.
// Before
for (const user of users) {
const profile = await db.query('SELECT * FROM profiles WHERE user_id = ?', user.id);
}
// After (Auto-fixed)
const userIds = users.map(u => u.id);
const profiles = await db.query('SELECT * FROM profiles WHERE user_id IN (?)', [userIds]);
Frequently Asked Questions
Is auto-fix safe for production?
Yes. Every fix is validated, tested, and monitored. Automatic rollback ensures safety. Start with high-confidence fixes and gradually expand as you build trust.
Can I review fixes before they're applied?
Yes. Configure requireApproval: true
for any category. Autonoma will create pull requests for manual review instead of applying fixes directly.
What happens if a fix causes problems?
Autonoma continuously monitors key metrics after applying fixes. If any degradation is detected (increased errors, slower response times), the fix is automatically rolled back within seconds.
How do I track what's been auto-fixed?
All auto-fixes are logged in your Autonoma dashboard, sent to configured notification channels, and can be automatically committed to version control with detailed messages.
Ready to Enable Auto-Fix?
Start preventing issues automatically with zero human intervention