{
  "action": "append",
  "apply_performed": false,
  "contract_valid": true,
  "error_count": 0,
  "errors": [],
  "exact_line": "10.253.1.14 cs5 canary_vpn2",
  "idempotent_noop": false,
  "mode": "remote-dry-run",
  "payload_summary": {
    "fwmark": "0x202",
    "interface_name": "vpn2",
    "manager_id": "hmn_pool",
    "provider_type": "hmn_amneziawg",
    "selector_class": "cs5",
    "selector_label": "canary_vpn2",
    "slot_code": "vpn2",
    "table_id": 202,
    "tunnel_ip": "10.253.1.14"
  },
  "remote_commands_executed": false,
  "remote_script": "#!/bin/sh\nset -u\n\nCONF=/etc/router-wgpay-selector.d/peers.conf\nSERVICE=router-wgpay-canary\nLINE='10.253.1.14 cs5 canary_vpn2'\nTUNNEL_IP=10.253.1.14\nSELECTOR_CLASS=cs5\nBACKUP=\"/root/peers.conf.before-agent-selector-apply-$(date +%Y%m%d-%H%M%S)\"\nROLLBACK=\"/root/rollback-agent-selector-apply.sh\"\n\necho \"remote_script_schema=wg-access-agent-selector-remote-script-v3\"\necho \"remote_script_action=append\"\n\ntest -f \"$CONF\"\n\ncp \"$CONF\" \"$BACKUP\"\necho \"selector_backup_path=$BACKUP\"\n\ncat > \"$ROLLBACK\" <<RB\n#!/bin/sh\nset -u\ncp \"$BACKUP\" \"$CONF\"\n/etc/init.d/$SERVICE start\nRB\nchmod 700 \"$ROLLBACK\"\necho \"rollback_path=$ROLLBACK\"\n\n\nif grep -Fxq \"$LINE\" \"$CONF\"; then\n  echo \"selector_apply_action=noop_already_present\"\nelse\n  printf '%s\\n' \"$LINE\" >> \"$CONF\"\n  echo \"selector_apply_action=append\"\nfi\n\n\n/etc/init.d/$SERVICE start\n\ngrep -Fxq \"$LINE\" \"$CONF\"\n/etc/init.d/$SERVICE enabled >/dev/null 2>&1\nnft -a list ruleset 2>/dev/null | grep -q \"$TUNNEL_IP.*$SELECTOR_CLASS\"\n\necho \"postcheck_selector_line_present=YES\"\necho \"postcheck_selector_service_enabled=YES\"\necho \"postcheck_nft_rule_visible=YES\"\n",
  "remote_script_contains_actual_backup_rollback": true,
  "remote_script_contains_bad_etc_initd_quoted_service": false,
  "remote_script_contains_clean_service_start": true,
  "remote_script_contains_placeholder_backup": false,
  "remote_script_contains_runtime_backup_date": true,
  "remote_script_executed": false,
  "remote_script_line_count": 46,
  "remote_script_model": "single_shell_script",
  "remote_script_sha256": "a26e23bd3d2d63e93017ed1e1ca0b27ba6329ee1143d39f3175c63d8078e8ae1",
  "requires_wg_peer_before_real_apply": true,
  "schema": "wg-access-agent-selector-remote-plan-v3",
  "selector_plan": {
    "action": "append",
    "apply_performed": false,
    "contract_valid": true,
    "errors": [],
    "exact_line": "10.253.1.14 cs5 canary_vpn2",
    "exact_present": false,
    "idempotent_noop": false,
    "mode": "dry-run",
    "payload_summary": {
      "fwmark": "0x202",
      "interface_name": "vpn2",
      "manager_id": "hmn_pool",
      "peer_id": "9898db52-e3cf-41fd-9bc6-a3f31ea601ec",
      "provider_type": "hmn_amneziawg",
      "selector_class": "cs5",
      "selector_label": "canary_vpn2",
      "slot_code": "vpn2",
      "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
  },
  "selector_plan_rc": 0,
  "target": {
    "host": "10.71.100.1",
    "name": "vm100",
    "selector_conf": "/etc/router-wgpay-selector.d/peers.conf",
    "selector_service": "router-wgpay-canary"
  },
  "would_append": true
}
