{
  "schema": "router-step-inline-diagnostic-v6",
  "step": "STEP_050M07C3_SALVAGE_BOOTSTRAP_AND_FRESH_REFRESH_LIVE_STREAM",
  "failure": {
    "reason": "HMN_CODE_OR_LIVE_PRECHECK_FAILED",
    "rc": 1,
    "line": 1856,
    "stage": "03/09",
    "last_success": "all_remote_scripts_published"
  },
  "command_results": {
    "hash_check_rc": "0",
    "precheck_rc": "1",
    "vm101_rc": "NOT_RUN",
    "postcheck_rc": "NOT_RUN",
    "rollback_rc": "NOT_NEEDED",
    "plan_restore_rc": "NOT_NEEDED"
  },
  "automatic_classification": "HMN_CODE_TEST_FAILED",
  "production_modified_after_rollback": "false",
  "live_streaming": {
    "runner_stdout": true,
    "runner_stderr": true,
    "emergency_log": true,
    "heartbeat_seconds": 15
  },
  "captured_streams": {
    "vm101-precheck.txt": {
      "size_bytes": 3312,
      "tail": "__FACT__ commit_raw=1\n__FACT__ hook_running=true\n__FACT__ hook_enabled=true\n__FACT__ watcher_running=true\n__FACT__ watcher_enabled=true\n__FACT__ emergency_lock_present=false\n__FACT__ refresh_lock_present=false\n__FACT__ strict.vpn1=true\n__FACT__ strict.vpn2=true\n__FACT__ strict.vpn3=true\n__FACT__ strict.vpn4=true\n__FACT__ strict.vpn5=true\n__FACT__ strict_all=true\n__FACT__ healthy_vpn_slots=5\n__FACT__ active_bootstrap_iface=UNRESOLVED\n__FACT__ active_bootstrap_strict=false\n__BLOCK_BEGIN__ table_200\n10.200.0.0/24 dev eth1 scope link src 10.200.0.2 \n10.201.0.0/24 dev eth3 scope link src 10.201.0.2 \n__BLOCK_END__ table_200\n__FACT__ route.201=true\n__FACT__ route.202=true\n__FACT__ route.203=true\n__FACT__ route.204=true\n__FACT__ route.205=true\n__FACT__ routes_all=true\n__JSON_BEGIN__ runner\n{\n  \"schema\": \"router-egress-emergency-refresh-v1\",\n  \"mode\": \"dry-run\",\n  \"decision\": \"would_run_emergency_refresh\",\n  \"reason\": \"threshold_or_force_reached_no_commit_in_dry_run\",\n  \"daily_fail_count\": 12,\n  \"daily_fail_threshold\": 5,\n  \"threshold_reached\": true,\n  \"force\": false,\n  \"cooldown_seconds\": 600,\n  \"cooldown_remaining\": 0,\n  \"healthy_vpn_slots\": 5,\n  \"commit_enabled\": true,\n  \"direct_failopen_enabled\": false,\n  \"direct_failopen_action\": \"disabled_not_allowed_in_step050f\",\n  \"helper_ok\": true,\n  \"refresh_cmd\": \"/root/hmn/hmn-refresh-pool-safe.sh\",\n  \"refresh_cmd_exists\": true,\n  \"planner_cmd\": \"/usr/local/sbin/router-egress-hmn-plan-top5.sh\",\n  \"planner_cmd_exists\": true,\n  \"rebalance_apply_cmd\": \"/usr/local/sbin/router-egress-hmn-rebalance-top5-apply.sh\",\n  \"rebalance_apply_cmd_exists\": true,\n  \"watcher_cmd\": \"/usr/local/sbin/router-egress-health-repair-watch.sh\",\n  \"watcher_cmd_exists\": true,\n  \"last_emergency_refresh_status\": \"NONE\",\n  \"last_emergency_refresh_epoch\": 0\n}\n__JSON_END__ runner\n__JSON_BEGIN__ planner\n{\n  \"schema\": \"router-egress-hmn-plan-top5-v2\",\n  \"decision\": \"plan_ok\",\n  \"pool\": \"/root/hmn/cache/ok-awg1-strict-foreign-latest.tsv\",\n  \"pool_mtime_epoch\": 1783702742,\n  \"quarantine_enabled\": true,\n  \"quarantine_excluded_count\": 4,\n  \"duplicate_excluded_count\": 0,\n  \"desired_count\": 5,\n  \"changes_count\": 3,\n  \"plan\": [\n    {\"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\"}\n    ,\n    {\"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\"}\n    ,\n    {\"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\"}\n    ,\n    {\"slot\":\"egress4\",\"iface\":\"vpn4\",\"current\":\"178.215.227.13:44408\",\"target\":\"192.71.244.202:45735\",\"change\":true,\"target_rank\":\"8\",\"target_avg_ms\":\"66.349\"}\n    ,\n    {\"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\"}\n  ]\n}\n__JSON_END__ planner\n__FACT__ code_test_rc=1\n__FACT__ code_test_size=158\n__BLOCK_BEGIN__ code_test_sanitized_summary\nERROR: не нашёл active VPN interface в table 200.\n__BLOCK_END__ code_test_sanitized_summary\n__FACT__ code_test_accepted=false\n__FACT__ code_test_parser_salvaged=false\n__FACT__ production_modified=false\n"
    },
    "vm101-tool-hash-check.txt": {
      "size_bytes": 2347,
      "tail": "__HASH__ match=true missing=false expected=d48c41014ff94cbecd6dd8a2f543b5a08c797d226c3e745756a2787340d57151 actual=d48c41014ff94cbecd6dd8a2f543b5a08c797d226c3e745756a2787340d57151 path=/usr/local/sbin/router-egress-health-repair-watch.sh\n__HASH__ match=true missing=false expected=258ef9daf0b3f8aaf2960025e6d4d7f0c1ae30cede781badfbd6b3919ea25afc actual=258ef9daf0b3f8aaf2960025e6d4d7f0c1ae30cede781badfbd6b3919ea25afc path=/usr/local/sbin/router-egress-emergency-decision-hook.sh\n__HASH__ match=true missing=false expected=bea82c260ba6006b524ef01c614848097bd231fa6d49a725baded99046fe5d11 actual=bea82c260ba6006b524ef01c614848097bd231fa6d49a725baded99046fe5d11 path=/usr/local/sbin/router-egress-emergency-refresh.sh\n__HASH__ match=true missing=false expected=6ec99e157235d811d6f0f3ab92de7f3371dc813f2478a654358982cda7ce34ce actual=6ec99e157235d811d6f0f3ab92de7f3371dc813f2478a654358982cda7ce34ce path=/usr/local/sbin/router-egress-hmn-plan-top5.sh\n__HASH__ match=true missing=false expected=2fa6b725c5e123b7fdc3dd14747058a02415d025231054c7537d72b8edc2346f actual=2fa6b725c5e123b7fdc3dd14747058a02415d025231054c7537d72b8edc2346f path=/usr/local/sbin/router-egress-hmn-rebalance-top5-apply.sh\n__HASH__ match=true missing=false expected=9a546c2958c9fd44c927af3559966d1aa0ceb7a5e20f2373c7a95a31728dd0c0 actual=9a546c2958c9fd44c927af3559966d1aa0ceb7a5e20f2373c7a95a31728dd0c0 path=/usr/local/lib/router-egress-recovery-state.sh\n__HASH__ match=true missing=false expected=bb047e820196c4c5cb263499ed890c782190293257a2033568015c6b19230682 actual=bb047e820196c4c5cb263499ed890c782190293257a2033568015c6b19230682 path=/root/hmn/hmn-refresh-pool-safe.sh\n__HASH__ match=true missing=false expected=195a8450fa333a50ae209be25f823873d475989bdbce1a824a86268d36c9e942 actual=195a8450fa333a50ae209be25f823873d475989bdbce1a824a86268d36c9e942 path=/etc/init.d/router-egress-health-repair\n__HASH__ match=true missing=false expected=152fa0d45cb57ac60d34529ef0b29d32e65a2ad03845129fd7c2b41eaf787934 actual=152fa0d45cb57ac60d34529ef0b29d32e65a2ad03845129fd7c2b41eaf787934 path=/etc/init.d/router-egress-emergency-decision\n__HASH__ match=true missing=false expected=42ba3c0b10d8535d4100cc4e35e02bc2c0f3fe104bdedf8cf91700832d9051a8 actual=42ba3c0b10d8535d4100cc4e35e02bc2c0f3fe104bdedf8cf91700832d9051a8 path=/etc/init.d/router-egress-slots\n__SUMMARY__ checked=10 errors=0\n"
    },
    "vm101-precheck.stderr": {
      "size_bytes": 115,
      "tail": "Warning: Permanently added '10.71.100.2' (ED25519) to the list of known hosts.\nawk: cmd. line:4: Unexpected token\n"
    },
    "vm101-tool-hash-check.stderr": {
      "size_bytes": 80,
      "tail": "Warning: Permanently added '10.71.100.2' (ED25519) to the list of known hosts.\n"
    }
  },
  "recommended_next_step": "Использовать automatic_classification и уже сохранённые live stdout/stderr. Отдельный диагностический STEP не требуется."
}
