{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://open-delivery-spec.dev/schemas/rollback-plan.json", "title": "ODS Rollback Plan", "description": "Schema for rollback plans in the Open Delivery Spec (v1.0.0).", "type": "object", "required": [ "release_id", "repository", "created_by", "created_at", "rollback_strategy", "steps", "rollback_indicators", "data_rollback", "communication_plan" ], "properties": { "release_id": { "type": "string", "pattern": "^v\\d+\\.\\d+\\.\\d+(-[a-z0-9]+)*$" }, "repository": { "type": "string", "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$" }, "created_by": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "rollback_strategy": { "type": "string", "enum": [ "feature_flag", "git_revert", "previous_deployment", "database_restore", "blue_green_switch", "canary_scale_down", "traffic_shift", "config_revert", "multi_step" ] }, "estimated_rollback_time_minutes": { "type": "integer", "minimum": 0 }, "tested": { "type": "boolean" }, "last_test_timestamp": { "type": "string", "format": "date-time" }, "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["step", "action", "description", "verification"], "properties": { "step": { "type": "integer", "minimum": 1 }, "action": { "type": "string" }, "description": { "type": "string" }, "command": { "type": "string" }, "executor": { "type": "string" }, "expected_duration_seconds": { "type": "integer" }, "verification": { "type": "string" } } } }, "rollback_indicators": { "type": "object", "required": ["monitoring_dashboard", "alert_channel"], "properties": { "error_rate_threshold": { "type": "string" }, "latency_threshold": { "type": "string" }, "monitoring_dashboard": { "type": "string" }, "alert_channel": { "type": "string" }, "auto_rollback": { "type": "boolean", "default": false }, "auto_rollback_condition": { "type": "string" } } }, "data_rollback": { "type": "object", "required": ["database_migrations", "migration_reversible", "data_loss_risk", "backup_taken"], "properties": { "database_migrations": { "type": "boolean" }, "migration_reversible": { "type": "boolean" }, "reverse_migration": { "type": "string" }, "data_loss_risk": { "type": "string", "enum": ["none", "low", "medium", "high", "catastrophic"] }, "backup_taken": { "type": "boolean" }, "backup_location": { "type": "string" } } }, "dependencies": { "type": "object", "properties": { "upstream_services": { "type": "array", "items": { "type": "string" } }, "downstream_services": { "type": "array", "items": { "type": "string" } }, "downstream_rollback_required": { "type": "boolean" }, "downstream_compatibility": { "type": "string" } } }, "communication_plan": { "type": "object", "required": ["notification_template"], "properties": { "stakeholders": { "type": "array", "items": { "type": "string" } }, "notification_template": { "type": "string" }, "post_rollback_actions": { "type": "array", "items": { "type": "string" } } } } } }