mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 16:01:14 +00:00
[AZ-960] render-map: dispatch --truth loader on extension (CSV+tlog)
load_ground_truth_track now dispatches on truth_path.suffix: - .csv → load_csv_ground_truth (AZ-894) - else (.tlog, .bin, no ext) → load_tlog_ground_truth (AZ-697) Removes the AZ-959 short-circuit in SubprocessReplayRunner. _maybe_render_map so CSV-path replay jobs ship with the same map.html artefact as tlog jobs. Both ground-truth DTOs expose row-aligned (lat_deg, lon_deg) records so the renderer needs no other changes. Touches: - src/gps_denied_onboard/cli/render_map.py: dispatch + source-agnostic tooltip + --truth CLI help expanded - src/gps_denied_onboard/replay_api/app.py: workaround removed, truth_path resolution picks whichever input was uploaded Tests: 44/44 green across test_az700_render_map.py + test_az701_replay_api.py: - 17 pre-existing render-map tests pass unchanged (AC-2) - New test_load_ground_truth_track_dispatches_to_csv_loader (AC-1) - New test_load_ground_truth_track_csv_propagates_schema_error (AC-4: malformed CSV raises ReplayInputAdapterError) - New test_cli_renders_map_with_csv_truth (AC-1 end-to-end) - AZ-959 test_post_replay_csv_path_returns_200... extended to assert map_html_url is now present (AC-3) Bookkeeping: AZ-960 spec moved todo/ → done/, dep-table preamble seventh bump documents the landing + AC coverage, state.md records batch 6 complete with AZ-961 as next. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -709,6 +709,12 @@ def test_post_replay_csv_path_returns_200_and_dispatches_imu_flag(
|
||||
body = response.json()
|
||||
assert body["state"] == JobState.DONE.value
|
||||
assert body["sync"] is True
|
||||
# AZ-960 AC-3: CSV-path jobs now expose a map_html_url
|
||||
# (the fake runner writes a map.html fixture that the registry
|
||||
# links into the snapshot).
|
||||
assert body.get("map_html_url", "").endswith("/map"), (
|
||||
f"expected map_html_url to point at /map; got body={body}"
|
||||
)
|
||||
# Runner saw the csv_path branch (tlog_path is None for csv jobs)
|
||||
assert len(fake_runner.calls) == 1
|
||||
inputs = fake_runner.calls[0]
|
||||
|
||||
Reference in New Issue
Block a user