Skip to content

Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)

Expose incomplete trajectory assessments in product coverage (#10)

Cinna Davisf64c89984a51
diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md
index 0d31c84..34fd157 100644
--- a/docs/PRODUCT.md
+++ b/docs/PRODUCT.md
@@ -118,6 +118,15 @@ the operator configuration hash is retained in provenance. This configuration is
not an upload-request field. A chunk-size comparison must rerun detection and the
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
+counters cannot become zero work. Source spatial/time availability remains a
+separate `data_status`; an available archive can still have unassessed trajectory
+models. Coverage limitations expose the work counts, and per-stage support
+artifacts retain affected IDs/reasons and conservative lost-coverage envelopes.
+These counts describe work evaluations, not distinct aircraft.
+
The automatic path always uses one shared clock inside the supplied start window
and robust ridge loss. Its default association path considers every proposed
independent group; harmonics count once and unsupported acoustic proposals remain
diff --git a/evidence/product-20261103/model-support-coverage-tests.json b/evidence/product-20261103/model-support-coverage-tests.json
new file mode 100644
index 0000000..5df1065
--- /dev/null
+++ b/evidence/product-20261103/model-support-coverage-tests.json
@@ -0,0 +1,21 @@
+{
+ "base_commit": "c845c48",
+ "before_fix": {
+ "passed": 1,
+ "failed": 7,
+ "scope": "Explicit support failures and missing/invalid support metadata were incorrectly described as completed tile work."
+ },
+ "final_command": "PYTHONPATH=src /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q 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 tests/test_automatic.py::test_complete_tile_work_is_separate_from_partial_flight_coverage --junitxml=results/w5-support-coverage-final-20261103.xml",
+ "final_passed": 10,
+ "failures": 0,
+ "errors": 0,
+ "skipped": 0,
+ "elapsed_s": 0.12,
+ "files_sha256": {
+ "src/aircraft_geoloc/automatic.py": "902f7959491f2118a29574909181eddeda22843608f88d1c17a736a423b53887",
+ "tests/test_automatic.py": "dc6af84e47ffd8edfabb81b7abefa79fb78fa189590228505b8ce3cbbd34900f",
+ "docs/PRODUCT.md": "38c1f12d463b00e9773fb4d694bd081078e0a65deda45028b2cabce66c105025"
+ },
+ "intermediate_broad_gate": "46 product/finite/profile/legacy tests passed in33.36s before the final missing-flag edge case; exact final metadata/legacy branches are covered above.",
+ "scope": "Coverage adapter for W2 agreed additive report fields; source data availability remains separate from unassessed physical work. Ready outer producer and fresh complete pipeline verification remain required."
+}
diff --git a/src/aircraft_geoloc/automatic.py b/src/aircraft_geoloc/automatic.py
index 28787c8..dd2d109 100644
--- a/src/aircraft_geoloc/automatic.py
+++ b/src/aircraft_geoloc/automatic.py
@@ -155,8 +155,23 @@ def _coverage(request, search, config):
search_complete = (search.get("tiles_total", 0) > 0 and search.get("tiles_completed") == search.get("tiles_total")
and not search.get("tile_failures") and not search.get("refinement_failure")
and search.get("all_event_groups_considered") is not False)
+ 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")
+ valid_counts = (isinstance(support, dict) and
+ all(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")))
+ if not model_complete:
+ search_complete = False
+ limitations.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.")
+ else:
+ limitations.append("Trajectory model support counts are unavailable or malformed; missing work is not treated as zero.")
if not search_complete:
- limitations.append("The search did not assess the complete requested scope within its work limits.")
+ limitations.append("The search did not assess the complete requested scope within its work or physical model limits.")
if search.get("all_event_groups_considered") is False:
limitations.append(search.get("event_limit_reason") or "Not every proposed flyover group was considered within the configured budget.")
if "constant_m" in config.get("terrain", {}):
diff --git a/tests/test_automatic.py b/tests/test_automatic.py
index f2eb73e..387bcea 100644
--- a/tests/test_automatic.py
+++ b/tests/test_automatic.py
@@ -225,3 +225,45 @@ def test_invalid_operator_discovery_configuration_is_explicit(tmp_path, options)
assert final["status"] == "failed"
assert final["reason_code"] == "invalid_configuration"
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),
+])
+def test_model_support_work_is_explicit_in_product_coverage(flag, changes, complete):
+ from aircraft_geoloc.automatic import _coverage
+ support = {"unsupported_cpa_track_evaluations": 0, "unclassified_score_candidates": 0,
+ "evaluated_trials": 4, "rejected_trials": 1, "unknown_trials": 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 complete
+ assert 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:
+ assert f'unknown clock trials: {support["unknown_trials"]}' in ' '.join(coverage["limitations"])
+ elif not complete:
+ assert "unavailable or malformed" in ' '.join(coverage["limitations"])
+
+
[email protected]("missing", ["counters", "flag"])
+def test_missing_model_support_evidence_cannot_become_completed_work(missing):
+ from aircraft_geoloc.automatic import _coverage
+ 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}}
+ report.pop("model_support" if missing == "counters" else "model_support_complete")
+ coverage = _coverage({"search": {"coverage": "conus"}}, report, {})
+ assert coverage["search_complete"] is False
+ assert coverage["data_status"] == "available"
+ assert "Trajectory model assessment is incomplete" in ' '.join(coverage["limitations"])
+ if missing == "counters":
+ assert "unavailable or malformed" in ' '.join(coverage["limitations"])