feat: verify production runtime integrity

This commit is contained in:
Codex Local
2026-08-26 23:30:59 +08:00
parent feb99de192
commit 56b8e0c6da
15 changed files with 103 additions and 22 deletions
@@ -74,16 +74,20 @@ func TestAcceptancePlatformHealthSummaryCoversMissingAndCounts(t *testing.T) {
func TestEvaluateAcceptanceProductionInfrastructure(t *testing.T) {
readyChecks := []PlatformHealthCheck{
{Name: "deployment_profile", Status: "healthy", Value: "production"},
{Name: "application_environment", Status: "healthy", Value: "prod"},
{Name: "identity_service_mode", Status: "healthy", Value: "hardened"},
{Name: "offsite_backup", Status: "healthy", Value: "age_seconds=120"},
{Name: "external_alert_receiver", Status: "healthy", Value: "configured"},
{Name: "mock_services", Status: "healthy", Value: "disabled"},
}
ready := evaluateAcceptanceProductionInfrastructure("PRODUCTION", readyChecks)
if !ready.Applicable || !ready.GateSatisfied || !ready.OffsiteBackupReady || !ready.ExternalAlertReceiverReady || !ready.MockServicesDisabled {
if !ready.Applicable || !ready.GateSatisfied || !ready.ApplicationRuntimeReady || !ready.IdentityServiceReady || !ready.OffsiteBackupReady || !ready.ExternalAlertReceiverReady || !ready.MockServicesDisabled {
t.Fatalf("ready=%+v", ready)
}
demo := evaluateAcceptanceProductionInfrastructure("PRODUCTION", []PlatformHealthCheck{
{Name: "deployment_profile", Status: "healthy", Value: "demo"},
{Name: "application_environment", Status: "healthy", Value: "local"},
{Name: "identity_service_mode", Status: "healthy", Value: "development"},
{Name: "offsite_backup", Status: "healthy", Value: "not_required"},
{Name: "external_alert_receiver", Status: "healthy", Value: "not_configured"},
{Name: "mock_services", Status: "healthy", Value: "enabled_for_demo"},