mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-21 07:01:14 +00:00
[AZ-960] [AZ-961] File AZ-959 follow-up tickets as cycle-4 todo/ items
Per user 2026-05-29 directive ("File AZ-960 + AZ-961 and continue
with one of them next"), the two deferred items surfaced during
AZ-959 implementation are now tracked:
- AZ-960 (2pt, todo/): render-map --truth dispatch on extension so
CSV-path replay jobs ship with a map link. Removes the AZ-959
short-circuit in _maybe_render_map. Deps: AZ-700 + AZ-894 + AZ-959.
- AZ-961 (1pt, todo/): ReportContext.tlog_path → ground_truth_path
rename + label fix in rendered report so CSV runs stop saying
"Tlog: <csv_path>". Deps: AZ-699 + AZ-959.
Sequencing: AZ-960 next (closes the UX gap), AZ-961 after to avoid
re-conflict on _maybe_render_report kwargs.
Touches: 2 local spec files in todo/, dep-table preamble sixth bump
narrative, state.md batch detail update.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,54 @@
|
|||||||
|
# render_map: dispatch --truth loader on extension to unblock CSV-path map render
|
||||||
|
|
||||||
|
**Task**: AZ-960_render_map_csv_truth_dispatch
|
||||||
|
**Name**: Extend `gps-denied-render-map` so `--truth` accepts AZ-896 CSV in addition to binary tlog; remove the AZ-959 workaround
|
||||||
|
**Description**: AZ-959 landed CSV-path support in the `replay_api` `POST /replay` endpoint but `gps-denied-render-map` still only consumes binary tlog as ground truth. As a workaround AZ-959 made `SubprocessReplayRunner._maybe_render_map` short-circuit to `None` for CSV-path jobs — that means the AZ-897 UI (in `../ui`) currently shows no map for CSV uploads. This ticket closes the gap by dispatching on the `--truth` file extension and removing the workaround.
|
||||||
|
**Complexity**: 2 SP
|
||||||
|
**Dependencies**: AZ-700 (existing render-map CLI, done), AZ-894 (CSV ground-truth loader, done), AZ-959 (replay_api CSV path that carries the current workaround, done)
|
||||||
|
**Blocks**: (none — UX completeness, not a hard blocker)
|
||||||
|
**Component**: cli/render_map + replay_api/app (workaround removal)
|
||||||
|
**Tracker**: AZ-960 (https://denyspopov.atlassian.net/browse/AZ-960)
|
||||||
|
**Parent Epic**: (none — cycle-4 replay UX follow-up to AZ-959)
|
||||||
|
|
||||||
|
Jira AZ-960 is the authoritative spec; this file is the in-workspace mirror.
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Make `gps-denied-render-map` source-agnostic for the `--truth` argument: tlog OR CSV. Both already produce row-aligned `(lat_deg, lon_deg)` series via `load_tlog_ground_truth` / `load_csv_ground_truth`, so the rest of the renderer is unchanged. After this lands, the AZ-959 short-circuit in `_maybe_render_map` goes away and CSV-path jobs ship with a map link.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
1. **`src/gps_denied_onboard/cli/render_map.py`** — `load_ground_truth_track(path)`:
|
||||||
|
- Dispatch on extension. `.csv` → `load_csv_ground_truth(path)`; otherwise (`.tlog`, `.bin`, no ext) → `load_tlog_ground_truth(path)`.
|
||||||
|
- Both return DTOs with row-aligned `records` carrying `lat_deg` / `lon_deg`; the existing list comprehension survives unchanged.
|
||||||
|
- Update `--truth` CLI help to call out CSV support.
|
||||||
|
- Update the renderer's `tooltip="Ground truth (tlog)"` → `tooltip="Ground truth"` (cosmetic; the dispatch hides the source).
|
||||||
|
|
||||||
|
2. **`src/gps_denied_onboard/replay_api/app.py`** — `SubprocessReplayRunner._maybe_render_map`:
|
||||||
|
- Drop the `if inputs.tlog_path is None: return None` short-circuit added by AZ-959.
|
||||||
|
- Pass whichever of `tlog_path` / `csv_path` is set as `--truth`.
|
||||||
|
|
||||||
|
3. **`tests/unit/test_az700_render_map.py`**:
|
||||||
|
- Add focused test: build a tiny CSV via the AZ-896 schema, call `load_ground_truth_track`, assert the returned `list[tuple[float, float]]` matches what `load_csv_ground_truth` would return.
|
||||||
|
- Add an integration test: run `main()` against a CSV `--truth` and assert the produced HTML contains a polyline.
|
||||||
|
|
||||||
|
4. **`tests/unit/replay_api/test_az701_replay_api.py`**:
|
||||||
|
- Extend the AZ-959 CSV happy-path test (`test_post_replay_csv_path_returns_200_and_dispatches_imu_flag`) to also assert `map_html_url` is present in the response (no longer `None`).
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
- **AC-1**: `gps-denied-render-map --truth foo.csv --estimated bar.jsonl --output baz.html` succeeds when `foo.csv` is a valid AZ-896 schema CSV.
|
||||||
|
- **AC-2**: `gps-denied-render-map --truth foo.tlog ...` still works unchanged (no tlog regression).
|
||||||
|
- **AC-3**: The replay_api `POST /replay` CSV path response now includes `map_html_url`; the corresponding `/jobs/{job_id}/map` returns 200 + valid HTML.
|
||||||
|
- **AC-4**: A CSV with a malformed schema (missing required column) raises `ReplayInputAdapterError` from `load_csv_ground_truth` and the CLI exits non-zero; the renderer never sees a half-baked DTO.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- Renaming `RenderInputs.truth_track` or the internal `_TRUTH_LINE_COLOR` constant — naming stays.
|
||||||
|
- Schema validation specifics — those live in `csv_ground_truth.py` and are owned by AZ-896.
|
||||||
|
- The cosmetic `ReportContext` field rename — that's AZ-961.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- The `load_csv_ground_truth` loader already strict-validates the AZ-896 schema at entry; the CLI inherits that fail-fast behaviour for free.
|
||||||
|
- After this lands, the existing AZ-959 `_maybe_render_map` log line ("skipping map render — CSV-path runs do not yet support ...") is dead code and goes with the short-circuit.
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# accuracy_report: rename ReportContext.tlog_path to ground_truth_path
|
||||||
|
|
||||||
|
**Task**: AZ-961_report_context_field_rename
|
||||||
|
**Name**: Rename `ReportContext.tlog_path` → `ground_truth_path` + update the rendered report label so CSV-path runs no longer say "Tlog: <csv_path>"
|
||||||
|
**Description**: AZ-959 widened the meaning of `ReportContext.tlog_path` to "ground-truth source path" without renaming the field, so the rendered report still emits `"- Tlog: <path>"` even for CSV-driven runs. This ticket completes the cleanup: rename the field, update the renderer's label, and migrate all call sites.
|
||||||
|
**Complexity**: 1 SP
|
||||||
|
**Dependencies**: AZ-699 (existing report renderer this renames a field on, done), AZ-959 (introduced the field-overload this ticket closes, done)
|
||||||
|
**Blocks**: (none — purely cosmetic)
|
||||||
|
**Component**: helpers/accuracy_report + replay_api/app (kwarg update)
|
||||||
|
**Tracker**: AZ-961 (https://denyspopov.atlassian.net/browse/AZ-961)
|
||||||
|
**Parent Epic**: (none — cycle-4 replay UX follow-up to AZ-959)
|
||||||
|
|
||||||
|
Jira AZ-961 is the authoritative spec; this file is the in-workspace mirror.
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Replace the overloaded `ReportContext.tlog_path` field name (which AZ-959 quietly widened) with `ground_truth_path`, and update the rendered Markdown line from `"- Tlog: <path>"` to `"- Ground truth: <path>"` so the report is honest about its data source regardless of input format.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
1. **`src/gps_denied_onboard/helpers/accuracy_report.py`**:
|
||||||
|
- Rename `ReportContext.tlog_path: Path` → `ReportContext.ground_truth_path: Path`.
|
||||||
|
- Update the docstring entry from "Real tlog the runner consumed" to "Ground-truth source the runner consumed (binary tlog or AZ-896 CSV)".
|
||||||
|
- Update the rendered line in `render_report` from `f"- Tlog: \`{context.tlog_path}\`"` to `f"- Ground truth: \`{context.ground_truth_path}\`"`.
|
||||||
|
|
||||||
|
2. **`src/gps_denied_onboard/replay_api/app.py`**:
|
||||||
|
- In `_maybe_render_report`, change `tlog_path=gt_source_path` → `ground_truth_path=gt_source_path`.
|
||||||
|
- Drop the AZ-959 inline comment that documented the overload; the new field name carries its own intent.
|
||||||
|
|
||||||
|
3. **All other `ReportContext(tlog_path=...)` call sites**:
|
||||||
|
- Grep for the kwarg + update. Typically `tests/unit/test_az699_report_writer.py` and any e2e orchestrator using the report assembler.
|
||||||
|
|
||||||
|
4. **`tests/unit/test_az699_report_writer.py`**:
|
||||||
|
- Update fixtures from `tlog_path=...` → `ground_truth_path=...`.
|
||||||
|
- Add one assertion that the rendered Markdown contains `"- Ground truth:"` and does NOT contain `"- Tlog:"` (label is now source-agnostic).
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
- **AC-1**: `ReportContext` no longer has a `tlog_path` field; the only path field is `ground_truth_path: Path`.
|
||||||
|
- **AC-2**: Rendered report's input-source line reads `"- Ground truth: <path>"` for both tlog and CSV runs.
|
||||||
|
- **AC-3**: Existing AZ-699 unit tests pass against the renamed field with the new label.
|
||||||
|
- **AC-4**: AZ-959 integration test (`test_subprocess_runner_renders_report_for_csv_ground_truth`) still passes after the rename.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- The `RenderInputs.truth_track` field in `cli/render_map.py` — that's a `list[(lat, lon)]` tuple, already source-agnostic.
|
||||||
|
- The deprecation surface in `replay_input/__init__.py` (`AutoSyncConfig`, etc.) — cycle-5+ removal under AZ-908.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Pure rename; no logic changes. Touches ~3 files.
|
||||||
|
- This ticket is sequenced AFTER AZ-960 because AZ-960's `_maybe_render_map` edits would re-conflict if AZ-961 lands first; it's cheaper to settle the map path then do the rename.
|
||||||
@@ -8,7 +8,7 @@ status: in_progress
|
|||||||
sub_step:
|
sub_step:
|
||||||
phase: 6
|
phase: 6
|
||||||
name: implement-tasks
|
name: implement-tasks
|
||||||
detail: "batch 5 complete: AZ-959 replay_api POST /replay CSV-path extension landed (27/27 unit tests green, all 7 ACs covered: CSV happy path + XOR validation + malformed-CSV reject + /static/example-csv + CSV ground-truth dispatch in SubprocessReplayRunner._maybe_render_report + AZ-701 tlog tests unchanged). Map rendering for CSV path skipped (gps-denied-render-map only supports tlog truth today; deferred to AZ-700 follow-up). ReportContext.tlog_path field widened in-place to 'ground-truth source path' for the CSV case; the cosmetic 'Tlog:' label in the rendered report is now misleading for CSV runs (note for user — AZ-699 follow-up territory). Next batch: pick one of cycle-4 todo/ remainder (AZ-842 docs / AZ-899 / AZ-900 / AZ-901). OKVIS2 chain (AZ-943 + AZ-951 + AZ-952) sits in todo/ but is sequenced after the Derkachi e2e flight test passes per user 2026-05-29 directive."
|
detail: "batch 6 of N: AZ-960 gps-denied-render-map CSV-truth dispatch (extends --truth loader to dispatch on extension; removes the AZ-959 _maybe_render_map workaround; unblocks UI map link for CSV uploads). Filed alongside AZ-961 (ReportContext rename, sequenced after AZ-960 to avoid re-conflict on _maybe_render_report kwargs). OKVIS2 chain (AZ-943 + AZ-951 + AZ-952) sits in todo/ but is sequenced after the Derkachi e2e flight test passes per user 2026-05-29 directive."
|
||||||
retry_count: 0
|
retry_count: 0
|
||||||
cycle: 4
|
cycle: 4
|
||||||
tracker: jira
|
tracker: jira
|
||||||
|
|||||||
Reference in New Issue
Block a user