Skip to content

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

Keep finite-search and retained near-tie equality conservative (#9)

Cinna Davis02f1cba4c779
diff --git a/evidence/verification/physical-20261103/finite-margin-review/README.md b/evidence/verification/physical-20261103/finite-margin-review/README.md
new file mode 100644
index 0000000..e6e5c63
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/README.md
@@ -0,0 +1,43 @@
+# Independent finite-evidence boundary review
+
+At W4 prototype `4bdc1fd144ad37b416faa216e78ac88652c3922d`, the independently
+specified equality controls fail for both retained and discarded competitors.
+For scores 1.8 and 1.4 over two independent groups, the declared gap is 0.2.
+Binary floating-point subtraction returns `0.20000000000000007`. The strict
+comparison incorrectly treats the competitor as separated and permits success.
+
+The focused repair uses the same conservative comparison for retained alternatives
+and discarded-score bounds. `math.isclose` with relative and absolute tolerances
+of `1e-12` keeps equality within roundoff competitive. It can only change a
+numerically marginal acceptance to an inconclusive outcome. The policy margins,
+returned-radius containment, score units and evidence requirements are unchanged.
+A bound of 1.399999 remains distinguishable and passes the margin check.
+
+Seven independent controls cover both equality cases, a separated positive
+control, genuine refinement improvement without rewriting seed evidence, loss of
+a better original seed, a distant same-association mode, and the conservative
+group bound for a potentially larger discarded subset. These are decision
+contract controls, not an end-to-end or physical-accuracy benchmark.
+
+## Measured checks
+
+| Frozen source | Checks | Outcome |
+| --- | --- | --- |
+| `4bdc1fd144ad37b416faa216e78ac88652c3922d` | Existing confidence tests plus exact final independent test file | 39 passed, 2 failed, zero skips, 0.125 s JUnit time |
+| `fd7f63e5f4d7d133a721b57bab4de91c90911878` | Complete repository suite | 176 passed, zero failures/errors/skips, 20.829 s JUnit time |
+
+The full suite reports one existing pandas future-dtype warning in
+`data_access.py`. Native logs and JUnit are retained. `receipt.json` records the
+source tree and SHA256 of the production/test files. The baseline check uses the
+exact final independent test file against the untouched prototype worktree.
+
+The commands used an absolute `PYTHONPATH` to the chosen worktree's `src` and
+`/workspace/scratch/4cfe67e9d1bc/DOPPLERGEIST/.venv/bin/python -m pytest -q`.
+The baseline selected `tests/test_confidence.py` plus the independent test file;
+the fixed check ran the full suite. Full-suite execution allowed actual loopback
+tests where present. No mocked result replaces a scientific stage in this claim.
+
+This is a narrow stacked repair for W4's finite-evidence proposal, with no change
+to another worker's branch. Producer retention accounting, stable mode mappings,
+integrated execution and the independent field-data gate remain separate work.
+Historical inconclusive runs, including the four-event CI replay, remain unchanged.
diff --git a/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.log b/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.log
new file mode 100644
index 0000000..40f9620
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.log
@@ -0,0 +1,10 @@
+........................................................................ [ 40%]
+........................................................................ [ 81%]
+................................ [100%]
+=============================== warnings summary ===============================
+tests/test_data_access.py::test_truncated_parquet_and_payload_corruption
+ /workspace/scratch/4cfe67e9d1bc/DOPPLERGEIST-finite-review/src/aircraft_geoloc/data_access.py:263: Pandas4Warning: 'str' is not supported as a fill value for float64 dtype. In a future version, calling fillna with an incompatible value will raise. Explicitly cast to a common dtype before filling.
+ clean["aircraft_class"] = clean.typecode.map(class_map).fillna("unclassified") if "typecode" in clean else "unclassified"
+
+-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
+176 passed, 1 warning in 20.83s
diff --git a/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.xml b/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.xml
new file mode 100644
index 0000000..c66c509
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/after-fullsuite.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="176" time="20.829" timestamp="2026-11-02T22:15:43.053206-04:00" hostname="05c893b10fbb"><testcase classname="tests.test_artifact_restore" name="test_verified_restore_reuses_identical_files_and_preserves_conflicts" time="0.005" /><testcase classname="tests.test_artifact_restore" name="test_corrupt_bundle_does_not_write_destination" time="0.001" /><testcase classname="tests.test_artifact_restore" name="test_manifest_and_symlink_escape_are_rejected" time="0.002" /><testcase classname="tests.test_association" name="test_unmatched_false_proposal_does_not_suppress_two_locked_real_events" time="0.066" /><testcase classname="tests.test_association" name="test_association_budget_and_noise_only_hypotheses_fail_explicitly" time="0.008" /><testcase classname="tests.test_association" name="test_repeated_passes_remain_distinct_and_one_pass_cannot_explain_two_events" time="0.006" /><testcase classname="tests.test_audio" name="test_noise_does_not_force_a_detection" time="0.293" /><testcase classname="tests.test_audio" name="test_geometric_altitude_slot_and_labelled_fallback" time="0.002" /><testcase classname="tests.test_benchmark_timing" name="test_annotation_intervals_have_the_same_seconds_at_each_resolution[s]" time="0.001" /><testcase classname="tests.test_benchmark_timing" name="test_annotation_intervals_have_the_same_seconds_at_each_resolution[ms]" time="0.001" /><testcase classname="tests.test_benchmark_timing" name="test_annotation_intervals_have_the_same_seconds_at_each_resolution[us]" time="0.001" /><testcase classname="tests.test_benchmark_timing" name="test_annotation_intervals_have_the_same_seconds_at_each_resolution[ns]" time="0.000" /><testcase classname="tests.test_benchmark_timing" name="test_real_annotation_milliseconds_survive_default_string_parsing" time="0.000" /><testcase classname="tests.test_benchmark_timing" name="test_annotation_intervals_use_absolute_time_across_timezone_offsets" time="0.001" /><testcase classname="tests.test_camera_capture" name="test_untimed_live_segments_stay_without_a_recording_clock" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_broadcaster_clock_propagates_by_segment_duration_and_resets_at_a_gap" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_invalid_media_duration_is_rejected[#EXTINF:nan,]" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_invalid_media_duration_is_rejected[#EXTINF:-1,]" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_invalid_media_duration_is_rejected[#EXTINF:inf,]" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_naive_program_timestamp_is_rejected" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_public_page_metadata_is_json_not_executed_javascript" time="0.000" /><testcase classname="tests.test_camera_capture" name="test_failed_http_capture_retains_status_and_no_false_clock" time="0.001" /><testcase classname="tests.test_camera_capture" name="test_real_transcode_keeps_audio_delay_relative_to_source_video" time="0.479" /><testcase classname="tests.test_confidence" name="test_complete_fixture_passes_without_probability_and_preserves_inputs" time="0.001" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[noise-no_doppler_events]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[missing-missing_flight_data]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[partial-partial_flight_coverage]" time="0.001" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[incomplete-search_incomplete]" time="0.002" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[harmonics-insufficient_independent_events]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[clock-timing_not_established]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[residual-inconsistent_event_match]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[support-insufficient_track_support]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[drift-source_drift_unresolved]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[altitude_only-uncertainty_not_established]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[no_alternatives-alternatives_not_assessed]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[wide-location_uncertainty_too_large]" time="0.002" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[boundary-refinement_boundary_limited]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[no_tracks-no_matching_flights]" time="0.000" /><testcase classname="tests.test_confidence" name="test_distant_tie_and_same_location_different_flights" time="0.001" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[60.0--1.2-succeeded]" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[90.0--1.2-inconclusive]" time="0.001" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[150.0--1.2-inconclusive]" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[90.0--5.0-succeeded]" time="0.000" /><testcase classname="tests.test_confidence" name="test_malformed_results_fail_instead_of_masquerading_as_insufficient_evidence" time="0.000" /><testcase classname="tests.test_confidence" name="test_w3_vertical_only_profile_is_not_a_100m_confidence_claim" time="0.001" /><testcase classname="tests.test_confidence" name="test_known_clock_single_event_requires_full_trusted_window_sensitivity" time="0.001" /><testcase classname="tests.test_confidence" name="test_explicit_subset_keeps_unconfirmed_proposals_without_forcing_matches" time="0.001" /><testcase classname="tests.test_confidence" name="test_all_four_independent_flyovers_are_checked" time="0.001" /><testcase classname="tests.test_confidence" name="test_finite_search_can_pass_without_claiming_continuous_exhaustion" time="0.001" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[discard-retention_may_hide_alternatives]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[complete-finite_search_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[pruning-finite_search_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[assessed-finite_modes_not_assessed]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[mapping-finite_candidate_mapping_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[lost_score-finite_candidate_scores_inconsistent]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_retention_bound_uses_declared_subset_units" time="0.000" /><testcase classname="tests.test_confidence" name="test_malformed_finite_flags_fail_instead_of_looking_like_insufficient_data" time="0.000" /><testcase classname="tests.test_contracts" name="test_examples_roundtrip_without_mutating_inputs" time="0.001" /><testcase classname="tests.test_contracts" name="test_time_window_is_recording_start_with_explicit_timezone" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change0]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change1]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change2]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change3]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change4]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change5]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change6]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_request_and_truth_fields_rejected[change7]" time="0.000" /><testcase classname="tests.test_contracts" name="test_untrusted_time_source_and_reversed_window_rejected" time="0.000" /><testcase classname="tests.test_contracts" name="test_ridge_time_and_frequency_are_recording_relative" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_ridge_samples_rejected[time_s-40.0]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_ridge_samples_rejected[frequency_hz-inf]" time="0.000" /><testcase classname="tests.test_contracts" name="test_invalid_ridge_samples_rejected[weight--1]" time="0.000" /><testcase classname="tests.test_contracts" name="test_recording_metadata_labels_decoded_samples_and_source_hash" time="0.000" /><testcase classname="tests.test_contracts" name="test_uncalibrated_radius_is_not_a_probability" time="0.000" /><testcase classname="tests.test_contracts" name="test_job_decisions_require_support_or_explanations" time="0.000" /><testcase classname="tests.test_contracts" name="test_ranked_candidates_must_be_comparable_and_reference_real_events" time="0.001" /><testcase classname="tests.test_contracts" name="test_coverage_distinguishes_finished_search_from_available_data" time="0.000" /><testcase classname="tests.test_contracts" name="test_artifact_paths_cannot_leave_job_directory[../other-job/file.json]" time="0.001" /><testcase classname="tests.test_contracts" name="test_artifact_paths_cannot_leave_job_directory[/etc/passwd]" time="0.001" /><testcase classname="tests.test_contracts" name="test_artifact_paths_cannot_leave_job_directory[C:\\private\\file]" time="0.000" /><testcase classname="tests.test_contracts" name="test_artifact_paths_cannot_leave_job_directory[nested/../../file]" time="0.001" /><testcase classname="tests.test_data_access" name="test_whole_segments_jets_unknown_altitude_and_repeat" time="0.053" /><testcase classname="tests.test_data_access" name="test_truncated_parquet_and_payload_corruption" time="0.018" /><testcase classname="tests.test_data_access" name="test_resumable_download_validates_ranges_and_offline_cache" time="0.002" /><testcase classname="tests.test_data_access" name="test_streaming_split_readsb_archive" time="0.002" /><testcase classname="tests.test_data_access" name="test_terrain_offline_datum_missing_and_corruption" time="0.014" /><testcase classname="tests.test_data_access" name="test_terrain_degree_boundary_uses_published_cog_extent" time="0.030" /><testcase classname="tests.test_data_access" name="test_index_bounds_include_hermite_excursion_between_samples" time="0.015" /><testcase classname="tests.test_data_access" name="test_index_partial_velocity_inference_preserves_measured_zero" time="0.009" /><testcase classname="tests.test_discovery" name="test_blind_whole_file_seams_harmonics_and_separate_events" time="1.792" /><testcase classname="tests.test_discovery" name="test_noise_stationary_tones_and_upward_chirp_are_rejected" time="0.241" /><testcase classname="tests.test_discovery" name="test_overlapping_nonharmonic_events_are_retained" time="0.414" /><testcase classname="tests.test_discovery" name="test_short_input_has_no_forced_event" time="0.108" /><testcase classname="tests.test_discovery" name="test_missing_fundamental_harmonics_are_one_event" time="0.331" /><testcase classname="tests.test_discovery" name="test_switching_stationary_tones_do_not_make_a_flyover" time="0.227" /><testcase classname="tests.test_discovery" name="test_interrupted_tone_is_one_event_without_invented_gap_observations" time="0.296" /><testcase classname="tests.test_discovery" name="test_ambiguous_fragment_continuations_remain_separate" time="0.001" /><testcase classname="tests.test_discovery" name="test_all_independent_flyovers_are_retained[4]" time="1.300" /><testcase classname="tests.test_discovery" name="test_all_independent_flyovers_are_retained[6]" time="1.978" /><testcase classname="tests.test_evaluation" name="test_maximum_matching_and_harmonic_deduplication" time="0.000" /><testcase classname="tests.test_evaluation" name="test_all_outcomes_and_eligibility" time="0.000" /><testcase classname="tests.test_evaluation" name="test_case_ids_and_terminal_results_are_required" time="0.001" /><testcase classname="tests.test_evaluation" name="test_distance_tiers_keep_abstained_diagnostics_out_of_success_counts" time="0.000" /><testcase classname="tests.test_evaluation" name="test_runner_does_not_require_truth_and_measures_each_process" time="0.032" /><testcase classname="tests.test_evaluation" name="test_frozen_replay_preserves_all_cases" time="0.002" /><testcase classname="tests.test_filters" name="test_silence_and_locked_offset_filter" time="0.012" /><testcase classname="tests.test_filters" name="test_known_jets_only_are_excluded_and_gaps_are_not_interpolated" time="0.014" /><testcase classname="tests.test_finite_evidence_independent" name="test_refinement_improvement_does_not_rewrite_immutable_seed_evidence" time="0.001" /><testcase classname="tests.test_finite_evidence_independent" name="test_a_worse_refinement_cannot_erase_the_better_original_seed" time="0.000" /><testcase classname="tests.test_finite_evidence_independent" name="test_full_finite_accounting_does_not_hide_same_association_distant_mode" time="0.000" /><testcase classname="tests.test_finite_evidence_independent" name="test_global_group_bound_is_used_for_a_potentially_larger_discarded_subset" time="0.000" /><testcase classname="tests.test_finite_evidence_independent" name="test_exact_declared_discard_margin_remains_competitive" time="0.000" /><testcase classname="tests.test_finite_evidence_independent" name="test_a_resolved_discard_margin_remains_distinct_from_equality" time="0.000" /><testcase classname="tests.test_finite_evidence_independent" name="test_exact_declared_retained_margin_remains_competitive" time="0.000" /><testcase classname="tests.test_index_geometry_invariants" name="test_partial_null_preserves_other_measured_velocity_components" time="0.010" /><testcase classname="tests.test_index_geometry_invariants" name="test_query_contains_continuous_curve_outside_sampled_coordinate_box" time="0.011" /><testcase classname="tests.test_intake" name="test_stereo_resampling_chunk_times_and_missing_clock" time="0.177" /><testcase classname="tests.test_intake" name="test_mp3_codec_skip_preserves_audio_zero" time="0.295" /><testcase classname="tests.test_intake" name="test_creation_tag_is_a_hint_and_short_clip_is_valid" time="0.157" /><testcase classname="tests.test_intake" name="test_malformed_missing_empty_and_invalid_clock" time="0.142" /><testcase classname="tests.test_locked_scoring" name="test_second_event_cannot_get_its_own_time_adjustment" time="0.006" /><testcase classname="tests.test_matching" name="test_robust_source_drift_and_outliers_preserve_wrong_track_penalty" time="0.002" /><testcase classname="tests.test_matching" name="test_drift_is_bounded_and_incomplete_support_cannot_win" time="0.001" /><testcase classname="tests.test_matching" name="test_robust_mode_locks_all_event_clocks_and_rejects_missing_passes" time="0.032" /><testcase classname="tests.test_matching" name="test_adapter_retains_jet_with_misleading_straight_geometry_and_merges_harmonics" time="0.004" /><testcase classname="tests.test_matching" name="test_uncertainty_requires_one_common_recording_start_interval" time="0.007" /><testcase classname="tests.test_matching" name="test_joint_refinement_uses_nonparallel_passes_and_profiles_altitude" time="1.644" /><testcase classname="tests.test_matching" name="test_refinement_cannot_move_a_trusted_clock_outside_its_window[window0]" time="0.031" /><testcase classname="tests.test_matching" name="test_refinement_cannot_move_a_trusted_clock_outside_its_window[window1]" time="0.053" /><testcase classname="tests.test_matching" name="test_source_fit_matches_independent_bounded_solver_on_interior_and_edges" time="0.039" /><testcase classname="tests.test_matching" name="test_full_sensitivity_reoptimizes_all_sources_without_moving_exact_utc" time="7.192" /><testcase classname="tests.test_matching" name="test_missing_sensitivity_scenario_is_retained_as_incomplete_evidence" time="0.309" /><testcase classname="tests.test_matching" name="test_exhausted_real_optimizer_cannot_report_complete_sensitivity" time="0.057" /><testcase classname="tests.test_matching" name="test_flight_altitude_bias_preserves_derivatives_and_original_track" time="0.002" /><testcase classname="tests.test_matching" name="test_unestablished_flight_datum_prevents_complete_sensitivity" time="0.327" /><testcase classname="tests.test_matching" name="test_overlay_prediction_uses_fitted_emission_drift_and_preserves_support" time="0.001" /><testcase classname="tests.test_methodology_verifier" name="test_timing_pilots_recover_inserted_delay[-70]" time="0.008" /><testcase classname="tests.test_methodology_verifier" name="test_timing_pilots_recover_inserted_delay[0]" time="0.008" /><testcase classname="tests.test_methodology_verifier" name="test_timing_pilots_recover_inserted_delay[83]" time="0.007" /><testcase classname="tests.test_methodology_verifier" name="test_unrelated_or_silent_audio_cannot_pass_timing" time="0.004" /><testcase classname="tests.test_methodology_verifier" name="test_truncated_decode_cannot_pass_timing" time="0.003" /><testcase classname="tests.test_missing_velocity" name="test_adsblol_importer_preserves_unknown_velocity_components[speed]" time="0.002" /><testcase classname="tests.test_missing_velocity" name="test_adsblol_importer_preserves_unknown_velocity_components[heading]" time="0.002" /><testcase classname="tests.test_missing_velocity" name="test_adsblol_importer_preserves_unknown_velocity_components[vertical_rate]" time="0.001" /><testcase classname="tests.test_missing_velocity" name="test_adsblol_importer_preserves_unknown_velocity_components[all]" time="0.002" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_nullable_trace_velocity_from_positions[speed]" time="0.004" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_nullable_trace_velocity_from_positions[heading]" time="0.004" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_nullable_trace_velocity_from_positions[vertical_rate]" time="0.004" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_nullable_trace_velocity_from_positions[all]" time="0.004" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_partial_null_canonical_velocity[csv]" time="0.005" /><testcase classname="tests.test_missing_velocity" name="test_load_tracks_infers_partial_null_canonical_velocity[parquet]" time="0.018" /><testcase classname="tests.test_missing_velocity" name="test_velocity_inference_uses_each_gap_split_segment" time="0.005" /><testcase classname="tests.test_missing_velocity" name="test_measured_zero_velocity_is_preserved" time="0.005" /><testcase classname="tests.test_missing_velocity" name="test_missing_horizontal_velocity_keeps_measured_zero_climb" time="0.004" /><testcase classname="tests.test_missing_velocity" name="test_missing_climb_keeps_measured_zero_horizontal_velocity" time="0.003" /><testcase classname="tests.test_mp3_smoke" name="test_mp3_decode_preserves_timing_and_tone" time="0.114" /><testcase classname="tests.test_physics" name="test_retarded_time_against_closed_form_and_large_epoch" time="0.005" /><testcase classname="tests.test_physics" name="test_cpa_and_no_extrapolation" time="0.001" /><testcase classname="tests.test_physics" name="test_vectorized_cpa_matches_independent_continuous_minimum" time="0.004" /><testcase classname="tests.test_physics" name="test_repeated_flyovers_are_not_collapsed_to_one_global_cpa" time="0.003" /><testcase classname="tests.test_physics" name="test_sparse_cpa_graph_agrees_with_dense_reference_on_curved_track" time="0.006" /><testcase classname="tests.test_pipeline_replay" name="test_real_child_failure_keeps_output_and_exit_status" time="0.017" /><testcase classname="tests.test_pipeline_replay" name="test_real_child_timeout_cannot_be_reported_as_success" time="0.253" /><testcase classname="tests.test_pipeline_replay" name="test_missing_case_is_recorded_and_later_cases_still_run" time="0.004" /><testcase classname="tests.test_pipeline_replay" name="test_evaluation_failure_preserves_successful_child_receipt" time="0.002" /><testcase classname="tests.test_pipeline_replay" name="test_updated_error_thresholds_preserve_the_historical_faint_receipt" time="0.000" /><testcase classname="tests.test_search_invariants" name="test_selected_middle_pass_is_not_an_unobserved_flyover[distinct-aircraft]" time="0.009" /><testcase classname="tests.test_search_invariants" name="test_selected_middle_pass_is_not_an_unobserved_flyover[repeated-aircraft]" time="0.007" /><testcase classname="tests.test_search_invariants" name="test_unselected_close_pass_still_violates_silence[extra]" time="0.007" /><testcase classname="tests.test_search_invariants" name="test_unselected_close_pass_still_violates_silence[a]" time="0.007" /><testcase classname="tests.test_search_invariants" name="test_unselected_distant_pass_does_not_trigger_silence_heuristic" time="0.007" /><testcase classname="tests.test_terrain" name="test_raster_height_and_geoid_are_combined_and_missing_coverage_is_rejected" time="0.005" /><testcase classname="tests.test_tiled_search" name="test_tiled_equals_untiled_boundary_and_locked_timing" time="0.357" /><testcase classname="tests.test_tiled_search" name="test_budget_exhaustion_and_source_holes_are_partial" time="0.135" /><testcase classname="tests.test_tiled_search" name="test_merge_is_deterministic_and_preserves_repeat_approaches" time="0.000" /><testcase classname="tests.test_tiled_search" name="test_ridge_only_adapter_and_exact_recording_clock" time="0.138" /></testsuite></testsuites>
\ No newline at end of file
diff --git a/evidence/verification/physical-20261103/finite-margin-review/before.log b/evidence/verification/physical-20261103/finite-margin-review/before.log
new file mode 100644
index 0000000..d1f7c37
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/before.log
@@ -0,0 +1,39 @@
+......................................F.F [100%]
+=================================== FAILURES ===================================
+____________ test_exact_declared_discard_margin_remains_competitive ____________
+
+ def test_exact_declared_discard_margin_remains_competitive():
+ case = bundle()
+ finite = case[3]["finite_search_evidence"]
+ finite.update(discarded_count=1, best_discarded_score=1.4)
+ # The declared real-valued gap is (1.8-1.4)/2 == 0.2. Rounding cannot
+ # promote equality across the existing strict-more-than retention gate.
+ result = decide(case)
+> assert result["status"] == "inconclusive"
+E AssertionError: assert 'succeeded' == 'inconclusive'
+E
+E - inconclusive
+E + succeeded
+
+../DOPPLERGEIST-finite-review/tests/test_finite_evidence_independent.py:102: AssertionError
+___________ test_exact_declared_retained_margin_remains_competitive ____________
+
+ def test_exact_declared_retained_margin_remains_competitive():
+ case = bundle()
+ case[1].append(dict(case[1][0], lat=45.0, score=1.4))
+ case[3]["candidate_mode_ids"].append("seed-b")
+ case[3]["assessed_mode_ids"].append("seed-b")
+ case[3]["finite_search_evidence"]["retained_modes"].append(
+ {"mode_id": "seed-b", "score": 1.4, "event_groups": 2})
+ result = decide(case)
+> assert result["status"] == "inconclusive"
+E AssertionError: assert 'succeeded' == 'inconclusive'
+E
+E - inconclusive
+E + succeeded
+
+../DOPPLERGEIST-finite-review/tests/test_finite_evidence_independent.py:120: AssertionError
+=========================== short test summary info ============================
+FAILED ::test_exact_declared_discard_margin_remains_competitive - AssertionEr...
+FAILED ::test_exact_declared_retained_margin_remains_competitive - AssertionE...
+2 failed, 39 passed in 0.12s
diff --git a/evidence/verification/physical-20261103/finite-margin-review/before.xml b/evidence/verification/physical-20261103/finite-margin-review/before.xml
new file mode 100644
index 0000000..b0146f8
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/before.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="0" failures="2" skipped="0" tests="41" time="0.125" timestamp="2026-11-02T22:16:31.215425-04:00" hostname="05c893b10fbb"><testcase classname="tests.test_confidence" name="test_complete_fixture_passes_without_probability_and_preserves_inputs" time="0.001" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[noise-no_doppler_events]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[missing-missing_flight_data]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[partial-partial_flight_coverage]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[incomplete-search_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[harmonics-insufficient_independent_events]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[clock-timing_not_established]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[residual-inconsistent_event_match]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[support-insufficient_track_support]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[drift-source_drift_unresolved]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[altitude_only-uncertainty_not_established]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[no_alternatives-alternatives_not_assessed]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[wide-location_uncertainty_too_large]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[boundary-refinement_boundary_limited]" time="0.000" /><testcase classname="tests.test_confidence" name="test_insufficient_evidence_abstains[no_tracks-no_matching_flights]" time="0.000" /><testcase classname="tests.test_confidence" name="test_distant_tie_and_same_location_different_flights" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[60.0--1.2-succeeded]" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[90.0--1.2-inconclusive]" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[150.0--1.2-inconclusive]" time="0.000" /><testcase classname="tests.test_confidence" name="test_near_tied_locations_fit_the_returned_envelope[90.0--5.0-succeeded]" time="0.000" /><testcase classname="tests.test_confidence" name="test_malformed_results_fail_instead_of_masquerading_as_insufficient_evidence" time="0.000" /><testcase classname="tests.test_confidence" name="test_w3_vertical_only_profile_is_not_a_100m_confidence_claim" time="0.000" /><testcase classname="tests.test_confidence" name="test_known_clock_single_event_requires_full_trusted_window_sensitivity" time="0.000" /><testcase classname="tests.test_confidence" name="test_explicit_subset_keeps_unconfirmed_proposals_without_forcing_matches" time="0.001" /><testcase classname="tests.test_confidence" name="test_all_four_independent_flyovers_are_checked" time="0.001" /><testcase classname="tests.test_confidence" name="test_finite_search_can_pass_without_claiming_continuous_exhaustion" time="0.001" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[discard-retention_may_hide_alternatives]" time="0.001" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[complete-finite_search_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[pruning-finite_search_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[assessed-finite_modes_not_assessed]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[mapping-finite_candidate_mapping_incomplete]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_search_cannot_hide_omitted_or_near_tied_modes[lost_score-finite_candidate_scores_inconsistent]" time="0.000" /><testcase classname="tests.test_confidence" name="test_finite_retention_bound_uses_declared_subset_units" time="0.001" /><testcase classname="tests.test_confidence" name="test_malformed_finite_flags_fail_instead_of_looking_like_insufficient_data" time="0.000" /><testcase classname="" name="test_refinement_improvement_does_not_rewrite_immutable_seed_evidence" time="0.000" /><testcase classname="" name="test_a_worse_refinement_cannot_erase_the_better_original_seed" time="0.000" /><testcase classname="" name="test_full_finite_accounting_does_not_hide_same_association_distant_mode" time="0.000" /><testcase classname="" name="test_global_group_bound_is_used_for_a_potentially_larger_discarded_subset" time="0.000" /><testcase classname="" name="test_exact_declared_discard_margin_remains_competitive" time="0.000"><failure message="AssertionError: assert 'succeeded' == 'inconclusive'&#10; &#10; - inconclusive&#10; + succeeded">def test_exact_declared_discard_margin_remains_competitive():
+ case = bundle()
+ finite = case[3]["finite_search_evidence"]
+ finite.update(discarded_count=1, best_discarded_score=1.4)
+ # The declared real-valued gap is (1.8-1.4)/2 == 0.2. Rounding cannot
+ # promote equality across the existing strict-more-than retention gate.
+ result = decide(case)
+&gt; assert result["status"] == "inconclusive"
+E AssertionError: assert 'succeeded' == 'inconclusive'
+E
+E - inconclusive
+E + succeeded
+
+../DOPPLERGEIST-finite-review/tests/test_finite_evidence_independent.py:102: AssertionError</failure></testcase><testcase classname="" name="test_a_resolved_discard_margin_remains_distinct_from_equality" time="0.000" /><testcase classname="" name="test_exact_declared_retained_margin_remains_competitive" time="0.001"><failure message="AssertionError: assert 'succeeded' == 'inconclusive'&#10; &#10; - inconclusive&#10; + succeeded">def test_exact_declared_retained_margin_remains_competitive():
+ case = bundle()
+ case[1].append(dict(case[1][0], lat=45.0, score=1.4))
+ case[3]["candidate_mode_ids"].append("seed-b")
+ case[3]["assessed_mode_ids"].append("seed-b")
+ case[3]["finite_search_evidence"]["retained_modes"].append(
+ {"mode_id": "seed-b", "score": 1.4, "event_groups": 2})
+ result = decide(case)
+&gt; assert result["status"] == "inconclusive"
+E AssertionError: assert 'succeeded' == 'inconclusive'
+E
+E - inconclusive
+E + succeeded
+
+../DOPPLERGEIST-finite-review/tests/test_finite_evidence_independent.py:120: AssertionError</failure></testcase></testsuite></testsuites>
\ No newline at end of file
diff --git a/evidence/verification/physical-20261103/finite-margin-review/receipt.json b/evidence/verification/physical-20261103/finite-margin-review/receipt.json
new file mode 100644
index 0000000..43dfae3
--- /dev/null
+++ b/evidence/verification/physical-20261103/finite-margin-review/receipt.json
@@ -0,0 +1,52 @@
+{
+ "scope": "Independent finite-decision controls and conservative roundoff repair; no national replay or acceptance promotion.",
+ "baseline_source": "4bdc1fd144ad37b416faa216e78ac88652c3922d",
+ "fixed_source": "fd7f63e5f4d7d133a721b57bab4de91c90911878",
+ "fixed_source_tree": "90adefa3f938ef3355f9de7b7d4f186441b82339",
+ "boundary": {
+ "leading_score": 1.8,
+ "competing_score": 1.4,
+ "groups": 2,
+ "policy_margin": 0.2,
+ "computed_gap": 0.20000000000000007,
+ "baseline_status": "succeeded",
+ "fixed_status": "inconclusive"
+ },
+ "guard": {
+ "relative_tolerance": 1e-12,
+ "absolute_tolerance": 1e-12,
+ "scope": "Only equality at roundoff; can only preserve an inconclusive outcome."
+ },
+ "files": {
+ "src/aircraft_geoloc/confidence.py": {
+ "sha256": "5f4e087c61d495bbe5026bb1f81229f52edd0540fbf517ddcb0614cb0b291930",
+ "bytes": 20358
+ },
+ "tests/test_finite_evidence_independent.py": {
+ "sha256": "27b61543817b1f598e29489fa754579282dfe9eae3ce291f762ce63229744a3b",
+ "bytes": 5683
+ }
+ },
+ "test_results": {
+ "before": {
+ "name": "pytest",
+ "errors": "0",
+ "failures": "2",
+ "skipped": "0",
+ "tests": "41",
+ "time": "0.125",
+ "timestamp": "2026-11-02T22:16:31.215425-04:00",
+ "hostname": "05c893b10fbb"
+ },
+ "after-fullsuite": {
+ "name": "pytest",
+ "errors": "0",
+ "failures": "0",
+ "skipped": "0",
+ "tests": "176",
+ "time": "20.829",
+ "timestamp": "2026-11-02T22:15:43.053206-04:00",
+ "hostname": "05c893b10fbb"
+ }
+ }
+}
diff --git a/src/aircraft_geoloc/confidence.py b/src/aircraft_geoloc/confidence.py
index 231809d..a7ccc0d 100644
--- a/src/aircraft_geoloc/confidence.py
+++ b/src/aircraft_geoloc/confidence.py
@@ -34,6 +34,12 @@ class DecisionPolicy:
raise ValueError(f"{name} must lie in [0, 1]")
+def _near_tied(gap, margin):
+ # Decimal policy margins and subtracted scores can differ at roundoff.
+ # Equality remains competitive; this small guard cannot create acceptance.
+ return gap <= margin or math.isclose(gap, margin, rel_tol=1e-12, abs_tol=1e-12)
+
+
def _finite_search(evidence, diagnostics, candidates, group_counts, policy):
"""Check producer-accounted evaluated modes, without a continuous-space claim."""
if not isinstance(evidence, dict) or type(evidence.get("schema_version")) is not int or evidence["schema_version"] != 1:
@@ -103,7 +109,7 @@ def _finite_search(evidence, diagnostics, candidates, group_counts, policy):
threshold = (policy.near_tie_support_per_group if candidates[0]["score_kind"] ==
"matched_group_support_minus_normalized_residual" else policy.near_tie_loss_per_event_hz)
details["discarded_score_gap_per_group"] = gap
- if gap <= threshold:
+ if _near_tied(gap, threshold):
return "retention_may_hide_alternatives", details
return None, details
@@ -246,7 +252,7 @@ def decide_location(events, candidates, coverage, *, matching_diagnostics=None,
gap = (best["score"] - alternative["score"]) / max(len(groups), len(alternative_groups))
threshold = policy.near_tie_support_per_group if subset_scores else policy.near_tie_loss_per_event_hz
units = "support_units_per_group" if subset_scores else "loss_hz_per_group"
- if (separation > ambiguity_radius_m or not same_flights) and gap <= threshold:
+ if (separation > ambiguity_radius_m or not same_flights) and _near_tied(gap, threshold):
diagnostics["competing_hypothesis"] = {"separation_m": separation, "score_gap": gap, "gap_units": units,
"same_flight_association": same_flights, "checked_radius_m": ambiguity_radius_m}
return result("ambiguous_locations" if separation > ambiguity_radius_m else "ambiguous_flight_match",
diff --git a/tests/test_finite_evidence_independent.py b/tests/test_finite_evidence_independent.py
new file mode 100644
index 0000000..6d87d47
--- /dev/null
+++ b/tests/test_finite_evidence_independent.py
@@ -0,0 +1,121 @@
+"""Independent decision-contract controls; these do not simulate a national run."""
+from copy import deepcopy
+
+from aircraft_geoloc.confidence import decide_location
+
+
+def bundle():
+ events = [
+ {"event_id": f"event-{i}", "start_s": 100.0*i, "end_s": 100.0*i+20.0,
+ "band_hz": [90.0, 200.0], "harmonic_group_id": f"flyover-{i}",
+ "ridge": [{"time_s": 100.0*i+t, "frequency_hz": 160.0-t}
+ for t in (0.0, 10.0, 20.0)]}
+ for i in range(2)
+ ]
+ candidates = [{"lat": 40.0, "lon": -100.0, "score": 1.8,
+ "score_kind": "matched_group_support_minus_normalized_residual",
+ "event_ids": ["event-0", "event-1"], "flight_ids": ["a", "b"],
+ "recording_start_utc": "2026-09-21T14:13:20Z",
+ "uncertainty": {"kind": "sensitivity", "radius_m": 100.0,
+ "method": "independent_contract_control"}}]
+ coverage = {"search_complete": True, "data_status": "available",
+ "limitations": ["This is a decision-only control."]}
+ diagnostics = {"clock_locked": True, "alternatives_evaluated": False,
+ "refinement_boundary_limited": False,
+ "sensitivity": {"complete": True, "boundary_limited": False,
+ "radius_m": 100.0,
+ "sources": ["frequency", "clock", "altitude", "sound_speed"]},
+ "assessed_mode_ids": ["seed-a"], "candidate_mode_ids": ["seed-a"],
+ "finite_search_evidence": {
+ "schema_version": 1, "scope": "evaluated_finite_grid", "complete": True,
+ "score_kind": candidates[0]["score_kind"],
+ "spacing_m": 1000.0, "refine_spacing_m": 100.0,
+ "max_event_groups": 2,
+ "retained_modes": [{"mode_id": "seed-a", "score": 1.8, "event_groups": 2}],
+ "discarded_count": 0, "best_discarded_score": None,
+ "pruning_accounted_for": True,
+ "limitations": ["Only declared evaluated finite points are compared."]}}
+ for event in events:
+ diagnostics[event["event_id"]] = {"rmse_hz": 0.2, "outlier_fraction": 0.0,
+ "support_fraction": 1.0, "drift_at_bound": False}
+ return events, candidates, coverage, diagnostics
+
+
+def decide(case):
+ return decide_location(*case[:3], matching_diagnostics=case[3])
+
+
+def test_refinement_improvement_does_not_rewrite_immutable_seed_evidence():
+ case = bundle()
+ original = deepcopy(case[1][0])
+ case[1][0]["score"] = 1.95
+ case[1].append(original)
+ case[3]["candidate_mode_ids"].append("seed-a")
+ before = deepcopy(case)
+ assert decide(case)["status"] == "succeeded"
+ assert case == before
+ assert case[3]["finite_search_evidence"]["retained_modes"][0]["score"] == 1.8
+
+
+def test_a_worse_refinement_cannot_erase_the_better_original_seed():
+ case = bundle()
+ case[1][0]["score"] = 1.6
+ assert decide(case)["reason_code"] == "finite_candidate_scores_inconsistent"
+
+
+def test_full_finite_accounting_does_not_hide_same_association_distant_mode():
+ case = bundle()
+ alternative = dict(case[1][0], lat=45.0, score=1.7)
+ case[1].append(alternative)
+ case[3]["candidate_mode_ids"].append("seed-b")
+ case[3]["assessed_mode_ids"].append("seed-b")
+ case[3]["finite_search_evidence"]["retained_modes"].append(
+ {"mode_id": "seed-b", "score": 1.7, "event_groups": 2})
+ result = decide(case)
+ assert result["status"] == "inconclusive"
+ assert result["reason_code"] == "ambiguous_locations"
+
+
+def test_global_group_bound_is_used_for_a_potentially_larger_discarded_subset():
+ case = bundle()
+ for i in range(2, 6):
+ event = deepcopy(case[0][0])
+ event.update(event_id=f"event-{i}", harmonic_group_id=f"flyover-{i}",
+ start_s=100.0*i, end_s=100.0*i+20.0)
+ for point in event["ridge"]:
+ point["time_s"] += 100.0*i
+ case[0].append(event)
+ case[3]["unmatched_event_ids"] = [f"event-{i}" for i in range(2, 6)]
+ finite = case[3]["finite_search_evidence"]
+ finite.update(max_event_groups=6, discarded_count=1, best_discarded_score=0.9)
+ # 0.9/2 would pass, but 0.9/6 cannot exclude a six-group competitor.
+ assert decide(case)["reason_code"] == "retention_may_hide_alternatives"
+
+
+def test_exact_declared_discard_margin_remains_competitive():
+ case = bundle()
+ finite = case[3]["finite_search_evidence"]
+ finite.update(discarded_count=1, best_discarded_score=1.4)
+ # The declared real-valued gap is (1.8-1.4)/2 == 0.2. Rounding cannot
+ # promote equality across the existing strict-more-than retention gate.
+ result = decide(case)
+ assert result["status"] == "inconclusive"
+ assert result["reason_code"] == "retention_may_hide_alternatives"
+
+
+def test_a_resolved_discard_margin_remains_distinct_from_equality():
+ case = bundle()
+ case[3]["finite_search_evidence"].update(discarded_count=1, best_discarded_score=1.399999)
+ assert decide(case)["status"] == "succeeded"
+
+
+def test_exact_declared_retained_margin_remains_competitive():
+ case = bundle()
+ case[1].append(dict(case[1][0], lat=45.0, score=1.4))
+ case[3]["candidate_mode_ids"].append("seed-b")
+ case[3]["assessed_mode_ids"].append("seed-b")
+ case[3]["finite_search_evidence"]["retained_modes"].append(
+ {"mode_id": "seed-b", "score": 1.4, "event_groups": 2})
+ result = decide(case)
+ assert result["status"] == "inconclusive"
+ assert result["reason_code"] == "ambiguous_locations"