- Phase 9 defines safe incremental migration; pilot with parity-enabled features.
- This runbook provides operational steps for incident response, debugging, and escalation.
| Feature | Description |
|---|---|
| Migration Plan | Step-by-step migration with 4 pilot phases |
| Feature Toggles | Per-feature enablement control |
| Rollback Paths | Tested rollback procedures for each feature |
| Pilot Runbooks | Enablement, monitoring, rollback procedures |
Symptoms:
- Feature enablement fails
- Database migration errors
- Configuration conflicts
Immediate Steps:
# Stop all services
./apex.bat stop
# Check migration status
# Review: docs/MIGRATION_PLAN.md
# Restore from backup
cp apex.db.backup.* apex.dbDebug Commands:
# Check feature toggle state
# Review: core/router/src/unified_config.rs
# Check database migrations
ls core/memory/migrations/Common Causes:
- Incomplete backup
- Configuration syntax errors
- Database schema mismatch
Rollback: Execute emergency rollback procedure from MIGRATION_PLAN.md §7.1
Symptoms:
- Enabled feature causes errors
- Performance degradation
- User-facing issues
Immediate Steps:
# Disable specific feature
# Example: APEX_STREAMING_ENABLED=false
# Restart services
./apex.bat restart
# Verify feature disabled
curl -s http://localhost:3000/api/v1/stream/statsDebug Commands:
# Check feature-specific logs
# Review: logs/apex-router.log
# Check feature health endpoint
curl -s http://localhost:3000/api/v1/system/healthCommon Causes:
- Feature configuration error
- Resource exhaustion
- Dependency failure
Rollback: Disable feature, investigate root cause, re-enable when fixed.
Symptoms:
- Rollback triggered by monitoring
- Manual rollback requested
- Emergency rollback needed
Immediate Steps:
# Execute emergency rollback
./apex.bat stop
cp apex.db.backup.* apex.db
cp ~/.apex/config.toml.backup.* ~/.apex/config.toml
./apex.bat startDebug Commands:
# Verify rollback success
curl -s http://localhost:3000/api/v1/system/health
curl -s http://localhost:3000/api/v1/metricsCommon Causes:
- Critical bug discovered
- Performance regression
- Security vulnerability
Rollback: Rollback is the recovery procedure. Monitor for stability.
| Command | Purpose |
|---|---|
./apex.bat stop |
Stop all services |
./apex.bat start |
Start all services |
./apex.bat restart |
Restart all services |
curl -s http://localhost:3000/api/v1/system/health |
Check system health |
cat docs/MIGRATION_PLAN.md |
Review migration plan |
After any incident, verify:
- All services running
- System health endpoint returns OK
- Enabled features operational
- Disabled features properly disabled
- Database integrity maintained
- Configuration valid
- On-call: @engineering-ops
- Migration Lead: @engineering-ops
- Security: @security-team
- Governance: @governance-board
- Phase 9: Migration Plan and Pilot Rollout
- Version: 1.0
- Date: 2026-03-31