{
  "apply_preview_summary": {
    "action_count": 0,
    "mode": "apply-preview-no-write",
    "would_create_jobs": 0,
    "would_update_lease_rows": 0
  },
  "assessment": {
    "all_ok": true,
    "blockers": [],
    "decision": "PASS_STEP_046C_AGENT_PEER_EGRESS_REASSIGN_DRYRUN_HANDLER_IMPLEMENT",
    "expected_absence": {
      "activity_eval_written_to_db": false,
      "apply_preview_wrote_db": false,
      "client_config_published": false,
      "handler_hooked_production_service": false,
      "handler_job_status_changed": false,
      "handler_wrote_db": false,
      "jobs_created": false,
      "manual_agent_service_start_used": false,
      "new_traffic_delta_seen": false,
      "peer_id_null_in_rows": false,
      "private_material_published": false,
      "production_agent_service_changed": false,
      "real_apply_enabled": false,
      "rebalancer_applied": false,
      "selector_changed": false,
      "timer_disabled": false,
      "vm100_changed": false,
      "vm101_changed": false,
      "vm121_db_changed": false,
      "wg_peer_runtime_changed": false
    },
    "success_checks": {
      "apply_preview_no_write_mode": true,
      "apply_preview_ok": true,
      "apply_preview_zero_actions": true,
      "apply_preview_zero_jobs": true,
      "apply_preview_zero_updates": true,
      "core_executable": true,
      "db_active_one": true,
      "db_enabled_peers_five": true,
      "db_forced_zero": true,
      "db_idle_four": true,
      "db_lease_rows_five": true,
      "db_pending_zero": true,
      "dryrun_action_count_zero": true,
      "dryrun_mode": true,
      "dryrun_noop_expected": true,
      "dryrun_ok": true,
      "dryrun_rows_all_have_peer_id": true,
      "handler_action_recognized": true,
      "handler_executable_seen": true,
      "handler_help_seen": true,
      "handler_install_ok": true,
      "handler_mode_dryrun": true,
      "handler_no_client_config": true,
      "handler_no_private_material_required": true,
      "handler_no_vm101_change": true,
      "handler_no_wg_key_change": true,
      "handler_node_id_matches": true,
      "handler_peer_id_present": true,
      "handler_peer_idle": true,
      "handler_peer_not_forced": true,
      "handler_plans_selector_change_only": true,
      "handler_sha_seen": true,
      "handler_synthetic_dryrun_ok": true,
      "handler_target_change_valid": true,
      "handler_validation_all_ok": true,
      "help_mentions_apply_preview": true,
      "post_timer_enabled_active": true,
      "pre_state_collected": true,
      "pre_timer_enabled_active": true,
      "public_index_rebuilt": true,
      "public_report_created": true,
      "real_apply_refused": true,
      "sampler_executable": true,
      "sampler_post_active_by_new_delta_zero": true,
      "sampler_post_ok": true,
      "sampler_post_rows_five": true,
      "sampler_post_selector_match_five": true,
      "sampler_post_zero_delta_rows_five": true,
      "vm100_allowed_ip_count_five": true,
      "vm100_peer_count_five": true,
      "vm100_runtime_collected": true,
      "vm100_uci_peer_sections_zero": true,
      "vm101_cs1_to_vpn3_seen": true,
      "vm101_cs2_to_vpn4_seen": true,
      "vm101_cs3_to_vpn5_seen": true,
      "vm101_cs4_to_vpn1_seen": true,
      "vm101_cs5_to_vpn2_seen": true,
      "vm101_slot_map_collected": true,
      "wrapper_executable": true
    },
    "warnings": [
      "STEP_046C installs a standalone dry-run handler only; it is not wired into production wg-access-agent.service.",
      "Handler validates peer_egress_reassign job shape and emits selector/DB/job marking previews without writes.",
      "Real --apply remains refused and no DB/jobs/selector/WG runtime changes are performed."
    ]
  },
  "changes": {
    "jobs_created": "NO",
    "manual_agent_service_start_used": "NO",
    "private_material_published": "NO",
    "production_agent_service_changed": "NO",
    "router_ops_changed": "NO",
    "selector_changed": "NO",
    "vm100_changed": "NO",
    "vm101_changed": "NO",
    "vm121_agent_dryrun_handler_installed": "YES_STANDALONE_ONLY",
    "vm121_db_changed": "NO",
    "wg_peer_runtime_changed": "NO"
  },
  "db_summary": {
    "active_leases": 1,
    "enabled_peers": 5,
    "forced_leases": 0,
    "idle_leases": 4,
    "lease_rows": 5,
    "pending_jobs": 0
  },
  "dryrun_summary": {
    "action_count": 0,
    "active_count": 1,
    "blocked": false,
    "forced_count": 0,
    "idle_count": 4,
    "lease_rows": 5,
    "noop": true,
    "selector_match_count": 5,
    "slot_seen_count": 5,
    "target_count": 5
  },
  "handler": {
    "handler_version": "step046c-v1",
    "mode": "dryrun-no-write",
    "path": "/opt/wg-access/agent/wg_access_peer_egress_reassign_dryrun.py",
    "planned": {
      "db_update_preview": {
        "peer_id": "a3cbe3b5-8416-4847-b5ee-21f42359b465",
        "preserve_activity_baselines": true,
        "set_assignment_source": "rebalancer",
        "set_egress_class": "cs2",
        "set_reason": "rebalancer_idle_reassign",
        "set_target_id": "cs2_vpn4",
        "would_update_peer_egress_leases": true
      },
      "explicit_non_changes": {
        "would_not_add_or_remove_wg_peer": true,
        "would_not_change_wg_keys": true,
        "would_not_publish_client_config": true,
        "would_not_recreate_wg_paid": true,
        "would_not_touch_vm101_slots": true
      },
      "job_marking_preview": {
        "would_increment_attempts": true,
        "would_set_completed_at_on_success": true,
        "would_set_started_at": true,
        "would_store_last_error_on_failure": true
      },
      "scope": "dry-run only: one peer egress selector reassignment",
      "selector_update_preview": {
        "from_line_prefix": "10.253.1.12 cs3",
        "replace_entry_for_tunnel_ip": "10.253.1.12",
        "selector_file": "/etc/router-wgpay-selector.d/peers.conf",
        "to_line_prefix": "10.253.1.12 cs2",
        "would_edit_vm100_selector_file": true,
        "would_run_existing_selector_apply_path": true
      }
    },
    "validation": {
      "action_is_peer_egress_reassign": true,
      "all_ok": true,
      "attempts_is_zero": true,
      "db_current_class_matches_from": true,
      "db_current_target_matches_from": true,
      "db_node_id_matches": true,
      "db_peer_enabled": true,
      "db_peer_found": true,
      "db_peer_is_idle": true,
      "db_peer_not_forced": true,
      "db_pending_jobs_zero": true,
      "db_tunnel_ip_matches": true,
      "from_target_exists": true,
      "node_id_present": true,
      "payload_forbidden_keys_absent": true,
      "payload_has_class_change": true,
      "payload_has_target_change": true,
      "payload_has_tunnel_ip": true,
      "payload_rebalancer_true": true,
      "payload_required_keys_present": true,
      "peer_id_present": true,
      "peer_id_uuid_like": true,
      "status_is_pending": true,
      "to_target_class_matches_payload": true,
      "to_target_exists": true
    }
  },
  "mode": "INSTALL_STANDALONE_DRYRUN_HANDLER_FOR_PEER_EGRESS_REASSIGN_NO_SERVICE_HOOK",
  "publish": {
    "local_report": "http://127.0.0.1:8099/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260709-213403_step046c_agent_peer_egress_reassign_dryrun_handler_implement/",
    "public_index_rebuilt": true,
    "trycf_report": "https://helena-background-beam-harry.trycloudflare.com/r/e94a0859747d7b96f29c7fdafc2d0351ba603bb0a7e9e5a4/20260709-213403_step046c_agent_peer_egress_reassign_dryrun_handler_implement/"
  },
  "sampler_post_summary": {
    "active_by_new_delta_count": 0,
    "rows": 5,
    "rows_with_selector_match": 5,
    "rows_with_zero_delta": 5
  },
  "schema": "router-step-facts-v1",
  "step": "STEP_046C_AGENT_PEER_EGRESS_REASSIGN_DRYRUN_HANDLER_IMPLEMENT"
}
