{
  "article_slug": "why-navigationagent2d-lags-with-hundreds-of-units",
  "artifact": "Standalone Godot NavigationAgent2D repath-governor scheduler proof",
  "checks": [
    {
      "details": {
        "dispatched": [
          1,
          2
        ],
        "queue_depth_after": 3
      },
      "id": "budget_cap_holds_per_tick",
      "passed": true
    },
    {
      "details": {
        "queue_depth_after": 1,
        "scanned": 0
      },
      "id": "budget_zero_dispatches_nothing",
      "passed": true
    },
    {
      "details": {
        "dispatch_counts": [
          3,
          3,
          3,
          1
        ],
        "ticks": 4
      },
      "id": "queue_drains_in_ceiling_n_over_b_ticks",
      "passed": true
    },
    {
      "details": {
        "dispatch_order": [
          4,
          2,
          9
        ]
      },
      "id": "fifo_order_holds_within_same_priority",
      "passed": true
    },
    {
      "details": {
        "dispatch_order": [
          2
        ],
        "queue_depth_after": 1
      },
      "id": "higher_priority_preempts_lower",
      "passed": true
    },
    {
      "details": {
        "dispatch_order": [
          2,
          3,
          4,
          1
        ],
        "high_priority_burst": 3
      },
      "id": "lower_priority_eventually_runs_under_high_load",
      "passed": true
    },
    {
      "details": {
        "dispatch_revision": 2,
        "dispatched_tick": 13,
        "latest_request_tick": 12,
        "priority": 0,
        "query_result": {
          "revision": 2,
          "target": {
            "x": 8.0,
            "y": 3.0
          },
          "unit_id": 1
        },
        "reason": "GROUP_ORDER",
        "request_revision": 2,
        "requested_tick": 10,
        "target": {
          "x": 8.0,
          "y": 3.0
        },
        "unit_id": 1
      },
      "id": "duplicate_request_keeps_latest_target",
      "passed": true
    },
    {
      "details": {
        "dispatch_revision": 2,
        "dispatched_tick": 12,
        "latest_request_tick": 11,
        "priority": 1,
        "query_result": {
          "revision": 2,
          "target": {
            "x": 9.0,
            "y": 4.0
          },
          "unit_id": 1
        },
        "reason": "GROUP_ORDER",
        "request_revision": 2,
        "requested_tick": 10,
        "target": {
          "x": 9.0,
          "y": 4.0
        },
        "unit_id": 1
      },
      "id": "priority_promotion_keeps_latest_target",
      "passed": true
    },
    {
      "details": {
        "cancelled": true,
        "dispatch_order": [
          3
        ],
        "queue_depth_after": 0
      },
      "id": "cancelled_and_dead_units_are_skipped",
      "passed": true
    },
    {
      "details": {
        "queue_depth_after": 1,
        "scan_budget": 2,
        "scanned": 2
      },
      "id": "dead_entries_do_not_exceed_scan_budget",
      "passed": true
    },
    {
      "details": {
        "drift": 2.0,
        "reason": "",
        "threshold": 4.0
      },
      "id": "small_target_move_skips_repath",
      "passed": true
    },
    {
      "details": {
        "drift": 5.0,
        "reason": "TARGET_DRIFT",
        "threshold": 4.0
      },
      "id": "large_target_move_triggers_repath",
      "passed": true
    },
    {
      "details": {
        "next_repath_tick": 10,
        "now_tick": 10,
        "reason": "PERIODIC_REFRESH"
      },
      "id": "time_threshold_forces_periodic_repath",
      "passed": true
    },
    {
      "details": {
        "distances": [
          0,
          5,
          10,
          15,
          20
        ],
        "intervals": [
          2,
          4,
          6,
          8,
          10
        ]
      },
      "id": "distance_scaled_interval_is_monotonic",
      "passed": true
    },
    {
      "details": {
        "arrived": true,
        "reason": ""
      },
      "id": "arrival_freeze_stops_repaths",
      "passed": true
    },
    {
      "details": {
        "dispatch_revision": 5,
        "observed_revision": 5,
        "request_revision": 3
      },
      "id": "dispatch_uses_current_map_revision",
      "passed": true
    },
    {
      "details": {
        "direct_path": [
          {
            "x": 0,
            "y": 2
          },
          {
            "x": 1,
            "y": 2
          },
          {
            "x": 1,
            "y": 1
          },
          {
            "x": 1,
            "y": 0
          },
          {
            "x": 2,
            "y": 0
          },
          {
            "x": 3,
            "y": 0
          },
          {
            "x": 4,
            "y": 0
          },
          {
            "x": 4,
            "y": 1
          },
          {
            "x": 5,
            "y": 1
          },
          {
            "x": 5,
            "y": 2
          }
        ],
        "governed_path": [
          {
            "x": 0,
            "y": 2
          },
          {
            "x": 1,
            "y": 2
          },
          {
            "x": 1,
            "y": 1
          },
          {
            "x": 1,
            "y": 0
          },
          {
            "x": 2,
            "y": 0
          },
          {
            "x": 3,
            "y": 0
          },
          {
            "x": 4,
            "y": 0
          },
          {
            "x": 4,
            "y": 1
          },
          {
            "x": 5,
            "y": 1
          },
          {
            "x": 5,
            "y": 2
          }
        ],
        "map_revision": 7,
        "start": {
          "x": 0,
          "y": 2
        },
        "target": {
          "x": 5,
          "y": 2
        }
      },
      "id": "governed_matches_direct_query_on_same_snapshot",
      "passed": true
    },
    {
      "details": {
        "dispatch_order": [
          1,
          2,
          3,
          4,
          5,
          6
        ]
      },
      "id": "head_cursor_compaction_preserves_order",
      "passed": true
    },
    {
      "details": {
        "all_queries_returned_paths": true,
        "closest_goal": {
          "x": 1080.0,
          "y": 360.0
        },
        "closest_start": {
          "x": 120.0,
          "y": 360.0
        },
        "direct_path_point_count": 2,
        "dispatch_counts": [
          3,
          3,
          3,
          1
        ],
        "dispatch_order": [
          3,
          7,
          1,
          2,
          4,
          5,
          6,
          8,
          9,
          10
        ],
        "logical_request_count": 10,
        "map_iteration_id": 1,
        "map_region_count": 1,
        "max_queries_in_one_tick": 3,
        "navigation_agent_next_position": {
          "x": 1080.0,
          "y": 359.999969482422
        },
        "navigation_agent_path_point_count": 2,
        "navigation_polygon_count": 1,
        "navigation_vertex_count": 4,
        "query_path_points": [
          2,
          2,
          2,
          2,
          2,
          2,
          2,
          2,
          2,
          2
        ],
        "queue_depth_after": 0,
        "ready": true,
        "waited_physics_frames": 2
      },
      "id": "runnable_navigation_scene_smoke",
      "passed": true
    },
    {
      "id": "packaged_project_rerun_matches_named_checks",
      "passed": true,
      "details": {
        "extracted_check_count": 19,
        "check_ids_match_workspace": true,
        "scene_smoke_passed": true,
        "engine": "4.7-stable (official)"
      }
    }
  ],
  "engine": {
    "build": "official",
    "hash": "5b4e0cb0fd279832bbdd69fed5354d4e5ad26f88",
    "hex": 263936,
    "major": 4,
    "minor": 7,
    "patch": 0,
    "status": "stable",
    "string": "4.7-stable (official)",
    "timestamp": 0
  },
  "failed": [],
  "failed_count": 0,
  "measurement_scope": "Scheduler correctness and scene integration only. No timing, FPS, throughput, or unit-count claim.",
  "passed": true,
  "passed_count": 20,
  "proof_boundary": {
    "engine_behavior": "Godot target_position, path_max_distance, path_changed, avoidance, and thread behavior remain sourced from the official Godot 4.7 documentation rather than inferred from this harness.",
    "off_path_reason": "NavigationAgent2D path_changed has no reason payload. PROBABLE_OFF_PATH remains an application-side inference and is not claimed by this receipt.",
    "performance": "No elapsed-time or frame-rate result is published. Count budgets shape work but do not guarantee a frame-time budget.",
    "product_scope": "This standalone article artifact is not a claim about a released PathForge product API.",
    "threading": "Worker-thread query architecture, SceneTree handoff, cancellation, and stale-result ownership are outside this artifact.",
    "verified_here": "The request governor, policy helpers, a real NavigationServer2D map query, and a NavigationAgent2D scene smoke."
  },
  "scene_smoke": {
    "details": {
      "all_queries_returned_paths": true,
      "closest_goal": {
        "x": 1080.0,
        "y": 360.0
      },
      "closest_start": {
        "x": 120.0,
        "y": 360.0
      },
      "direct_path_point_count": 2,
      "dispatch_counts": [
        3,
        3,
        3,
        1
      ],
      "dispatch_order": [
        3,
        7,
        1,
        2,
        4,
        5,
        6,
        8,
        9,
        10
      ],
      "logical_request_count": 10,
      "map_iteration_id": 1,
      "map_region_count": 1,
      "max_queries_in_one_tick": 3,
      "navigation_agent_next_position": {
        "x": 1080.0,
        "y": 359.999969482422
      },
      "navigation_agent_path_point_count": 2,
      "navigation_polygon_count": 1,
      "navigation_vertex_count": 4,
      "query_path_points": [
        2,
        2,
        2,
        2,
        2,
        2,
        2,
        2,
        2,
        2
      ],
      "queue_depth_after": 0,
      "ready": true,
      "waited_physics_frames": 2
    },
    "id": "runnable_navigation_scene_smoke",
    "passed": true
  },
  "scheduler_contract": {
    "budget": "At most queries_per_tick live queries dispatch per drain call.",
    "cleanup": "Queue inspection is separately bounded by max_entries_scanned_per_tick.",
    "coalescing": "A pending unit keeps one request and receives the latest target.",
    "liveness": "Cancelled or dead units never reach the query callback.",
    "map_state": "The query callback receives the current dispatch revision; route equality is claimed only on an identical start, target, and map snapshot.",
    "priorities": "High priority preempts normal, with a bounded high-priority burst so normal requests cannot starve.",
    "repath_policy": "Arrival freeze, target-drift threshold, periodic refresh, and monotonic distance-scaled intervals are deterministic policy checks."
  },
  "verified_at": "2026-07-15T07:29:44",
  "published_files": {
    "source_zip": {
      "path": "/downloads/pathforge/why-navigationagent2d-lags-with-hundreds-of-units-source.zip",
      "bytes": 11641,
      "sha256": "5c58b4a53df42cf9b8aa81a0a75758bc64656435344fc0d44db36e92e6f94bef"
    },
    "governor_source": {
      "path_in_zip": "scripts/articles/repath_governor.gd",
      "sha256": "d1a0df1a8673b370b0f6970e217c6245c5769c01b3a4f5366dbe8118f8dabe32"
    },
    "demo_source": {
      "path_in_zip": "scripts/articles/repath_governor_demo.gd",
      "sha256": "92f5bb2f10e2c57b8b3aaa9ac4a3afe3b2d5cf671d6fab0e96d1d01af546ddd3"
    },
    "verifier_source": {
      "path_in_zip": "tools/verify_repath_governor.gd",
      "sha256": "6a338fc974b9074b33e000ef44bf6f256088ba3783eb83cde75054e79370406a"
    }
  },
  "extracted_package_rerun": {
    "passed": true,
    "workspace_check_count": 19,
    "published_check_count": 20,
    "check_ids_match_workspace": true,
    "scene_smoke_passed": true,
    "engine": "4.7-stable (official)"
  }
}
