[AZ-233] Update Docker Compose and enhance test documentation

- Modified the Docker Compose configuration to include an input root for replay tests and added an environment variable for enabling SITL.
- Enhanced documentation for various testing processes, including the addition of a Runtime Completeness Decomposition Gate and clarifications on internal module testing requirements.
- Updated the implementation completeness report to reflect the current state and added new test cases for performance and resilience scenarios.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-06 05:03:48 +03:00
parent 2485763d09
commit cab7b5d020
20 changed files with 265 additions and 41 deletions
+29 -9
View File
@@ -221,10 +221,11 @@ class BlackboxReplayRunner:
def __init__(
self,
output_root: Path = Path("data/test-results"),
input_root: Path = Path("_docs/00_problem/input_data"),
scenarios: Sequence[ScenarioConfig] | None = None,
) -> None:
self.output_root = output_root
self.scenarios = tuple(scenarios or default_scenarios())
self.scenarios = tuple(scenarios or default_scenarios(input_root))
self.environment = TestEnvironment(output_root)
self.satellite_cache = SatelliteCacheStub()
self.ardupilot_sitl = ArdupilotSitlStub()
@@ -277,11 +278,25 @@ class BlackboxReplayRunner:
interactions.extend(self.satellite_cache.interactions[cache_interaction_count:])
interactions.extend(self.ardupilot_sitl.interactions[sitl_interaction_count:])
interactions.extend(self.qgc_observer.interactions[observer_interaction_count:])
result = ScenarioResult.PASS if cache_response["trusted"] else ScenarioResult.BLOCKED
cache_rejection_expected = scenario.controls.get("expect_cache_rejection") == "true"
cache_rejected_safely = (
cache_rejection_expected
and cache_response["trusted"] is False
and cache_response["network_fetch_attempted"] is False
)
result = (
ScenarioResult.PASS
if cache_response["trusted"] or cache_rejected_safely
else ScenarioResult.BLOCKED
)
error_message = "" if result == ScenarioResult.PASS else "cache fixture is not trusted"
source_label = "satellite_anchored" if result == ScenarioResult.PASS else "degraded"
covariance = 12.5 if result == ScenarioResult.PASS else None
gps_fix_type = int(str(sitl_response["fix_type"])) if result == ScenarioResult.PASS else 0
source_label = (
"satellite_anchored"
if cache_response["trusted"]
else "untrusted_cache_rejected"
)
covariance = 12.5 if cache_response["trusted"] else None
gps_fix_type = int(str(sitl_response["fix_type"])) if cache_response["trusted"] else 0
scenario_dir = run_dir / scenario.scenario_id
scenario_dir.mkdir(parents=True, exist_ok=True)
@@ -363,8 +378,7 @@ class BlackboxReplayRunner:
return markdown_path
def default_scenarios() -> tuple[ScenarioConfig, ...]:
input_root = Path("_docs/00_problem/input_data")
def default_scenarios(input_root: Path = Path("_docs/00_problem/input_data")) -> tuple[ScenarioConfig, ...]:
return (
ScenarioConfig(
scenario_id="FT-P-01",
@@ -395,7 +409,7 @@ def default_scenarios() -> tuple[ScenarioConfig, ...]:
name="Invalid cache no-fetch smoke",
group=ScenarioGroup.SECURITY,
input_dataset="cache_integrity_fixtures",
controls={"cache_variant": "stale"},
controls={"cache_variant": "stale", "expect_cache_rejection": "true"},
),
ScenarioConfig(
scenario_id="NFT-RES-LIM-INFRA",
@@ -601,9 +615,15 @@ def main(argv: Sequence[str] | None = None) -> int:
default=Path("data/test-results"),
help="Directory for run-scoped CSV and Markdown reports.",
)
parser.add_argument(
"--input-root",
type=Path,
default=Path(os.environ.get("GPSD_REPLAY_INPUT_ROOT", "_docs/00_problem/input_data")),
help="Directory containing replay input fixtures.",
)
args = parser.parse_args(argv)
result = BlackboxReplayRunner(output_root=args.output_dir).run()
result = BlackboxReplayRunner(output_root=args.output_dir, input_root=args.input_root).run()
print(f"blackbox replay completed: {result.csv_path}")
print(f"fdr validation summary: {result.markdown_path}")
return 0