From a3dc8e2636cf759837425365b4a977c747cc0664 Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Fri, 29 May 2026 12:55:57 +0300 Subject: [PATCH] [AZ-961] accuracy_report: rename tlog_path -> ground_truth_path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ReportContext.tlog_path was widened in-place by AZ-959 to mean "ground-truth source path" without renaming, leaving the rendered report's "- Tlog: " line cosmetically wrong for CSV runs. This rename + label fix completes the cleanup. - helpers/accuracy_report.py: field rename + docstring update + rendered line now reads "- Ground truth: " for both inputs. - replay_api/app.py: kwarg updated, AZ-959 inline comment about the overload removed (field name now carries the intent). - tests/unit/test_az699_report_writer.py: fixture updated, two new symmetric tests assert the canonical label for tlog AND csv inputs (AC-2). - tests/e2e/replay/_e2e_orchestrator.py + test_derkachi_real_tlog.py: kwarg updated. Tests: 62/62 green across test_az699_report_writer.py, test_az700_render_map.py, test_az701_replay_api.py. CSV-replay-input chain (AZ-959 + AZ-960 + AZ-961) is now coherent: - API accepts (video, csv) with XOR validation - /static/example-csv serves the AZ-896 reference doc - Runner dispatches --imu vs --tlog argv - Report renders with source-agnostic "Ground truth:" label - Map renders from CSV truth via gps-denied-render-map dispatch Bookkeeping: AZ-961 spec moved todo/ → done/, dep-table preamble eighth bump documents the rename + summarises the cycle-4 CSV chain, state.md records batch 7 complete. Co-authored-by: Cursor --- _docs/02_tasks/_dependencies_table.md | 2 +- .../AZ-961_report_context_field_rename.md | 0 _docs/_autodev_state.md | 2 +- .../helpers/accuracy_report.py | 7 ++-- src/gps_denied_onboard/replay_api/app.py | 6 +--- tests/e2e/replay/_e2e_orchestrator.py | 2 +- tests/e2e/replay/test_derkachi_real_tlog.py | 2 +- tests/unit/test_az699_report_writer.py | 33 ++++++++++++++++++- 8 files changed, 41 insertions(+), 13 deletions(-) rename _docs/02_tasks/{todo => done}/AZ-961_report_context_field_rename.md (100%) diff --git a/_docs/02_tasks/_dependencies_table.md b/_docs/02_tasks/_dependencies_table.md index 493ea64..47a66b1 100644 --- a/_docs/02_tasks/_dependencies_table.md +++ b/_docs/02_tasks/_dependencies_table.md @@ -1,6 +1,6 @@ # Dependencies Table -**Date**: 2026-05-29 (cycle-4 Step 10 Implement — **AZ-960 LANDED** (`gps-denied-render-map` CSV-truth dispatch): `load_ground_truth_track` now dispatches on `truth_path.suffix` (`.csv` → `load_csv_ground_truth`, else → `load_tlog_ground_truth`); `_maybe_render_map` short-circuit removed (AZ-959 workaround gone); CSV-path replay jobs now ship with `map_html_url` populated in the API response. 44/44 unit tests green across `test_az700_render_map.py` + `test_az701_replay_api.py` (17 pre-existing render-map tests pass per AC-2 + 3 new AZ-960 tests covering ACs 1+3+4 + AZ-959 happy-path test extended to assert `map_html_url`). AZ-960 moved todo/ → done/. Next batch: AZ-961 (ReportContext.tlog_path rename + label fix). Earlier same-day — **AZ-960 + AZ-961 filed as AZ-959 follow-ups** per user 2026-05-29 directive ("File AZ-960 (render-map CSV dispatch) + AZ-961 (ReportContext rename) and continue with one of them next"): the two deferred items surfaced during AZ-959 implementation are now tracked. **AZ-960** (2pt, todo/, `gps-denied-render-map`: dispatch `--truth` loader on extension to unblock CSV-path map render; deps AZ-700 + AZ-894 + AZ-959; no epic — UX-completing follow-up). **AZ-961** (1pt, todo/, `accuracy_report`: rename `ReportContext.tlog_path` → `ground_truth_path` + label fix in rendered report; deps AZ-699 + AZ-959; no epic — cosmetic cleanup). Next implement batch picks AZ-960 first (closes the UI map gap; AZ-961 sequenced after to avoid re-conflict on `_maybe_render_report`'s kwargs). Earlier same-day — **AZ-959 LANDED** (`replay_api` `POST /replay` CSV-path extension): handler now accepts `(video, tlog)` OR `(video, csv)` multipart with XOR validation; `validate_csv_kind` rejects malformed schemas at the API boundary referencing `csv_replay_format.md`; `SubprocessReplayRunner.run` dispatches `--imu` vs `--tlog`; `_maybe_render_report` dispatches GT loader via `load_csv_ground_truth` / `load_tlog_ground_truth`; `ReplayInputs` DTO carries `tlog_path: Path | None` + `csv_path: Path | None` with XOR `__post_init__`; `JobStorage` reserves both `tlog_path` and `csv_path`; new `GET /static/example-csv` endpoint serves the AZ-896 reference CSV via `REPLAY_API_EXAMPLE_CSV_PATH` env or source-checkout fallback. 27/27 unit tests green (18 pre-existing tlog tests pass unchanged per AC-7 + 9 new tests covering ACs 1-6 + 2 `validate_csv_kind` unit cases). **Deferred items (NOT silently fixed, surfaced to user as end-of-turn notes)**: (a) `gps-denied-render-map` only consumes binary tlog truth → CSV-path jobs return `map_html_url=None` (deferred to AZ-700 follow-up); (b) `ReportContext.tlog_path` field is now overloaded as "ground-truth source path"; rendered report's `Tlog: ` line is cosmetically misleading for CSV runs (deferred to AZ-699 follow-up). AZ-959 moved todo/ → done/. Cycle-4 active-scope SP delta: −3 SP (3 → 0). Earlier same-day — OKVIS2 chain (AZ-943 + AZ-951 + AZ-952) moved backlog/ → todo/ per user 2026-05-29 directive: "I have a feeling that it needed to be implemented after full e2e derkachi flight test would be finished successfully. So maybe put it back to todo?" Reasoning accepted: OKVIS2 is the planned NEXT phase after the cycle-4 Derkachi demo lands, not a cycle-5+ deferral. The 2026-05-27 production-default pivot directive remains in force; today's earlier "deferred to cycle-5+" framing was over-correction after the AZ-943 spec-reality gap. AZ-943 keeps its PAUSED preamble (still HARD-BLOCKED on AZ-951 + AZ-952; cannot be worked on until both blockers land). AZ-951 + AZ-952 are themselves NOT blocked — they ship the upstream patches that unblock AZ-943. Implementation sequence remains: finish the cycle-4 demo (AZ-959 backend extension + the existing CSV-replay path) → AZ-951 (covariance + ADR) → AZ-952 (tracking-stats) → AZ-943 (binding wiring) → AZ-944 (CI BUILD_OKVIS2=ON) → AZ-945 (Jetson Tier-2 `--vio-strategy okvis2`). Current implement-batch target stays AZ-959. Earlier same-day — AZ-897 relocated to `../ui` repo: original framing was wrong-shop. The Azaion suite already has a single React 19 SPA front-end at `../ui` per `ui/README.md`; spinning up a second React toolchain in `gps-denied-onboard` would have been parallel-pipeline duplication forbidden by coderule.mdc. Per user 2026-05-29 directive, AZ-897 description + summary rewritten to UI-only scope in `../ui` (adapted to take CSV + nadir-camera video uploads aligned with the AZ-894 CSV path); local AZ-897 spec deleted from `gps-denied-onboard/_docs/02_tasks/todo/` and re-authored into `../ui/_docs/02_tasks/todo/AZ-897_replay_ui_web_form.md` (no commit in `../ui` — left for that repo's autodev next cycle). Backend dependency filed as **AZ-959** (3pt, todo/, c1 replay_api extension to accept (video, csv) multipart + GET /static/example-csv endpoint; deps AZ-701 + AZ-894 + AZ-896; no epic) — extends the AZ-701 `POST /replay` to dispatch on `--imu` vs `--tlog` based on which upload field was present, with XOR validation. AZ-897 Jira linked `is blocked by` AZ-959. Cycle-4 in-repo effort: −5 SP (AZ-897) + 3 SP (AZ-959) = −2 SP net. Pivoting next implement batch to AZ-959. Earlier same-day — AZ-943 implementation attempt paused mid-batch on spec-reality gap: OKVIS2 v2 public API does NOT expose 6×6 pose covariance, feature counts, mean parallax, or MRE; the AZ-943 spec's "approach (a) in-binding subclass workaround" is structurally impossible because `ThreadedSlam::estimator_` is `private` and `ViSlamBackend` has no public telemetry accessor. The spec-documented "approach (b) upstream patch" fallback filed as **AZ-951** (3pt, backlog/, OKVIS2 v2 upstream patch: expose 6×6 pose covariance accessor + ADR for pin deviation; deps AZ-332 + AZ-592; epic AZ-254) + **AZ-952** (3pt, backlog/, OKVIS2 v2 upstream patch: expose tracking-stats accessor — feature counts + parallax + MRE; deps AZ-332 + AZ-592 + AZ-951 SOFT; epic AZ-254). Both linked Jira-side as `is blocked by` against AZ-943; AZ-943 transitioned In Progress → To Do with full audit comment. **AZ-943** moved todo/ → backlog/ with PAUSED preamble preserving original AC list for audit. Per user 2026-05-29 confirmation, cycle-4 Derkachi demo target stays KLT/RANSAC (per `tests/e2e/replay/conftest.py` line 159 `c1_vio: strategy: klt_ransac`); OKVIS2 chain (AZ-943 → AZ-944 → AZ-945 + AZ-951/952 blockers) deferred to cycle-5+ alongside AZ-945's Tier-2 `--vio-strategy okvis2` Jetson variant. Pivot to AZ-897 (replay UI web form). Earlier this session: OKVIS2 production-default pivot per user 2026-05-27 directive: AZ-592 placeholder split into 3 properly-sized sub-tickets per PBI rule, all three filed Jira-side then; local-spec import for AZ-943 happens this session before implement batch starts. **AZ-943** (5pt, **NOW backlog/** with PAUSED preamble, c1_vio, OKVIS2 binding wiring; replaces AZ-332 skeleton; deps AZ-332 + AZ-592 + **AZ-951 + AZ-952 (blockers)**; epic AZ-254). Sibling tickets remain Jira-only this session: **AZ-944** (3pt, Linux CI build env + DBoW2 small_voc + Tier-1 EuRoC smoke; Blocks chain AZ-943→AZ-944) and **AZ-945** (3pt, Jetson L4T + Tier-2 Derkachi `--vio-strategy okvis2` e2e; Blocks chain AZ-944→AZ-945). Local specs for AZ-944 + AZ-945 will be authored when their Implement turns come up. Earlier 2026-05-26 (cycle-4 Step 10 Implement — AZ-895 batch 3 user complexity decision: chose Option A "minimum deprecation" path. Filed **AZ-908** (3pt, backlog/, replay: hard removal of deprecated auto-sync surface — AZ-895 follow-up; deps AZ-895 HARD + AZ-842 HARD; no epic) to track the cycle-5+ physical removal that AZ-895's minimum-path explicitly defers. AZ-895 ships the no-op stubs + CLI deprecation warnings; AZ-908 will delete the stub files, drop the DTOs from `replay_input/interface.py`, remove the deprecated CLI flags, and drop the `auto_sync` config block. No SP change to cycle-4 totals (AZ-908 is cycle-5+ backlog, not cycle-4 active scope). Earlier same-day at Step 9 New Task — scope adjustments: (a) AZ-841 (1pt, un-xfail AZ-777 Tier-2 tests) moved from todo/ to backlog/ due to hard conflict with AZ-895 AC-4 (test_derkachi_real_tlog.py stays @xfail in cycle 4 because AZ-848 is backlogged) + partial overlap with AZ-894 AC-3 (CSV-path adapter covers the test_derkachi_1min.py un-xfail target); Jira comment added to AZ-841 documenting the deferral. (b) AZ-842 (2pt → **3pt**, +1 SP rescope) — dropped AZ-841 soft dependency, expanded replay_protocol.md scope to add new Invariant 13 covering single-canonical-clock model + cycle-4 CSV-driven replay narrative (AZ-894 + AZ-895 + AZ-896), plus architecture.md replay-input section updates. New deps: AZ-894 HARD + AZ-895 HARD + AZ-896 SOFT. (c) +**AZ-899** (1pt, product, todo/, land architecture_compliance_baseline.md — cycle-3 retro Top-3 #3 third try; deps None; no epic). (d) +**AZ-900** (1pt, product, todo/, autodev cycle-N+1 Step-9 retro-existence gate — cycle-3 retro Top-3 #2 + 2026-05-26 LESSONS process entry; deps None; no epic). (e) +**AZ-901** (1pt, product, todo/, fix EVIDENCE_OUT default path in e2e/runner/conftest.py:56 — closes 2026-05-26 leftover; deps None; no epic). Cycle-4 active scope: 6 product tickets in todo/ totaling **17 SP** = AZ-842 (3, docs) + AZ-894 (3, CSV adapter) + AZ-895 (2, auto-sync deprecation) + AZ-896 (1, format docs) + AZ-897 (5, replay UI) + AZ-899 (1) + AZ-900 (1) + AZ-901 (1). Dependency order: AZ-894 blocks AZ-895 + AZ-842 + AZ-897; AZ-896 blocks AZ-897 + AZ-842. AZ-899/AZ-900/AZ-901 standalone (no internal blockers). AZ-848 (5) + AZ-883 (2) + AZ-908 (3) remain in backlog/ (cycle-3 retro Top-3 #1 + AZ-895 follow-up deferred to cycle-5+; CSV-bypass strategy supersedes their fixes for the demo path). Earlier 2026-05-23 (cycle-3 Step 10 Implement, refactor run 02-az507-routespec-relocation — added AZ-844 (Epic, run dir `_docs/04_refactoring/02-az507-routespec-relocation/`) + AZ-845 (C01, 2pt relocate `RouteSpec` from `replay_input/tlog_route.py` to `_types/route.py`, deps None, epic AZ-844) + AZ-846 (C02, 2pt refresh `module-layout.md` cycle-3 entries — c11 + replay_input + `_types/route`, deps AZ-845, epic AZ-844) + AZ-847 (C03, 2pt widen `test_az270_compose_root` lint to enforce full rule-9 allow-list, deps AZ-845, epic AZ-844). Resolves cycle-3 cumulative review FAIL verdict (F1 High Architecture, F2 Medium Architecture, F3 Medium Maintainability) per `_docs/03_implementation/cumulative_review_batches_104-109_cycle3_report.md`. Jira "Blocks" links recorded: AZ-845 → AZ-846, AZ-845 → AZ-847. Earlier same-day at start of Step 10 Implement — Epic AZ-835 decomposed into 4 leaf tasks + AZ-777 closed: AZ-839 (C3, 5pt operator_pre_flight_setup real fixture, deps AZ-836+AZ-838+AZ-777Phase1+AZ-322+AZ-316+AZ-306, epic AZ-835), AZ-840 (C4, 3pt e2e orchestrator test (tlog,video,calibration), deps AZ-839+AZ-836+AZ-838+AZ-699+AZ-405+AZ-702+AZ-696, epic AZ-835), AZ-841 (C5, 1pt un-xfail AZ-777 AC-4+AC-5, deps AZ-839+AZ-840, epic AZ-835), AZ-842 (C6, 2pt docs — replay_protocol.md Invariant 12 + architecture.md + orchestrator README, soft dep AZ-841, epic AZ-835). AZ-777 transitioned to Done in Jira: Phases 1+2 shipped (batch 104 + between batches 104 and 106); Phases 3-5 superseded by Epic AZ-835 children per 2026-05-22 user directive. AZ-777 spec moved to done/. Earlier 2026-05-21 (cycle-3 Step 9 New Task — added AZ-776 (3pt open-loop ESKF composition profile via `c4_pose.enabled` flag, no deps, epic AZ-602) + AZ-777 (5pt Derkachi C6 reference tile cache + FAISS descriptor index from OSM/CARTO basemap, depends on AZ-776, epic AZ-602). Both unblock the 7 currently-`@xfail`-masked Derkachi e2e tests on Jetson; AZ-776 unblocks 5 (AC-1, AC-2, AC-5, AC-6 realtime, AC-6 asap), AZ-777 unblocks the remaining 2 (AC-3 + AZ-699 real-flight verdict). Earlier 2026-05-19 (refreshed late-morning after 11:27 Jetson Tier-2 e2e run for AZ-618 — surfaced a NEW gap: replay-mode `Config` lacks `c6_tile_cache` block, so `build_pre_constructed → _build_c6_descriptor_index → _c6_config` raises `KeyError` for AC-1/2/5/6. Follow-up filed as AZ-687 (2pt) under E-AZ-602 with guard at the bootstrap layer (NOT silent fallback in `_c6_config`). Earlier same-day mid-day after AZ-618 split: per the spec author's own Sizing-note recommendation + user-rule cap on PBI complexity, AZ-618 was split into 6 subtasks AZ-619..AZ-624 in Jira (subtasks of AZ-618; epic AZ-602 stays grandparent). AZ-618 retained at 0pt as the umbrella tracker; aggregate actionable work is 16pt across the subtasks (vs. AZ-618's original 5pt filing — author's "likely a true 8" caveat was understated due to c5_isam2_graph_handle ordering + GPU builder unknowns). Earlier same-day refresh at start of Step-7 rewind for AZ-618 — Step-11 Jetson tier-2 e2e gate identified missing internal product implementation: `runtime_root.main()` does not build the airborne `pre_constructed` infrastructure dict before `compose_root()`; AZ-618 = 5pt cross-cutting follow-up to AZ-591, lives under E-AZ-602; all 12 dep tasks are in `done/`. Earlier 2026-05-16 (cycle-1 completeness-gate post-mortem): AZ-589 + AZ-590 closed Won't Fix — were wrong abstraction (OKVIS v1 `ThreadedKFVio` API doesn't exist in OKVIS2 upstream; VINS-Mono `cpp/vins_mono/upstream/` submodule never existed; the actual production gap is the empty central `_STRATEGY_REGISTRY` affecting EVERY component with a strategy-selecting config field, not just c1_vio); replaced by AZ-591 (cross-cutting compose_root per-binary bootstrap, todo/, 5pt) + AZ-592 (AZ-332 Tier-2 validation bundle, backlog/, 5pt placeholder) + AZ-593 (AZ-333 Tier-2 validation bundle, backlog/, 5pt placeholder); AZ-332 + AZ-333 re-classified in gate report from FAIL to BLOCKED-on-Tier-2 per the original tasks' Implementation Notes deferral handles; earlier same-day after end of cycle-1 gate: AZ-589 + AZ-590 created (now closed); earlier same-day after end of Batch 64: AZ-558 implementation closed — `MavlinkTransport` seam now routes every C8 outbound MAVLink byte; AZ-401 AC-9 + AZ-404 AC-4b unskipped together; encoder helpers extracted to `_outbound_mavlink_payloads.py`; live-mode `compose_root` injection deferred to whichever future batch registers AP/iNav strategies in an airborne binary; earlier 2026-05-14: refreshed at start of Batch 63: AZ-559 closed Won't Fix — gap was illusory; `TileSource.ONBOARD_INGEST` + `TileMetadata.quality_metadata` + `write_tile`'s `FreshnessRejectionError` already cover the AZ-389 mid-flight ingest semantic without any new API; AZ-389 dep restored to AZ-303; earlier same-day after Batch 61: AZ-558 follow-up added — routes C8 outbound encoder bytes through `MavlinkTransport` seam; closes AZ-401 AC-9 deferred during batch 61 due to encoder-side routing not being in the AZ-401 task envelope; earlier same-day after cumulative review batches 52-54: AZ-528 hygiene PBI added for c1_vio strategy facade orchestration-spine 3-way duplication (Medium); earlier same-day after Batch 53: AZ-333 VINS-Mono landed — first c1_vio strategy after the AZ-332 OKVIS2 production-default; consolidation hygiene for the strategy-facade duplication deferred to a post-AZ-334 PBI; earlier same-day after Batch 51: AZ-527 hygiene PBI added from cumulative review batches 49-51 F1; 2026-05-13: AZ-526 hygiene PBI added from cumulative review batches 46-48 F1+F3; same-day refresh after Batch 44 SRP refactor: AZ-317 superseded; AZ-329 + AZ-330 specs rewritten; AZ-523 + AZ-524 audit-trail tickets added; E-C12 epic renamed `Operator Pre-flight Tooling` → `Operator Pre-flight Orchestrator`; earlier same-day refresh: AZ-507 + AZ-508 hygiene PBIs from cumulative review batches 31-33; 2026-05-11: AZ-489 + AZ-490 ADR-010 operator-origin path) +**Date**: 2026-05-29 (cycle-4 Step 10 Implement — **AZ-961 LANDED** (`ReportContext.tlog_path` → `ground_truth_path` rename + label fix): `ReportContext` field renamed; rendered report line now reads `- Ground truth: ` for both tlog and CSV runs; AZ-959's inline comment documenting the field-overload removed. Two new symmetric tests in `test_az699_report_writer.py` assert the canonical label for both input formats. All 4 call sites updated: `helpers/accuracy_report.py` (field + docstring + render label), `replay_api/app.py` (kwarg), `tests/unit/test_az699_report_writer.py` (fixture + 2 new tests), `tests/e2e/replay/_e2e_orchestrator.py` (production e2e), `tests/e2e/replay/test_derkachi_real_tlog.py` (e2e test). 62/62 tests green across the three relevant unit-test modules. AZ-961 moved todo/ → done/. **Cycle-4 implement-batch sequence summary**: AZ-959 (3pt) + AZ-960 (2pt) + AZ-961 (1pt) all landed today as a coherent CSV-replay-input chain unblocking the relocated AZ-897 UI in `../ui`. Cycle-4 todo/ remainder for next batches: AZ-842 (3, docs) + AZ-899 (1) + AZ-900 (1) + AZ-901 (1) = 6 SP product. OKVIS2 chain (AZ-943 + AZ-951 + AZ-952) still in todo/ but sequenced after the Derkachi e2e green per user 2026-05-29 directive. Earlier same-day — **AZ-960 LANDED** (`gps-denied-render-map` CSV-truth dispatch): `load_ground_truth_track` now dispatches on `truth_path.suffix` (`.csv` → `load_csv_ground_truth`, else → `load_tlog_ground_truth`); `_maybe_render_map` short-circuit removed (AZ-959 workaround gone); CSV-path replay jobs now ship with `map_html_url` populated in the API response. 44/44 unit tests green across `test_az700_render_map.py` + `test_az701_replay_api.py` (17 pre-existing render-map tests pass per AC-2 + 3 new AZ-960 tests covering ACs 1+3+4 + AZ-959 happy-path test extended to assert `map_html_url`). AZ-960 moved todo/ → done/. Next batch: AZ-961 (ReportContext.tlog_path rename + label fix). Earlier same-day — **AZ-960 + AZ-961 filed as AZ-959 follow-ups** per user 2026-05-29 directive ("File AZ-960 (render-map CSV dispatch) + AZ-961 (ReportContext rename) and continue with one of them next"): the two deferred items surfaced during AZ-959 implementation are now tracked. **AZ-960** (2pt, todo/, `gps-denied-render-map`: dispatch `--truth` loader on extension to unblock CSV-path map render; deps AZ-700 + AZ-894 + AZ-959; no epic — UX-completing follow-up). **AZ-961** (1pt, todo/, `accuracy_report`: rename `ReportContext.tlog_path` → `ground_truth_path` + label fix in rendered report; deps AZ-699 + AZ-959; no epic — cosmetic cleanup). Next implement batch picks AZ-960 first (closes the UI map gap; AZ-961 sequenced after to avoid re-conflict on `_maybe_render_report`'s kwargs). Earlier same-day — **AZ-959 LANDED** (`replay_api` `POST /replay` CSV-path extension): handler now accepts `(video, tlog)` OR `(video, csv)` multipart with XOR validation; `validate_csv_kind` rejects malformed schemas at the API boundary referencing `csv_replay_format.md`; `SubprocessReplayRunner.run` dispatches `--imu` vs `--tlog`; `_maybe_render_report` dispatches GT loader via `load_csv_ground_truth` / `load_tlog_ground_truth`; `ReplayInputs` DTO carries `tlog_path: Path | None` + `csv_path: Path | None` with XOR `__post_init__`; `JobStorage` reserves both `tlog_path` and `csv_path`; new `GET /static/example-csv` endpoint serves the AZ-896 reference CSV via `REPLAY_API_EXAMPLE_CSV_PATH` env or source-checkout fallback. 27/27 unit tests green (18 pre-existing tlog tests pass unchanged per AC-7 + 9 new tests covering ACs 1-6 + 2 `validate_csv_kind` unit cases). **Deferred items (NOT silently fixed, surfaced to user as end-of-turn notes)**: (a) `gps-denied-render-map` only consumes binary tlog truth → CSV-path jobs return `map_html_url=None` (deferred to AZ-700 follow-up); (b) `ReportContext.tlog_path` field is now overloaded as "ground-truth source path"; rendered report's `Tlog: ` line is cosmetically misleading for CSV runs (deferred to AZ-699 follow-up). AZ-959 moved todo/ → done/. Cycle-4 active-scope SP delta: −3 SP (3 → 0). Earlier same-day — OKVIS2 chain (AZ-943 + AZ-951 + AZ-952) moved backlog/ → todo/ per user 2026-05-29 directive: "I have a feeling that it needed to be implemented after full e2e derkachi flight test would be finished successfully. So maybe put it back to todo?" Reasoning accepted: OKVIS2 is the planned NEXT phase after the cycle-4 Derkachi demo lands, not a cycle-5+ deferral. The 2026-05-27 production-default pivot directive remains in force; today's earlier "deferred to cycle-5+" framing was over-correction after the AZ-943 spec-reality gap. AZ-943 keeps its PAUSED preamble (still HARD-BLOCKED on AZ-951 + AZ-952; cannot be worked on until both blockers land). AZ-951 + AZ-952 are themselves NOT blocked — they ship the upstream patches that unblock AZ-943. Implementation sequence remains: finish the cycle-4 demo (AZ-959 backend extension + the existing CSV-replay path) → AZ-951 (covariance + ADR) → AZ-952 (tracking-stats) → AZ-943 (binding wiring) → AZ-944 (CI BUILD_OKVIS2=ON) → AZ-945 (Jetson Tier-2 `--vio-strategy okvis2`). Current implement-batch target stays AZ-959. Earlier same-day — AZ-897 relocated to `../ui` repo: original framing was wrong-shop. The Azaion suite already has a single React 19 SPA front-end at `../ui` per `ui/README.md`; spinning up a second React toolchain in `gps-denied-onboard` would have been parallel-pipeline duplication forbidden by coderule.mdc. Per user 2026-05-29 directive, AZ-897 description + summary rewritten to UI-only scope in `../ui` (adapted to take CSV + nadir-camera video uploads aligned with the AZ-894 CSV path); local AZ-897 spec deleted from `gps-denied-onboard/_docs/02_tasks/todo/` and re-authored into `../ui/_docs/02_tasks/todo/AZ-897_replay_ui_web_form.md` (no commit in `../ui` — left for that repo's autodev next cycle). Backend dependency filed as **AZ-959** (3pt, todo/, c1 replay_api extension to accept (video, csv) multipart + GET /static/example-csv endpoint; deps AZ-701 + AZ-894 + AZ-896; no epic) — extends the AZ-701 `POST /replay` to dispatch on `--imu` vs `--tlog` based on which upload field was present, with XOR validation. AZ-897 Jira linked `is blocked by` AZ-959. Cycle-4 in-repo effort: −5 SP (AZ-897) + 3 SP (AZ-959) = −2 SP net. Pivoting next implement batch to AZ-959. Earlier same-day — AZ-943 implementation attempt paused mid-batch on spec-reality gap: OKVIS2 v2 public API does NOT expose 6×6 pose covariance, feature counts, mean parallax, or MRE; the AZ-943 spec's "approach (a) in-binding subclass workaround" is structurally impossible because `ThreadedSlam::estimator_` is `private` and `ViSlamBackend` has no public telemetry accessor. The spec-documented "approach (b) upstream patch" fallback filed as **AZ-951** (3pt, backlog/, OKVIS2 v2 upstream patch: expose 6×6 pose covariance accessor + ADR for pin deviation; deps AZ-332 + AZ-592; epic AZ-254) + **AZ-952** (3pt, backlog/, OKVIS2 v2 upstream patch: expose tracking-stats accessor — feature counts + parallax + MRE; deps AZ-332 + AZ-592 + AZ-951 SOFT; epic AZ-254). Both linked Jira-side as `is blocked by` against AZ-943; AZ-943 transitioned In Progress → To Do with full audit comment. **AZ-943** moved todo/ → backlog/ with PAUSED preamble preserving original AC list for audit. Per user 2026-05-29 confirmation, cycle-4 Derkachi demo target stays KLT/RANSAC (per `tests/e2e/replay/conftest.py` line 159 `c1_vio: strategy: klt_ransac`); OKVIS2 chain (AZ-943 → AZ-944 → AZ-945 + AZ-951/952 blockers) deferred to cycle-5+ alongside AZ-945's Tier-2 `--vio-strategy okvis2` Jetson variant. Pivot to AZ-897 (replay UI web form). Earlier this session: OKVIS2 production-default pivot per user 2026-05-27 directive: AZ-592 placeholder split into 3 properly-sized sub-tickets per PBI rule, all three filed Jira-side then; local-spec import for AZ-943 happens this session before implement batch starts. **AZ-943** (5pt, **NOW backlog/** with PAUSED preamble, c1_vio, OKVIS2 binding wiring; replaces AZ-332 skeleton; deps AZ-332 + AZ-592 + **AZ-951 + AZ-952 (blockers)**; epic AZ-254). Sibling tickets remain Jira-only this session: **AZ-944** (3pt, Linux CI build env + DBoW2 small_voc + Tier-1 EuRoC smoke; Blocks chain AZ-943→AZ-944) and **AZ-945** (3pt, Jetson L4T + Tier-2 Derkachi `--vio-strategy okvis2` e2e; Blocks chain AZ-944→AZ-945). Local specs for AZ-944 + AZ-945 will be authored when their Implement turns come up. Earlier 2026-05-26 (cycle-4 Step 10 Implement — AZ-895 batch 3 user complexity decision: chose Option A "minimum deprecation" path. Filed **AZ-908** (3pt, backlog/, replay: hard removal of deprecated auto-sync surface — AZ-895 follow-up; deps AZ-895 HARD + AZ-842 HARD; no epic) to track the cycle-5+ physical removal that AZ-895's minimum-path explicitly defers. AZ-895 ships the no-op stubs + CLI deprecation warnings; AZ-908 will delete the stub files, drop the DTOs from `replay_input/interface.py`, remove the deprecated CLI flags, and drop the `auto_sync` config block. No SP change to cycle-4 totals (AZ-908 is cycle-5+ backlog, not cycle-4 active scope). Earlier same-day at Step 9 New Task — scope adjustments: (a) AZ-841 (1pt, un-xfail AZ-777 Tier-2 tests) moved from todo/ to backlog/ due to hard conflict with AZ-895 AC-4 (test_derkachi_real_tlog.py stays @xfail in cycle 4 because AZ-848 is backlogged) + partial overlap with AZ-894 AC-3 (CSV-path adapter covers the test_derkachi_1min.py un-xfail target); Jira comment added to AZ-841 documenting the deferral. (b) AZ-842 (2pt → **3pt**, +1 SP rescope) — dropped AZ-841 soft dependency, expanded replay_protocol.md scope to add new Invariant 13 covering single-canonical-clock model + cycle-4 CSV-driven replay narrative (AZ-894 + AZ-895 + AZ-896), plus architecture.md replay-input section updates. New deps: AZ-894 HARD + AZ-895 HARD + AZ-896 SOFT. (c) +**AZ-899** (1pt, product, todo/, land architecture_compliance_baseline.md — cycle-3 retro Top-3 #3 third try; deps None; no epic). (d) +**AZ-900** (1pt, product, todo/, autodev cycle-N+1 Step-9 retro-existence gate — cycle-3 retro Top-3 #2 + 2026-05-26 LESSONS process entry; deps None; no epic). (e) +**AZ-901** (1pt, product, todo/, fix EVIDENCE_OUT default path in e2e/runner/conftest.py:56 — closes 2026-05-26 leftover; deps None; no epic). Cycle-4 active scope: 6 product tickets in todo/ totaling **17 SP** = AZ-842 (3, docs) + AZ-894 (3, CSV adapter) + AZ-895 (2, auto-sync deprecation) + AZ-896 (1, format docs) + AZ-897 (5, replay UI) + AZ-899 (1) + AZ-900 (1) + AZ-901 (1). Dependency order: AZ-894 blocks AZ-895 + AZ-842 + AZ-897; AZ-896 blocks AZ-897 + AZ-842. AZ-899/AZ-900/AZ-901 standalone (no internal blockers). AZ-848 (5) + AZ-883 (2) + AZ-908 (3) remain in backlog/ (cycle-3 retro Top-3 #1 + AZ-895 follow-up deferred to cycle-5+; CSV-bypass strategy supersedes their fixes for the demo path). Earlier 2026-05-23 (cycle-3 Step 10 Implement, refactor run 02-az507-routespec-relocation — added AZ-844 (Epic, run dir `_docs/04_refactoring/02-az507-routespec-relocation/`) + AZ-845 (C01, 2pt relocate `RouteSpec` from `replay_input/tlog_route.py` to `_types/route.py`, deps None, epic AZ-844) + AZ-846 (C02, 2pt refresh `module-layout.md` cycle-3 entries — c11 + replay_input + `_types/route`, deps AZ-845, epic AZ-844) + AZ-847 (C03, 2pt widen `test_az270_compose_root` lint to enforce full rule-9 allow-list, deps AZ-845, epic AZ-844). Resolves cycle-3 cumulative review FAIL verdict (F1 High Architecture, F2 Medium Architecture, F3 Medium Maintainability) per `_docs/03_implementation/cumulative_review_batches_104-109_cycle3_report.md`. Jira "Blocks" links recorded: AZ-845 → AZ-846, AZ-845 → AZ-847. Earlier same-day at start of Step 10 Implement — Epic AZ-835 decomposed into 4 leaf tasks + AZ-777 closed: AZ-839 (C3, 5pt operator_pre_flight_setup real fixture, deps AZ-836+AZ-838+AZ-777Phase1+AZ-322+AZ-316+AZ-306, epic AZ-835), AZ-840 (C4, 3pt e2e orchestrator test (tlog,video,calibration), deps AZ-839+AZ-836+AZ-838+AZ-699+AZ-405+AZ-702+AZ-696, epic AZ-835), AZ-841 (C5, 1pt un-xfail AZ-777 AC-4+AC-5, deps AZ-839+AZ-840, epic AZ-835), AZ-842 (C6, 2pt docs — replay_protocol.md Invariant 12 + architecture.md + orchestrator README, soft dep AZ-841, epic AZ-835). AZ-777 transitioned to Done in Jira: Phases 1+2 shipped (batch 104 + between batches 104 and 106); Phases 3-5 superseded by Epic AZ-835 children per 2026-05-22 user directive. AZ-777 spec moved to done/. Earlier 2026-05-21 (cycle-3 Step 9 New Task — added AZ-776 (3pt open-loop ESKF composition profile via `c4_pose.enabled` flag, no deps, epic AZ-602) + AZ-777 (5pt Derkachi C6 reference tile cache + FAISS descriptor index from OSM/CARTO basemap, depends on AZ-776, epic AZ-602). Both unblock the 7 currently-`@xfail`-masked Derkachi e2e tests on Jetson; AZ-776 unblocks 5 (AC-1, AC-2, AC-5, AC-6 realtime, AC-6 asap), AZ-777 unblocks the remaining 2 (AC-3 + AZ-699 real-flight verdict). Earlier 2026-05-19 (refreshed late-morning after 11:27 Jetson Tier-2 e2e run for AZ-618 — surfaced a NEW gap: replay-mode `Config` lacks `c6_tile_cache` block, so `build_pre_constructed → _build_c6_descriptor_index → _c6_config` raises `KeyError` for AC-1/2/5/6. Follow-up filed as AZ-687 (2pt) under E-AZ-602 with guard at the bootstrap layer (NOT silent fallback in `_c6_config`). Earlier same-day mid-day after AZ-618 split: per the spec author's own Sizing-note recommendation + user-rule cap on PBI complexity, AZ-618 was split into 6 subtasks AZ-619..AZ-624 in Jira (subtasks of AZ-618; epic AZ-602 stays grandparent). AZ-618 retained at 0pt as the umbrella tracker; aggregate actionable work is 16pt across the subtasks (vs. AZ-618's original 5pt filing — author's "likely a true 8" caveat was understated due to c5_isam2_graph_handle ordering + GPU builder unknowns). Earlier same-day refresh at start of Step-7 rewind for AZ-618 — Step-11 Jetson tier-2 e2e gate identified missing internal product implementation: `runtime_root.main()` does not build the airborne `pre_constructed` infrastructure dict before `compose_root()`; AZ-618 = 5pt cross-cutting follow-up to AZ-591, lives under E-AZ-602; all 12 dep tasks are in `done/`. Earlier 2026-05-16 (cycle-1 completeness-gate post-mortem): AZ-589 + AZ-590 closed Won't Fix — were wrong abstraction (OKVIS v1 `ThreadedKFVio` API doesn't exist in OKVIS2 upstream; VINS-Mono `cpp/vins_mono/upstream/` submodule never existed; the actual production gap is the empty central `_STRATEGY_REGISTRY` affecting EVERY component with a strategy-selecting config field, not just c1_vio); replaced by AZ-591 (cross-cutting compose_root per-binary bootstrap, todo/, 5pt) + AZ-592 (AZ-332 Tier-2 validation bundle, backlog/, 5pt placeholder) + AZ-593 (AZ-333 Tier-2 validation bundle, backlog/, 5pt placeholder); AZ-332 + AZ-333 re-classified in gate report from FAIL to BLOCKED-on-Tier-2 per the original tasks' Implementation Notes deferral handles; earlier same-day after end of cycle-1 gate: AZ-589 + AZ-590 created (now closed); earlier same-day after end of Batch 64: AZ-558 implementation closed — `MavlinkTransport` seam now routes every C8 outbound MAVLink byte; AZ-401 AC-9 + AZ-404 AC-4b unskipped together; encoder helpers extracted to `_outbound_mavlink_payloads.py`; live-mode `compose_root` injection deferred to whichever future batch registers AP/iNav strategies in an airborne binary; earlier 2026-05-14: refreshed at start of Batch 63: AZ-559 closed Won't Fix — gap was illusory; `TileSource.ONBOARD_INGEST` + `TileMetadata.quality_metadata` + `write_tile`'s `FreshnessRejectionError` already cover the AZ-389 mid-flight ingest semantic without any new API; AZ-389 dep restored to AZ-303; earlier same-day after Batch 61: AZ-558 follow-up added — routes C8 outbound encoder bytes through `MavlinkTransport` seam; closes AZ-401 AC-9 deferred during batch 61 due to encoder-side routing not being in the AZ-401 task envelope; earlier same-day after cumulative review batches 52-54: AZ-528 hygiene PBI added for c1_vio strategy facade orchestration-spine 3-way duplication (Medium); earlier same-day after Batch 53: AZ-333 VINS-Mono landed — first c1_vio strategy after the AZ-332 OKVIS2 production-default; consolidation hygiene for the strategy-facade duplication deferred to a post-AZ-334 PBI; earlier same-day after Batch 51: AZ-527 hygiene PBI added from cumulative review batches 49-51 F1; 2026-05-13: AZ-526 hygiene PBI added from cumulative review batches 46-48 F1+F3; same-day refresh after Batch 44 SRP refactor: AZ-317 superseded; AZ-329 + AZ-330 specs rewritten; AZ-523 + AZ-524 audit-trail tickets added; E-C12 epic renamed `Operator Pre-flight Tooling` → `Operator Pre-flight Orchestrator`; earlier same-day refresh: AZ-507 + AZ-508 hygiene PBIs from cumulative review batches 31-33; 2026-05-11: AZ-489 + AZ-490 ADR-010 operator-origin path) **Total Tasks**: 184 (143 product + 41 blackbox-test) — 2026-05-29 cycle-4 Step 10 third bump (AZ-897 relocation + AZ-959 filing): +AZ-959 (1 product task, todo/, 3pt). AZ-897 was never in this table's row count (pre-existing gap — the cycle-4 AZ-89x specs land in todo/ but were not back-filled into the table rows; not fixing that here, out of scope). Prior same-day 2026-05-29 second bump (AZ-943 paused, dependency PBIs filed): 183 (142 product + 41 blackbox-test) — +AZ-951 + AZ-952 (2 product tasks, both backlog/, 3pt each). AZ-943 (5pt) moved todo/ → backlog/ (no count change). Prior same-day 2026-05-29 bump (OKVIS2 binding session start): 181 (140 product + 41 blackbox-test) → 182 (141 product) — +AZ-943 (1 product task, originally todo/, 5pt). AZ-944 + AZ-945 remain Jira-only at the time of this update (sibling tickets, local specs deferred to their own Implement turns); their Total-Tasks impact will be reconciled when their specs land. Prior 2026-05-26 cycle-4 Step 10 bump (AZ-895 batch 3 follow-up): 180 (139 product + 41 blackbox-test) — +AZ-908 (1 product task, backlog/, 3pt). Prior 2026-05-26 cycle-4 Step 9 bump: +AZ-899 + AZ-900 + AZ-901 (3 product tasks). AZ-841 moved todo/ → backlog/ (no count change; backlog tickets are still in the table). Prior 2026-05-23 refactor-run bump: 176 (135 product + 41 blackbox-test) — +AZ-844 (Epic, 0pt umbrella for refactor run 02) + AZ-845 + AZ-846 + AZ-847 (3 product tasks). Prior 2026-05-23 bump (Epic AZ-835 decomposition): 173 (132 product + 41 blackbox-test) = +AZ-835 (Epic) + AZ-836 (C1) + AZ-837 (test-stack hardening, not this Epic) + AZ-838 (C2) added 2026-05-22→2026-05-23 prior to that update; +AZ-839 (C3) + AZ-840 (C4) + AZ-841 (C5) + AZ-842 (C6) added in that update. AZ-777 stays in the table (now closed in Jira; spec at `done/AZ-777_derkachi_c6_reference_fixture.md` retains 8pt credit for Phases 1+2 shipped). Earlier counts: 165 (124 product + 41 blackbox-test) — AZ-317 retained in the table marked SUPERSEDED for audit; AZ-523 (C11 gate removal) + AZ-524 (C12 rename) added as 2 closed audit-trail tasks; AZ-526 = 2pt clock-helper hygiene; AZ-527 = 2pt c2 engine-dim helper hygiene; AZ-528 = 3pt c1_vio facade-spine hygiene; AZ-558 = 3pt MavlinkTransport routing follow-up; AZ-559 closed Won't Fix; AZ-589 + AZ-590 closed Won't Fix (kept in table as 0pt audit-trail rows); AZ-591 = 5pt cross-cutting compose_root bootstrap (todo/); AZ-592 = 5pt OKVIS2 Tier-2 placeholder (backlog/); AZ-593 = 5pt VINS-Mono Tier-2 placeholder (backlog/); AZ-618 = 0pt umbrella (split into AZ-619..AZ-624 on 2026-05-19); AZ-619..AZ-624 = 6 subtasks of AZ-618 covering Phase A..F of the airborne `pre_constructed` assembly, summing to 16pt actionable work; AZ-687 = 2pt replay-mode guard follow-up surfaced by AZ-618 Tier-2 run on 2026-05-19 **Total Complexity Points**: 584 (451 product + 133 blackbox-test) — 2026-05-29 cycle-4 Step 10 third bump (AZ-897 relocation + AZ-959 filing): +3pt AZ-959. AZ-897 (5pt) was never table-counted here, so no decrement at this layer; the in-repo cycle-4 effort still drops by 5pt at the active-scope layer (AZ-897 work is now executed in `../ui`). Prior same-day 2026-05-29 second bump (AZ-943 paused, dependency PBIs filed): 581 (448 product + 133 blackbox-test) — +3pt AZ-951 + 3pt AZ-952 = +6 product pts. AZ-943 stays counted at 5pt (moved todo/ → backlog/, not deleted). Prior same-day 2026-05-29 bump (OKVIS2 binding session start): 580 (447 product + 133 blackbox-test) — +5pt AZ-943. AZ-944 (3pt) + AZ-945 (3pt) sibling tickets are filed Jira-side but not yet imported as local specs; their +6pt will land when AZ-944 / AZ-945 specs are authored. Prior 2026-05-26 cycle-4 Step 10 bump (AZ-895 batch 3 follow-up): 570 (437 product + 133 blackbox-test) — +3pt AZ-908. Prior 2026-05-26 cycle-4 Step 9 bump: +1pt AZ-899 + 1pt AZ-900 + 1pt AZ-901 + 1pt AZ-842 rescope (2→3) = +4 product pts. Prior 2026-05-23 refactor-run bump: 563 (430 product + 133 blackbox-test) — +2pt AZ-845 + 2pt AZ-846 + 2pt AZ-847 = +6 product pts on top of prior reconciled total (AZ-844 epic itself is 0pt umbrella). Prior 2026-05-23 reconciled total: 557 (424 product + 133 blackbox-test) — +5pt AZ-839 + 3pt AZ-840 + 1pt AZ-841 + 2pt AZ-842 = +11 product pts on top of prior reconciled total. AZ-836 (3pt) + AZ-838 (3pt) were added 2026-05-22→2026-05-23 prior to that update; AZ-837 (test-stack hardening, not this Epic) is unaccounted in that delta and should be folded in at the next preamble reconciliation. Earlier baseline: 546 (413 product + 133 blackbox-test) — +3pt AZ-776 + 8pt AZ-777 (5→8 override 2026-05-21 cycle-3 batch 104; see `_docs/_process_leftovers/2026-05-21_az777_complexity_override.md` for rationale + the spec refresh that pulled e2e-runner wiring + C11 contract adapt + Derkachi catalog seed + fixture replacement + un-xfail into one ticket) — AZ-523 = 3pt, AZ-524 = 2pt, AZ-526 = 2pt, AZ-527 = 2pt, AZ-528 = 3pt, AZ-558 = 3pt, AZ-589 + AZ-590 retained at 5pt each but closed Won't Fix (treated as 0 effective pts going forward), AZ-591 = 5pt, AZ-592 = 5pt placeholder, AZ-593 = 5pt placeholder, AZ-618 = 0pt umbrella post-split, AZ-619 = 2pt, AZ-620 = 3pt, AZ-621 = 3pt, AZ-622 = 3pt, AZ-623 = 3pt, AZ-624 = 2pt, AZ-687 = 2pt diff --git a/_docs/02_tasks/todo/AZ-961_report_context_field_rename.md b/_docs/02_tasks/done/AZ-961_report_context_field_rename.md similarity index 100% rename from _docs/02_tasks/todo/AZ-961_report_context_field_rename.md rename to _docs/02_tasks/done/AZ-961_report_context_field_rename.md diff --git a/_docs/_autodev_state.md b/_docs/_autodev_state.md index 6589c57..fbf1e5b 100644 --- a/_docs/_autodev_state.md +++ b/_docs/_autodev_state.md @@ -8,7 +8,7 @@ status: in_progress sub_step: phase: 6 name: implement-tasks - detail: "batch 6 complete: AZ-960 gps-denied-render-map CSV-truth dispatch landed (44/44 tests green across render_map + replay_api; CSV-path replay jobs now ship with map_html_url populated). Next batch 7: AZ-961 ReportContext.tlog_path → ground_truth_path rename + label fix. 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 7 complete: AZ-961 ReportContext.tlog_path → ground_truth_path rename + label fix landed (62/62 tests green; rendered report now reads '- Ground truth: ' for both tlog and CSV runs). The CSV-replay-input chain (AZ-959 + AZ-960 + AZ-961) is now coherent and unblocks the relocated AZ-897 UI in ../ui. Cycle-4 todo/ remainder for next batches: AZ-842 (3, docs) + AZ-899 (1) + AZ-900 (1) + AZ-901 (1) = 6 SP product. 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 cycle: 4 tracker: jira diff --git a/src/gps_denied_onboard/helpers/accuracy_report.py b/src/gps_denied_onboard/helpers/accuracy_report.py index c29e409..f8c6255 100644 --- a/src/gps_denied_onboard/helpers/accuracy_report.py +++ b/src/gps_denied_onboard/helpers/accuracy_report.py @@ -49,7 +49,8 @@ class ReportContext: Attributes: run_date_utc: ISO-8601 date (YYYY-MM-DD) at which the run executed — drives the report filename. - tlog_path: Real tlog the runner consumed. + ground_truth_path: Ground-truth source the runner consumed — + either a binary tlog (AZ-697) or an AZ-896 schema CSV. video_path: Video clip the runner consumed. calibration_acquisition_method: Provenance of the camera calibration (e.g. ``"factory-sheet"`` for AZ-702 or @@ -63,7 +64,7 @@ class ReportContext: """ run_date_utc: str - tlog_path: Path + ground_truth_path: Path video_path: Path calibration_acquisition_method: str clip_duration_s: float @@ -141,7 +142,7 @@ def render_report( lines.append("") lines.append("## Run context") lines.append("") - lines.append(f"- Tlog: `{context.tlog_path}`") + lines.append(f"- Ground truth: `{context.ground_truth_path}`") lines.append(f"- Video: `{context.video_path}`") lines.append( f"- Calibration acquisition method: {context.calibration_acquisition_method}" diff --git a/src/gps_denied_onboard/replay_api/app.py b/src/gps_denied_onboard/replay_api/app.py index 218c0de..8bbd5bd 100644 --- a/src/gps_denied_onboard/replay_api/app.py +++ b/src/gps_denied_onboard/replay_api/app.py @@ -237,11 +237,7 @@ class SubprocessReplayRunner: ) context = ReportContext( run_date_utc=datetime.utcnow().date().isoformat(), - # tlog_path is widened to "ground-truth source" in cycle-4 - # (tlog or csv depending on which input drove the run); - # ReportContext field rename deferred to AZ-699 follow-up - # to keep AZ-959 scope minimal. - tlog_path=gt_source_path, + ground_truth_path=gt_source_path, video_path=inputs.video_path, calibration_acquisition_method=calibration_method, clip_duration_s=clip_duration_s, diff --git a/tests/e2e/replay/_e2e_orchestrator.py b/tests/e2e/replay/_e2e_orchestrator.py index 12f7ed4..07a0a48 100644 --- a/tests/e2e/replay/_e2e_orchestrator.py +++ b/tests/e2e/replay/_e2e_orchestrator.py @@ -349,7 +349,7 @@ def run_e2e_orchestration( context = ReportContext( run_date_utc=effective_run_date, - tlog_path=tlog_path, + ground_truth_path=tlog_path, video_path=video_path, calibration_acquisition_method=read_calibration_acquisition_method( calibration_path diff --git a/tests/e2e/replay/test_derkachi_real_tlog.py b/tests/e2e/replay/test_derkachi_real_tlog.py index cd30a4f..5ec3248 100644 --- a/tests/e2e/replay/test_derkachi_real_tlog.py +++ b/tests/e2e/replay/test_derkachi_real_tlog.py @@ -280,7 +280,7 @@ def test_az699_real_flight_validation_emits_verdict_and_report( run_date_utc=datetime.datetime.now(datetime.timezone.utc) .date() .isoformat(), - tlog_path=tlog_path, + ground_truth_path=tlog_path, video_path=video_path, calibration_acquisition_method=_read_calibration_acquisition_method( calibration_path diff --git a/tests/unit/test_az699_report_writer.py b/tests/unit/test_az699_report_writer.py index 37ff03a..492be85 100644 --- a/tests/unit/test_az699_report_writer.py +++ b/tests/unit/test_az699_report_writer.py @@ -209,7 +209,7 @@ def _failing_distribution() -> HorizontalErrorDistribution: def _context(method: str = "factory-sheet") -> ReportContext: return ReportContext( run_date_utc="2026-05-20", - tlog_path=Path("/tmp/derkachi.tlog"), + ground_truth_path=Path("/tmp/derkachi.tlog"), video_path=Path("/tmp/flight_derkachi.mp4"), calibration_acquisition_method=method, clip_duration_s=180.0, @@ -340,3 +340,34 @@ def test_render_report_marks_vertical_skipped_when_no_samples() -> None: # Assert assert "_No emissions carried a comparable altitude" in text + + +def test_render_report_labels_ground_truth_source_agnostic_for_csv_path() -> None: + # Arrange — AZ-961 AC-2: rendered label is "Ground truth: …" for + # both tlog AND csv inputs, never "Tlog: …". + csv_context = ReportContext( + run_date_utc="2026-05-29", + ground_truth_path=Path("/tmp/data_imu.csv"), + video_path=Path("/tmp/nadir.mp4"), + calibration_acquisition_method="factory-sheet", + clip_duration_s=180.0, + emissions_count=200, + ) + + # Act + text = render_report(_passing_distribution(), csv_context, passed=True) + + # Assert + assert "- Ground truth: `/tmp/data_imu.csv`" in text + assert "- Tlog:" not in text + + +def test_render_report_labels_ground_truth_source_agnostic_for_tlog_path() -> None: + # Arrange — AZ-961 AC-2: the same canonical label applies to tlog runs + + # Act + text = render_report(_passing_distribution(), _context(), passed=True) + + # Assert + assert "- Ground truth: `/tmp/derkachi.tlog`" in text + assert "- Tlog:" not in text