Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
Preserve unreported model work in actual coverage report integration (#10)
Cinna Davis309fd0da17b4
diff --git a/docs/PRODUCT.md b/docs/PRODUCT.mdindex 34fd157..9e60a04 100644--- a/docs/PRODUCT.md+++ b/docs/PRODUCT.md@@ -120,7 +120,9 @@ pipeline; it cannot reuse final candidates as if discovery had run again.Search reports with `model_support_complete` also supply explicit `model_support`work counters. Unsupported CPA trajectories, unclassified score candidates or-unknown clock trials keep product search coverage incomplete. Missing/malformed+unknown clock trials keep product search coverage incomplete. Unreported trial+envelopes are counted explicitly; zero reported unknown trials cannot establish+completion when some trial accounting is absent. Missing/malformedcounters cannot become zero work. Source spatial/time availability remains aseparate `data_status`; an available archive can still have unassessed trajectorymodels. Coverage limitations expose the work counts, and per-stage supportdiff --git a/evidence/product-20261103/outer-support-report-bridge-tests.json b/evidence/product-20261103/outer-support-report-bridge-tests.jsonnew file mode 100644index 0000000..cff93b4--- /dev/null+++ b/evidence/product-20261103/outer-support-report-bridge-tests.json@@ -0,0 +1,25 @@+{+ "base_commit": "8ed3dd0",+ "outer_support_dependency": "8fbae8b",+ "gates": [+ {+ "command": "PYTHONPATH=src /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q tests/test_automatic.py tests/test_tiled_support.py tests/test_tiled_search.py tests/test_finite_search.py tests/test_automatic_finite.py tests/test_automatic_profile.py tests/test_decision_invariants.py --junitxml=results/w5-outer-support-integration-20261103.xml",+ "passed": 78,+ "skipped": 0,+ "elapsed_s": 36.87+ },+ {+ "command": "PYTHONPATH=src /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q tests/test_automatic_support.py tests/test_automatic.py::test_model_support_work_is_explicit_in_product_coverage tests/test_automatic.py::test_missing_model_support_evidence_cannot_become_completed_work --junitxml=results/w5-support-report-bridge-20261103.xml",+ "passed": 13,+ "skipped": 0,+ "elapsed_s": 3.26+ }+ ],+ "files_sha256": {+ "src/aircraft_geoloc/automatic.py": "b84da5d92f2c029d97fd8a803cc4a80b64ae8b4adeb137b6e7c7c9d11ed13d81",+ "tests/test_automatic.py": "fd5daa4bdbcabc2b2582eb5f4e9583fd1731adc66e435f404ba88b36cbb0e5e8",+ "tests/test_automatic_support.py": "7594492020ade80ab9e9e250cf38073d3e5e3717b81339705719753cf8d446e1",+ "docs/PRODUCT.md": "3a60e11af0d02e122e520443d9a3d7f9971f77f9f8be0b814c339f75ddbe56ba"+ },+ "scope": "Actual robust scorer/tiled report to product coverage; controlled omission of accounting demonstrates zero reported unknown trials with positive unreported envelopes remains incomplete. No acoustic geolocation benchmark or real accuracy claim."+}diff --git a/src/aircraft_geoloc/automatic.py b/src/aircraft_geoloc/automatic.pyindex dd2d109..4629a1a 100644--- a/src/aircraft_geoloc/automatic.py+++ b/src/aircraft_geoloc/automatic.py@@ -158,16 +158,16 @@ def _coverage(request, search, config):if "model_support_complete" in search or "model_support" in search:support = search.get("model_support")count_names = ("unsupported_cpa_track_evaluations", "unclassified_score_candidates",- "evaluated_trials", "rejected_trials", "unknown_trials")+ "evaluated_trials", "rejected_trials", "unknown_trials", "unreported_trial_envelopes")valid_counts = (isinstance(support, dict) andall(type(support.get(name)) is int and support[name] >= 0 for name in count_names))model_complete = (search.get("model_support_complete") is True and valid_counts and- all(support[name] == 0 for name in (count_names[0], count_names[1], "unknown_trials")))+ all(support[name] == 0 for name in (count_names[0], count_names[1], "unknown_trials", "unreported_trial_envelopes")))if not model_complete:search_complete = Falselimitations.append("Trajectory model assessment is incomplete; unsupported competitors remain unassessed. See the search support diagnostics.")if valid_counts:- limitations.append(f"Unsupported CPA track evaluations: {support[count_names[0]]}; unclassified score candidates: {support[count_names[1]]}; unknown clock trials: {support['unknown_trials']}. Counts describe work evaluations, not distinct aircraft.")+ limitations.append(f"Unsupported CPA track evaluations: {support[count_names[0]]}; unclassified score candidates: {support[count_names[1]]}; unknown clock trials: {support['unknown_trials']}; unreported trial envelopes: {support['unreported_trial_envelopes']}. Counts describe work evaluations, not distinct aircraft.")else:limitations.append("Trajectory model support counts are unavailable or malformed; missing work is not treated as zero.")if not search_complete:diff --git a/tests/test_automatic.py b/tests/test_automatic.pyindex 387bcea..63413bf 100644--- a/tests/test_automatic.py+++ b/tests/test_automatic.py@@ -227,28 +227,31 @@ def test_invalid_operator_discovery_configuration_is_explicit(tmp_path, options)assert not (tmp_path/"output/intake").exists()[email protected]("flag,changes,complete", [- (True, {}, True),- (False, {"unsupported_cpa_track_evaluations": 1}, False),- (False, {"unclassified_score_candidates": 2, "unknown_trials": 3}, False),- (True, {"unknown_trials": 1}, False),- (True, {"unknown_trials": False}, False),- (True, {"unknown_trials": None}, False),- (None, {}, False),[email protected]("flag,changes,complete,counts_known", [+ (True, {}, True, True),+ (False, {"unsupported_cpa_track_evaluations": 1}, False, True),+ (False, {"unclassified_score_candidates": 2, "unknown_trials": 3}, False, True),+ (True, {"unknown_trials": 1}, False, True),+ (True, {"unknown_trials": False}, False, False),+ (True, {"unknown_trials": None}, False, False),+ (None, {}, False, True),+ (True, {"unreported_trial_envelopes": 1}, False, True),+ (True, {"unreported_trial_envelopes": None}, False, False),])-def test_model_support_work_is_explicit_in_product_coverage(flag, changes, complete):+def test_model_support_work_is_explicit_in_product_coverage(flag, changes, complete, counts_known):from aircraft_geoloc.automatic import _coveragesupport = {"unsupported_cpa_track_evaluations": 0, "unclassified_score_candidates": 0,"evaluated_trials": 4, "rejected_trials": 1, "unknown_trials": 0,- "diagnostics_directory": "support", **changes}+ "unreported_trial_envelopes": 0, "diagnostics_directory": "support", **changes}coverage = _coverage({"search": {"coverage": "conus"}},{"status": "complete", "tiles_total": 2, "tiles_completed": 2, "data_scope_complete": True,"model_support_complete": flag, "model_support": support}, {})assert coverage["search_complete"] is completeassert coverage["data_status"] == "available"assert any("Trajectory model" in item for item in coverage["limitations"]) is (not complete)- if type(support["unknown_trials"]) is int and not complete:+ if counts_known and not complete:assert f'unknown clock trials: {support["unknown_trials"]}' in ' '.join(coverage["limitations"])+ assert f'unreported trial envelopes: {support["unreported_trial_envelopes"]}' in ' '.join(coverage["limitations"])elif not complete:assert "unavailable or malformed" in ' '.join(coverage["limitations"])@@ -259,7 +262,8 @@ def test_missing_model_support_evidence_cannot_become_completed_work(missing):report = {"tiles_total": 1, "tiles_completed": 1, "data_scope_complete": True,"model_support_complete": True,"model_support": {"unsupported_cpa_track_evaluations": 0, "unclassified_score_candidates": 0,- "evaluated_trials": 4, "rejected_trials": 1, "unknown_trials": 0}}+ "evaluated_trials": 4, "rejected_trials": 1, "unknown_trials": 0,+ "unreported_trial_envelopes": 0}}report.pop("model_support" if missing == "counters" else "model_support_complete")coverage = _coverage({"search": {"coverage": "conus"}}, report, {})assert coverage["search_complete"] is Falsediff --git a/tests/test_automatic_support.py b/tests/test_automatic_support.pynew file mode 100644index 0000000..9df3cb4--- /dev/null+++ b/tests/test_automatic_support.py@@ -0,0 +1,38 @@+"""Real producer-to-product coverage checks; no localization benchmark."""+import pytest++from aircraft_geoloc import tiled_search+from aircraft_geoloc.automatic import _coverage+from aircraft_geoloc.terrain import Terrain+from aircraft_geoloc.tiled_search import SearchBudget, search_national+from test_tiled_search import scenario++[email protected]("missing_accounting", [False, True])+def test_product_coverage_consumes_actual_model_support_report(tmp_path, monkeypatch, missing_accounting):+ index, _, events, measurements, bounds, times, origin = scenario(tmp_path)+ if missing_accounting:+ original = tiled_search.score_candidate++ def unreported(*args, **kwargs):+ row = original(*args, **kwargs)+ row.pop("scoring_assessment", None)+ return row++ monkeypatch.setattr(tiled_search, "score_candidate", unreported)+ report = search_national([index], Terrain(constant_m=0), events, measurements,+ time_range_s=times, output_dir=tmp_path/"search", bounds=bounds,+ budget=SearchBudget(spacing_m=1000, tile_cells=4, refine_spacing_m=1000),+ scoring={"mode": "robust_ridge", "recording_start_window_s": [origin, origin], "time_sweep_s": 0})+ assert report["ranked"]+ coverage = _coverage({"search": {"coverage": "conus"}}, report, {})+ assert coverage["data_status"] == "available"+ assert coverage["search_complete"] is (not missing_accounting)+ if missing_accounting:+ assert report["model_support"]["unknown_trials"] == 0+ count = report["model_support"]["unreported_trial_envelopes"]+ assert count > 0+ assert f"unreported trial envelopes: {count}" in " ".join(coverage["limitations"])+ else:+ assert report["model_support_complete"] is True+ assert not any("Trajectory model assessment is incomplete" in item for item in coverage["limitations"])