mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 21:41:13 +00:00
[AZ-611] Add --skip-auto-sync flag to bypass AC-9 validator
Mid-flight fixtures (Derkachi) and stationary-still scenarios (FT-P-01) have no take-off spike for the IMU detector and produce false-positive video motion onsets, so the AC-9 frame-window validator rejects every plausible offset. Add an operator-acknowledged opt-out: a new ReplayConfig.skip_auto_sync_validation flag that suppresses validation, paired with a hard requirement that time_offset_ms also be set (silent-zero guard at both schema and adapter layers). Wired through schema -> CLI (--skip-auto-sync) -> composition root -> ReplayInputAdapter; Derkachi e2e fixture now passes time_offset_ms=0 + skip_auto_sync=True by default since the synth tlog and the video share the same t=0 anchor by construction. 5 new unit tests: * schema gate rejects skip=True without manual offset * schema gate accepts the legal pair * default field value is False (default-construction safety) * adapter constructor mirrors the schema gate * adapter open() bypasses validate_offset_or_fail when flag is set All 38 unit tests in test_az401 + test_az405 pass on Mac. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -149,11 +149,22 @@ class ReplayRunResult:
|
||||
def replay_runner(derkachi_replay_inputs: DerkachiReplayInputs) -> Any:
|
||||
"""Return a callable that invokes the ``gps-denied-replay`` console-script.
|
||||
|
||||
The callable accepts keyword overrides for ``pace`` and
|
||||
``time_offset_ms``; everything else is taken from
|
||||
``derkachi_replay_inputs``. Output is written to a fresh path per
|
||||
invocation so determinism comparisons (AC-5) get two independent
|
||||
files.
|
||||
The callable accepts keyword overrides for ``pace``,
|
||||
``time_offset_ms``, and ``skip_auto_sync`` (AZ-611); everything
|
||||
else is taken from ``derkachi_replay_inputs``. Output is written
|
||||
to a fresh path per invocation so determinism comparisons (AC-5)
|
||||
get two independent files.
|
||||
|
||||
Derkachi is a mid-flight fixture (no take-off spike) and the only
|
||||
motion the video detector sees in the first 60 s is camera shake
|
||||
and scenery change — neither tlog nor video can produce a
|
||||
reliable auto-sync signal. The synth tlog and the video share
|
||||
the same ``t=0`` anchor by construction (see
|
||||
``_tlog_synth.py``), so the correct offset is exactly ``0``. The
|
||||
fixture defaults reflect that — heavy ACs pass
|
||||
``time_offset_ms=0`` + ``skip_auto_sync=True`` so the run never
|
||||
touches the AC-9 validator that would otherwise reject the
|
||||
fixture's false-positive video motion onset.
|
||||
"""
|
||||
|
||||
binary = shutil.which("gps-denied-replay")
|
||||
@@ -169,7 +180,12 @@ def replay_runner(derkachi_replay_inputs: DerkachiReplayInputs) -> Any:
|
||||
|
||||
invocation_count = {"n": 0}
|
||||
|
||||
def _run(*, pace: str = "asap", time_offset_ms: int | None = None) -> ReplayRunResult:
|
||||
def _run(
|
||||
*,
|
||||
pace: str = "asap",
|
||||
time_offset_ms: int | None = 0,
|
||||
skip_auto_sync: bool = True,
|
||||
) -> ReplayRunResult:
|
||||
import time
|
||||
|
||||
invocation_count["n"] += 1
|
||||
@@ -195,6 +211,8 @@ def replay_runner(derkachi_replay_inputs: DerkachiReplayInputs) -> Any:
|
||||
]
|
||||
if time_offset_ms is not None:
|
||||
argv.extend(["--time-offset-ms", str(time_offset_ms)])
|
||||
if skip_auto_sync:
|
||||
argv.append("--skip-auto-sync")
|
||||
t0 = time.monotonic()
|
||||
completed = subprocess.run(
|
||||
argv,
|
||||
|
||||
Reference in New Issue
Block a user