{
  "changes": {
    "backend_restart_done": "NO",
    "db_changed": "NO",
    "firewall_reload_done": "NO",
    "manager_invoked": "NO",
    "mapper_changed": "NO",
    "network_reload_done": "NO",
    "new_peer_created": "NO",
    "policy_changed": "NO",
    "private_material_published": "NO",
    "selector_changed": "NO_VM100_UNCHANGED_LOCAL_COPY_ONLY",
    "wg_reload_done": "NO"
  },
  "mode": "AGENT_SELECTOR_APPLY_LOCAL_SIMULATION",
  "previous": {
    "check_tool_exists_rc": 0,
    "prev040e2_check_rc": 0,
    "prev040e2_facts_rc": 0
  },
  "publish": {
    "local_index": "http://192.168.30.84:8099/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/",
    "published_dir": "/opt/router-ops/public/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260708-165248_step040f_agent_selector_apply_local_simulation",
    "trycf_index": "https://maple-movie-urls-cigarettes.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/",
    "trycf_report": "https://maple-movie-urls-cigarettes.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260708-165248_step040f_agent_selector_apply_local_simulation/"
  },
  "schema": "router-step-facts-v1",
  "simulation": {
    "apply_cs5": {
      "rc": 0,
      "result": {
        "action": "append",
        "apply_performed": true,
        "contract_valid": true,
        "errors": [],
        "exact_line": "10.253.1.14 cs5 canary_vpn2",
        "exact_present": false,
        "idempotent_noop": false,
        "mode": "apply-local",
        "payload_summary": {
          "fwmark": "0x202",
          "interface_name": "vpn2",
          "manager_id": "hmn_pool",
          "peer_id": "DRY_RUN_FUTURE_PEER_ID",
          "provider_type": "hmn_amneziawg",
          "selector_class": "cs5",
          "selector_label": "canary_vpn2",
          "slot_code": "vpn2",
          "subscription_id": "DRY_RUN_FUTURE_SUBSCRIPTION_ID",
          "table_id": 202,
          "tunnel_ip": "10.253.1.14"
        },
        "same_ip_conflict_count": 0,
        "same_selector_class_conflict_count": 0,
        "same_selector_label_conflict_count": 0,
        "schema": "wg-access-agent-selector-apply-plan-v1",
        "selector_entry_count_after_planned": 5,
        "selector_entry_count_before": 4,
        "slot_status": "healthy",
        "warnings": [],
        "would_append": true
      }
    },
    "second_run_cs5": {
      "rc": 0,
      "result": {
        "action": "noop",
        "apply_performed": false,
        "contract_valid": true,
        "errors": [],
        "exact_line": "10.253.1.14 cs5 canary_vpn2",
        "exact_present": true,
        "idempotent_noop": true,
        "mode": "apply-local",
        "payload_summary": {
          "fwmark": "0x202",
          "interface_name": "vpn2",
          "manager_id": "hmn_pool",
          "peer_id": "DRY_RUN_FUTURE_PEER_ID",
          "provider_type": "hmn_amneziawg",
          "selector_class": "cs5",
          "selector_label": "canary_vpn2",
          "slot_code": "vpn2",
          "subscription_id": "DRY_RUN_FUTURE_SUBSCRIPTION_ID",
          "table_id": 202,
          "tunnel_ip": "10.253.1.14"
        },
        "same_ip_conflict_count": 0,
        "same_selector_class_conflict_count": 0,
        "same_selector_label_conflict_count": 0,
        "schema": "wg-access-agent-selector-apply-plan-v1",
        "selector_entry_count_after_planned": 5,
        "selector_entry_count_before": 5,
        "slot_status": "healthy",
        "warnings": [],
        "would_append": false
      }
    },
    "selector_file": {
      "analysis": {
        "cs5_any_count": 1,
        "duplicate_count": 0,
        "entry_count": 5,
        "exact_cs4_count": 1,
        "exact_cs5_count": 1,
        "lines": [
          "10.253.1.10 cs1 canary_vpn3",
          "10.253.1.11 cs2 canary_vpn4",
          "10.253.1.12 cs3 canary_vpn5",
          "10.253.1.13 cs4 canary_vpn1",
          "10.253.1.14 cs5 canary_vpn2"
        ],
        "unique_entry_count": 5
      },
      "cat_rc": 0
    }
  },
  "step": "STEP_040F_AGENT_SELECTOR_APPLY_LOCAL_SIMULATION",
  "vm100_after": {
    "selector_active_lines": [
      "10.253.1.10 cs1 canary_vpn3",
      "10.253.1.11 cs2 canary_vpn4",
      "10.253.1.12 cs3 canary_vpn5",
      "10.253.1.13 cs4 canary_vpn1"
    ],
    "vm100_cs4_peer_visible_rc": 0,
    "vm100_cs5_peer_visible_rc": 1,
    "vm100_selector_active_entry_count": 4,
    "vm100_selector_conf_exists_rc": 0,
    "vm100_selector_cs4_present_rc": 0,
    "vm100_selector_cs5_any_present_rc": 1,
    "vm100_selector_cs5_exact_present_rc": 1,
    "vm100_wg_paid_peer_count": 4
  },
  "vm100_before": {
    "selector_active_lines": [
      "10.253.1.10 cs1 canary_vpn3",
      "10.253.1.11 cs2 canary_vpn4",
      "10.253.1.12 cs3 canary_vpn5",
      "10.253.1.13 cs4 canary_vpn1"
    ],
    "vm100_cs4_peer_visible_rc": 0,
    "vm100_cs5_peer_visible_rc": 1,
    "vm100_selector_active_entry_count": 4,
    "vm100_selector_conf_exists_rc": 0,
    "vm100_selector_cs4_present_rc": 0,
    "vm100_selector_cs5_any_present_rc": 1,
    "vm100_selector_cs5_exact_present_rc": 1,
    "vm100_wg_paid_peer_count": 4
  },
  "vm101": {
    "slots": {
      "vpn1": {
        "fwmark": "0x201",
        "interface_name": "vpn1",
        "label": "canary_vpn1",
        "selector_class": "cs4",
        "status": "healthy",
        "table_id": 201
      },
      "vpn2": {
        "fwmark": "0x202",
        "interface_name": "vpn2",
        "label": "canary_vpn2",
        "selector_class": "cs5",
        "status": "healthy",
        "table_id": 202
      },
      "vpn3": {
        "fwmark": "0x203",
        "interface_name": "vpn3",
        "label": "canary_vpn3",
        "selector_class": "cs1",
        "status": "healthy",
        "table_id": 203
      },
      "vpn4": {
        "fwmark": "0x204",
        "interface_name": "vpn4",
        "label": "canary_vpn4",
        "selector_class": "cs2",
        "status": "healthy",
        "table_id": 204
      },
      "vpn5": {
        "fwmark": "0x205",
        "interface_name": "vpn5",
        "label": "canary_vpn5",
        "selector_class": "cs3",
        "status": "healthy",
        "table_id": 205
      }
    },
    "vm101_slot_registry_exists_rc": 0,
    "vm101_status_json_parse_rc": 0,
    "vm101_status_run_rc": 0,
    "vm101_status_schema": "router-egress-slots-status-v1",
    "vm101_status_slot_count": 5,
    "vm101_status_tool_exists_rc": 0
  },
  "vm121": {
    "helper_exists_rc": 0,
    "helper_path": "/usr/local/sbin/wg-access-agent-selector-apply.py"
  }
}
