[AZ-687] [autodev] File replay-mode guard task + Tier-2 evidence

Jetson Tier-2 e2e on 2026-05-19 11:27 surfaced a NEW gap one phase
deeper than where Rerun 3 died: build_pre_constructed seeds
c6_descriptor_index unconditionally, which reads
config.components["c6_tile_cache"] via storage_factory._c6_config.
The replay CLI synthesizes a Config that has no c6_tile_cache
block, so AC-1/2/5/6 fail with KeyError 'c6_tile_cache'.

Bootstrap (no source code changes):
- AZ-687 (Story, To Do, 2pt, Epic AZ-602; blocks AZ-618)
- Task spec in _docs/02_tasks/todo/
- _dependencies_table.md row + header narrative
- _docs/_autodev_state.md detail repointed at AZ-687
- _docs/03_implementation/jetson_runs/ Tier-2 evidence

The fix itself lives in batch 97 (next session): guard the c6/c7
seeds at the BUILD-PRE-CONSTRUCTED layer when config.mode ==
"replay". Per existing storage_factory._c6_config docstring the
silent-fallback path is explicitly rejected — the bootstrap layer
is the right seam.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-19 11:53:14 +03:00
parent c3639a5d1c
commit 2be1b5101e
4 changed files with 146 additions and 4 deletions
@@ -0,0 +1,61 @@
FFx..FFF.s.............. [100%]
=================================== FAILURES ===================================
______________________ test_ac1_exits_0_jsonl_count_match ______________________
tests/e2e/replay/test_derkachi_1min.py:66: in test_ac1_exits_0_jsonl_count_match
assert result.returncode == 0, (
E AssertionError: gps-denied-replay exited 1
E stdout:
E {"ts":"2026-05-19T08:27:40.862695Z","level":"INFO","component":"shared.fdr_client","frame_id":null,"kind":"fdr.client_constructed","msg":"FdrClient constructed","kv":{"producer_id":"airborne_main","capacity":4096},"exc":null}
E {"ts":"2026-05-19T08:27:40.865683Z","level":"ERROR","component":"gps_denied_onboard.cli.replay","frame_id":null,"kind":"log.diag","msg":"gps-denied-replay: unhandled exception","kv":{},"exc":"Traceback (most recent call last):\n File \"/opt/src/gps_denied_onboard/cli/replay.py\", line 308, in main\n return int(shared_main(config))\n File \"/opt/src/gps_denied_onboard/runtime_root/__init__.py\", line 663, in main\n pre_constructed = build_pre_constructed(config)\n File \"/opt/src/gps_denied_onboard/runtime_root/airborne_bootstrap.py\", line 1219, in build_pre_constructed\n constructed[\"c6_descriptor_index\"] = _build_c6_descriptor_index(config)\n File \"/opt/src/gps_denied_onboard/runtime_root/airborne_bootstrap.py\", line 550, in _build_c6_descriptor_index\n return build_descriptor_index(config)\n File \"/opt/src/gps_denied_onboard/runtime_root/storage_factory.py\", line 151, in build_descriptor_index\n block = _c6_config(config)\n File \"/opt/src/gps_denied_onboard/runtime_root/storage_factory.py\", line 62, in _c6_config\n return config.components[\"c6_tile_cache\"]\nKeyError: 'c6_tile_cache'"}
E
E stderr:
E gps-denied-replay starting with args: {'video': PosixPath('/opt/_docs/00_problem/input_data/flight_derkachi/flight_derkachi.mp4'), 'tlog': PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/synth.tlog'), 'output': PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'), 'camera_calibration': PosixPath('/opt/tests/fixtures/calibration/adti26.json'), 'config_path': PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/config.yaml'), 'mavlink_signing_key': '<redacted>', 'pace': 'asap', 'time_offset_ms': 0, 'skip_auto_sync_validation': True}
E Traceback (most recent call last):
E File "/opt/src/gps_denied_onboard/cli/replay.py", line 308, in main
E return int(shared_main(config))
E File "/opt/src/gps_denied_onboard/runtime_root/__init__.py", line 663, in main
E pre_constructed = build_pre_constructed(config)
E File "/opt/src/gps_denied_onboard/runtime_root/airborne_bootstrap.py", line 1219, in build_pre_constructed
E constructed["c6_descriptor_index"] = _build_c6_descriptor_index(config)
E File "/opt/src/gps_denied_onboard/runtime_root/airborne_bootstrap.py", line 550, in _build_c6_descriptor_index
E return build_descriptor_index(config)
E File "/opt/src/gps_denied_onboard/runtime_root/storage_factory.py", line 151, in build_descriptor_index
E block = _c6_config(config)
E File "/opt/src/gps_denied_onboard/runtime_root/storage_factory.py", line 62, in _c6_config
E return config.components["c6_tile_cache"]
E KeyError: 'c6_tile_cache'
E
E assert 1 == 0
E + where 1 = ReplayRunResult(returncode=1, stdout='{"ts":"2026-05-19T08:27:40.862695Z","level":"INFO","component":"shared.fdr_clien...tput_path=PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'), wall_clock_s=1.429985128925182).returncode
_________________________ test_ac2_jsonl_schema_match __________________________
tests/e2e/replay/test_derkachi_1min.py:106: in test_ac2_jsonl_schema_match
rows = parse_jsonl(result.output_path)
tests/e2e/replay/_helpers.py:66: in parse_jsonl
with path.open(encoding="utf-8") as fp:
/usr/lib/python3.10/pathlib.py:1119: in open
return self._accessor.open(self, mode, buffering, encoding, errors,
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'
______________________ test_ac5_determinism_two_runs_diff ______________________
tests/e2e/replay/test_derkachi_1min.py:364: in test_ac5_determinism_two_runs_diff
assert r1.returncode == 0 and r2.returncode == 0
E assert (1 == 0)
E + where 1 = ReplayRunResult(returncode=1, stdout='{"ts":"2026-05-19T08:27:45.899390Z","level":"INFO","component":"shared.fdr_clien...put_path=PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'), wall_clock_s=1.1765288199530914).returncode
____________________ test_ac6_pace_realtime_60s_within_5pct ____________________
tests/e2e/replay/test_derkachi_1min.py:392: in test_ac6_pace_realtime_60s_within_5pct
assert result.returncode == 0
E assert 1 == 0
E + where 1 = ReplayRunResult(returncode=1, stdout='{"ts":"2026-05-19T08:27:48.271495Z","level":"INFO","component":"shared.fdr_clien...put_path=PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'), wall_clock_s=1.1753297119867057).returncode
_________________________ test_ac6_pace_asap_under_30s _________________________
tests/e2e/replay/test_derkachi_1min.py:406: in test_ac6_pace_asap_under_30s
assert result.returncode == 0
E assert 1 == 0
E + where 1 = ReplayRunResult(returncode=1, stdout='{"ts":"2026-05-19T08:27:49.478080Z","level":"INFO","component":"shared.fdr_clien...tput_path=PosixPath('/tmp/pytest-of-root/pytest-0/derkachi0/estimator_output_1.jsonl'), wall_clock_s=1.193672444904223).returncode
=========================== short test summary info ============================
SKIPPED [1] tests/e2e/replay/test_derkachi_1min.py:441: AC-8 (operator workflow rehearsal) blocked on the full D-PROJ-2 mock-suite-sat-service implementation — current tests/fixtures/mock-suite-sat-service/ is a bootstrap stub with only GET /healthz. Unskips when the mock implements tile-fetch + index-build endpoints.
XFAIL tests/e2e/replay/test_derkachi_1min.py::test_ac3_within_100m_80pct_of_ticks - AC-3 requires a real Topotek KHP20S30 camera calibration; _docs/00_problem/input_data/flight_derkachi/camera_info.md states the intrinsics are unknown. Test runs as xfail until a real calibration JSON ships.
FAILED tests/e2e/replay/test_derkachi_1min.py::test_ac1_exits_0_jsonl_count_match
FAILED tests/e2e/replay/test_derkachi_1min.py::test_ac2_jsonl_schema_match - ...
FAILED tests/e2e/replay/test_derkachi_1min.py::test_ac5_determinism_two_runs_diff
FAILED tests/e2e/replay/test_derkachi_1min.py::test_ac6_pace_realtime_60s_within_5pct
FAILED tests/e2e/replay/test_derkachi_1min.py::test_ac6_pace_asap_under_30s
5 failed, 17 passed, 1 skipped, 1 xfailed in 10.61s