Classical Navigation source audit — 2026-10-25

Source: /home/jerry/Code/Autonomy-Stack/Classical-Navigation
Reviewed HEAD: 01cfadceebcf5a468449a8eacd2b61d1653e3473
Baseline: 6b19d031ad9570c7d6d550ddd8c98d0c2820e6fd
Algorithm/configuration/test revision: 3d493e4. The later commits add
documentation, README media, and materials tooling. The working tree was clean.

Instructions read: parent AGENTS.md and docs/agents/domain.md,
docs/agents/issue-tracker.md, docs/agents/triage-labels.md; source README and
docs/algorithm-comparison.md; project-materials README and classical-navigation
README. No applicable CONTEXT-MAP.md or ADR directories were present.

Verification
------------
The complete existing Python suite passed: 64 passed in 4.80s.
Docker image: classical-navigation-lab:latest
Image ID: sha256:eab62b3c1c05f38759396aba6c7d6bbc8c9276126de8c37c94d25288ce23248d
Command:
docker run --rm --network none -e PYTHONDONTWRITEBYTECODE=1 -e MPLBACKEND=Agg -v /home/jerry/Code/Autonomy-Stack/Classical-Navigation:/workspace:ro -w /workspace classical-navigation-lab:latest pytest -p no:cacheprovider

Source was mounted read-only; no source edits were made. The command avoids
bytecode and pytest cache writes in the source tree.

Changes verified against baseline
---------------------------------
- Five selectable navigation layers and combined MPC already existed. The
  update improves internal algorithms and integration without adding layers.
- Current-estimating EKF: marine_nav/estimation/ekf.py:10,44,89. Six joint
  covariance states; public vessel state remains [east,north,heading,speed].
  Current is not supplied to MPC or other controllers as feedforward.
- D* Lite numeric repair: marine_nav/planning/dstar_lite.py:17. Shrinking the
  octile heuristic avoids premature termination from floating-point key ties.
  Integrated changes rasterize before/after inflated environments and preserve
  overlapping static occupancy: marine_nav/demos/integrated.py:109.
  Regression references: tests/test_dstar_lite.py:71,91.
- Margin recovery: marine_nav/environment.py:42; marine_nav/planning/apf.py:55,149.
  Shared segment checks permit outward/tangential movement from inside a
  planning margin; APF projects away inward direction components. RRT* uses
  these same geometric checks. tests/test_integrated_demo.py:29 checks a
  current-driven margin incursion.
- MPC: marine_nav/mpc/solver.py:73,130,180,210 caches parameterized CasADi NLPs
  by obstacle count, shifts control guesses, and introduces finite L1 slack
  penalties. marine_nav/mpc/reference.py:12 begins the reference at a segment
  projection instead of a nearest vertex. Tests: tests/test_mpc.py:73,84,99.
- RRT*: marine_nav/planning/rrt_star.py:56,66,123 uses vectorized searches and
  maintained child lists for rewiring cost propagation. Cached local plans
  advance their time origin: marine_nav/planning/short_horizon_rrt_star.py:55
  and marine_nav/contracts.py:209. Shipped RRT* wall-clock cutoffs were removed.

Scope and measurement qualifications
------------------------------------
- MPC still predicts direct yaw-rate actuation without current or actuator
  lag: marine_nav/mpc/model.py:9. Soft penalties, sampled constraints and
  fallback control do not guarantee physical clearance or global optimality.
- Goal completion uses estimated position: marine_nav/demos/integrated.py:205.
- result.times[-1] labels the start of the last executed step; terminal replay
  time is one timestep later: marine_nav/demos/integrated.py:354,364.
- result.minimum_clearance considers original static scenario circles only:
  marine_nav/demos/integrated.py:391. Replay frame clearance considers the
  active environment: marine_nav/demos/telemetry.py:49.
- The 108-run sweep counts sampled static-circle overlaps, because it uses
  result.minimum_clearance: tools/materials/collect_robustness.py:31. It does
  not establish continuous swept-hull or dynamic-cell collision freedom.
- D* correctness cases differ between revisions because generated blocks
  depend on each produced route: tools/materials/collect_perf.py:75. The 638
  old and 668 updated repairs are not one paired identical set. The collector
  checks reachability agreement and whether reported grid path cost exceeds
  Dijkstra's cost.
- MPC timing averages ten warm calls per horizon, with one warm-up call:
  tools/materials/collect_perf.py:29. Old/new differ in constraint formulation
  and path reference as well as implementation; this is not an isolated cache
  optimization benchmark. RRT* timing uses 2000 iterations without a time cap.
- EKF comparison pools per-step squared position errors over four closed-loop
  runs per current. Each filter drives its own trajectory, not a fixed shared
  measurement sequence: tools/materials/collect_ekf.py:33.
- Trajectory MPC uses zero current, 1.2 m/s requested speed and 0.1 s yaw lag:
  config/mpc_trajectory.yaml:3. Seven-profile timing is not an equal-condition
  algorithm ranking.
- MPC profiles retain CPU-time limits of 0.2–0.5 seconds. Reproduction observed
  in one image/workstation should not be generalized to universal determinism.
- 'Escaping margin' is a telemetry label based on estimated position inside a
  planning margin and planner status, not a measured guarantee of outward
  actual motion: marine_nav/demos/integrated.py:240,263,298.

Portfolio review notes
----------------------
The new templates correctly replace the old 46-test count, October 4 profile
results, and 11-braking-step D* behavior. The new current sweep and repair
benchmarks supersede the old statement that repeated seed evaluation remains
entirely future work. The supplied new footage plays at 3.6x simulation time.

Small wording corrections identified in review: call the three displayed D*
routes 'three route versions (initial plus two repairs)', not 'three route
revisions'; define 'Escaping margin' as an estimated-position/status label,
without claiming it verifies an outward path for every supported planner.
