{
  "schema": "router-step-facts-v1",
  "step": "STEP_050M07D6_POST_SCHEDULED_REFRESH_READONLY_COMPARISON",
  "generated_at_utc": "20260712-071025",
  "assessment": {
    "all_ok": true,
    "decision": "PASS_STEP_050M07D6_POST_SCHEDULED_REFRESH_READONLY_COMPARISON",
    "operational_classification": "SCHEDULED_REFRESH_STARTED_BUT_POOL_UPDATE_NOT_PROVEN",
    "scheduled_refresh_observed": false,
    "baseline_healthy": true,
    "changed_interfaces": [
      "vpn4"
    ],
    "planner_changes_before": 3,
    "planner_changes_after": 3,
    "warnings": [
      "planner_changes_count=3",
      "new_failure_markers_detected"
    ],
    "safety": {
      "read_only": true,
      "refresh_ran": false,
      "rebalance_ran": false,
      "network_changed": false,
      "services_changed": false,
      "state_changed": false,
      "timer_changed": false,
      "plan_changed": false,
      "direct_failopen_changed": false
    }
  },
  "comparison": {
    "schedule": {
      "expected_run_utc": "2026-07-12T04:20:00+00:00",
      "expected_run_amsterdam": "2026-07-12T06:20:00+02:00",
      "snapshot_epoch": 1783840226,
      "snapshot_after_schedule": true
    },
    "scheduled_refresh": {
      "observed": false,
      "pool_written_after_schedule": false,
      "refresh_log_evidence": [
        "2026-07-12T04:20:00+00:00 === hmn-refresh-pool-safe start ===",
        "2026-07-12T04:20:00+00:00 mode=fresh-download",
        "2026-07-12T04:20:00+00:00 log=/root/hmn/logs/refresh-pool-safe-20260712-042000-16148.log",
        "2026-07-12T04:20:00+00:00 backup=/root/hmn/backups/refresh-safe-before-20260712-042000-16148",
        "2026-07-12T04:20:00+00:00 trying fresh HMN download via: /root/hmn/hmn-download-all-awg.sh",
        "2026-07-12T04:20:00+00:00 fresh_download_rc=1",
        "2026-07-12T04:20:00+00:00 fresh download failed/unavailable rc=1",
        "2026-07-12T04:20:00+00:00 fallback: keep old configs/latest and validate current local pool through vpn_test",
        "2026-07-12T04:20:06+00:00 validate_current_pool_rc=1",
        "2026-07-12T04:20:06+00:00 rollback: restoring published pointers/tables from /root/hmn/backups/refresh-safe-before-20260712-042000-16148",
        "2026-07-12T04:20:06+00:00 retry-needed set: fresh_download_failed_and_old_pool_validation_failed_rc_1"
      ],
      "failure_log_evidence": [
        "2026-07-12T04:20:00+00:00 fresh download failed/unavailable rc=1",
        "2026-07-12T04:20:06+00:00 old/current pool validation failed; rolling back published tables",
        "2026-07-12T04:20:06+00:00 rollback: restoring published pointers/tables from /root/hmn/backups/refresh-safe-before-20260712-042000-16148",
        "2026-07-12T04:20:06+00:00 rollback WARN: no usable old latest target",
        "2026-07-12T04:20:06+00:00 retry-needed set: fresh_download_failed_and_old_pool_validation_failed_rc_1"
      ],
      "egress1_failure_evidence": []
    },
    "endpoints": {
      "changes": {
        "vpn1": {
          "before": "109.248.198.4:37129",
          "after": "109.248.198.4:37129",
          "changed": false
        },
        "vpn2": {
          "before": "151.236.30.139:33998",
          "after": "151.236.30.139:33998",
          "changed": false
        },
        "vpn3": {
          "before": "95.211.68.119:45176",
          "after": "95.211.68.119:45176",
          "changed": false
        },
        "vpn4": {
          "before": "178.215.227.13:44408",
          "after": "157.173.25.198:34340",
          "changed": true
        },
        "vpn5": {
          "before": "157.173.27.69:41797",
          "after": "157.173.27.69:41797",
          "changed": false
        }
      },
      "changed_interfaces": [
        "vpn4"
      ],
      "target_after": {
        "vpn1": "192.121.163.235:42530",
        "vpn2": "37.235.54.96:38971",
        "vpn3": "95.211.68.119:45176",
        "vpn4": "192.71.244.202:45735",
        "vpn5": "157.173.27.69:41797"
      }
    },
    "pool": {
      "before": {
        "sha256": "b9fd15bfe7aa2337048cbf7198c798e74e67e9b2f6e6040fb3c2138084378599",
        "rows": 15,
        "mtime_epoch": 1783702742,
        "latest_generation": "/root/hmn/configs/awg1/20260711-205609"
      },
      "after": {
        "sha256": "b9fd15bfe7aa2337048cbf7198c798e74e67e9b2f6e6040fb3c2138084378599",
        "rows": 15,
        "mtime_epoch": 1783702742,
        "latest_generation": "/root/hmn/configs/awg1/20260711-205609"
      },
      "changed": false,
      "generation_changed": false
    },
    "planner": {
      "before_changes_count": 3,
      "after_decision": "plan_ok",
      "after_changes_count": 3,
      "after_plan": [
        {
          "slot": "egress1",
          "iface": "vpn1",
          "current": "109.248.198.4:37129",
          "target": "192.121.163.235:42530",
          "change": true,
          "target_rank": "1",
          "target_avg_ms": "39.008"
        },
        {
          "slot": "egress2",
          "iface": "vpn2",
          "current": "151.236.30.139:33998",
          "target": "37.235.54.96:38971",
          "change": true,
          "target_rank": "7",
          "target_avg_ms": "62.926"
        },
        {
          "slot": "egress3",
          "iface": "vpn3",
          "current": "95.211.68.119:45176",
          "target": "95.211.68.119:45176",
          "change": false,
          "target_rank": "2",
          "target_avg_ms": "44.271"
        },
        {
          "slot": "egress4",
          "iface": "vpn4",
          "current": "157.173.25.198:34340",
          "target": "192.71.244.202:45735",
          "change": true,
          "target_rank": "8",
          "target_avg_ms": "66.349"
        },
        {
          "slot": "egress5",
          "iface": "vpn5",
          "current": "157.173.27.69:41797",
          "target": "157.173.27.69:41797",
          "change": false,
          "target_rank": "5",
          "target_avg_ms": "56.803"
        }
      ]
    },
    "state": {
      "before": {
        "mode": "NORMAL",
        "status": "refresh_ok_rebalance_ok",
        "epoch": 1783803369,
        "repair_counter": 16,
        "commit_raw": "true"
      },
      "after": {
        "mode": "NORMAL",
        "status": "refresh_ok_rebalance_ok",
        "epoch": 1783803369,
        "repair_counter": 0,
        "commit_raw": "true"
      },
      "changes": {
        "mode": {
          "before": "NORMAL",
          "after": "NORMAL",
          "changed": false
        },
        "status": {
          "before": "refresh_ok_rebalance_ok",
          "after": "refresh_ok_rebalance_ok",
          "changed": false
        },
        "epoch": {
          "before": 1783803369,
          "after": 1783803369,
          "changed": false
        },
        "repair_counter": {
          "before": 16,
          "after": 0,
          "changed": true
        },
        "commit_raw": {
          "before": "true",
          "after": "true",
          "changed": false
        }
      }
    },
    "health": {
      "checks": {
        "five_current_endpoints": true,
        "five_strict_slots": true,
        "routes_201_205": true,
        "services_running_enabled": true,
        "locks_absent": true,
        "cron_still_present": true,
        "read_only_snapshot": true
      },
      "all_ok": true,
      "strict_after": {
        "vpn1": true,
        "vpn2": true,
        "vpn3": true,
        "vpn4": true,
        "vpn5": true
      }
    },
    "classification": "SCHEDULED_REFRESH_STARTED_BUT_POOL_UPDATE_NOT_PROVEN"
  },
  "current_baseline": {
    "captured_at": {
      "epoch": 1783840226,
      "vm101_local": "2026-07-12T07:10:26+0000",
      "vm101_utc": "2026-07-12T07:10:26Z"
    },
    "protocol": "AmneziaWG",
    "runtime_cli": "/usr/bin/amneziawg",
    "endpoints": {
      "vpn1": "109.248.198.4:37129",
      "vpn2": "151.236.30.139:33998",
      "vpn3": "95.211.68.119:45176",
      "vpn4": "157.173.25.198:34340",
      "vpn5": "157.173.27.69:41797"
    },
    "strict": {
      "vpn1": true,
      "vpn2": true,
      "vpn3": true,
      "vpn4": true,
      "vpn5": true
    },
    "healthy_vpn_slots": 5,
    "routes_201_205": true,
    "services": {
      "hook_running": true,
      "hook_enabled": true,
      "watcher_running": true,
      "watcher_enabled": true
    },
    "locks": {
      "emergency": false,
      "refresh": false
    },
    "pool": {
      "sha256": "b9fd15bfe7aa2337048cbf7198c798e74e67e9b2f6e6040fb3c2138084378599",
      "rows": 15,
      "mtime_epoch": 1783702742,
      "latest_generation": "/root/hmn/configs/awg1/20260711-205609"
    },
    "state": {
      "mode": "NORMAL",
      "status": "refresh_ok_rebalance_ok",
      "epoch": 1783803369,
      "repair_counter": 0,
      "commit_raw": "true"
    },
    "planner": {
      "schema": "router-egress-hmn-plan-top5-v2",
      "decision": "plan_ok",
      "pool": "/root/hmn/cache/ok-awg1-strict-foreign-latest.tsv",
      "pool_mtime_epoch": 1783702742,
      "quarantine_enabled": true,
      "quarantine_excluded_count": 4,
      "duplicate_excluded_count": 0,
      "desired_count": 5,
      "changes_count": 3,
      "plan": [
        {
          "slot": "egress1",
          "iface": "vpn1",
          "current": "109.248.198.4:37129",
          "target": "192.121.163.235:42530",
          "change": true,
          "target_rank": "1",
          "target_avg_ms": "39.008"
        },
        {
          "slot": "egress2",
          "iface": "vpn2",
          "current": "151.236.30.139:33998",
          "target": "37.235.54.96:38971",
          "change": true,
          "target_rank": "7",
          "target_avg_ms": "62.926"
        },
        {
          "slot": "egress3",
          "iface": "vpn3",
          "current": "95.211.68.119:45176",
          "target": "95.211.68.119:45176",
          "change": false,
          "target_rank": "2",
          "target_avg_ms": "44.271"
        },
        {
          "slot": "egress4",
          "iface": "vpn4",
          "current": "157.173.25.198:34340",
          "target": "192.71.244.202:45735",
          "change": true,
          "target_rank": "8",
          "target_avg_ms": "66.349"
        },
        {
          "slot": "egress5",
          "iface": "vpn5",
          "current": "157.173.27.69:41797",
          "target": "157.173.27.69:41797",
          "change": false,
          "target_rank": "5",
          "target_avg_ms": "56.803"
        }
      ]
    },
    "runner": {
      "schema": "router-egress-emergency-refresh-v1",
      "mode": "dry-run",
      "decision": "below_threshold_noop",
      "reason": "daily_fail_count_below_threshold",
      "daily_fail_count": 0,
      "daily_fail_threshold": 5,
      "threshold_reached": false,
      "force": false,
      "cooldown_seconds": 600,
      "cooldown_remaining": 0,
      "healthy_vpn_slots": 5,
      "commit_enabled": true,
      "direct_failopen_enabled": false,
      "direct_failopen_action": "disabled_not_allowed_in_step050f",
      "helper_ok": true,
      "refresh_cmd": "/root/hmn/hmn-refresh-pool-safe.sh",
      "refresh_cmd_exists": true,
      "planner_cmd": "/usr/local/sbin/router-egress-hmn-plan-top5.sh",
      "planner_cmd_exists": true,
      "rebalance_apply_cmd": "/usr/local/sbin/router-egress-hmn-rebalance-top5-apply.sh",
      "rebalance_apply_cmd_exists": true,
      "watcher_cmd": "/usr/local/sbin/router-egress-health-repair-watch.sh",
      "watcher_cmd_exists": true,
      "last_emergency_refresh_status": "refresh_ok_rebalance_ok",
      "last_emergency_refresh_epoch": 1783803369
    }
  },
  "safety": {
    "read_only": true,
    "refresh_ran": false,
    "rebalance_ran": false,
    "network_changed": false,
    "services_changed": false,
    "state_changed": false,
    "timer_changed": false,
    "plan_changed": false,
    "direct_failopen_changed": false
  },
  "plan": {
    "current_milestone": "M07",
    "milestone_completed": false,
    "milestone_changed": false
  },
  "next_step": "CLASSIFY_D6_RESULT_BEFORE_ANY_MUTATION",
  "publish": {
    "trycf_report": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260712-071025_step050m07d6_post_scheduled_refresh_readonly_comparison/",
    "report_txt": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260712-071025_step050m07d6_post_scheduled_refresh_readonly_comparison/report.txt",
    "facts_json": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260712-071025_step050m07d6_post_scheduled_refresh_readonly_comparison/facts.json",
    "architecture_plan": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260711-181158_local_architecture_plan_vm101_autonomous_hmn_recovery/",
    "xs_map": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260711-120734_xs_map_audit_repair_publish/",
    "global_project_plan": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260711-123348_global_project_plan_wg_paid/"
  }
}
