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 resident-memory regression and six-event equivalence evidence (#4)
Cinna Davisb7d5074e2231
diff --git a/evidence/audio/w1-cache-memory-20261103/README.md b/evidence/audio/w1-cache-memory-20261103/README.mdnew file mode 100644index 0000000..4ed5883--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/README.md@@ -0,0 +1,48 @@+# Bounded sample-buffer residency++Production I/O fix1f95689 replaces a whole-cache memory map with seek/read of the+active float32 chunk. The file-sized resident set violated the intended intake+bound even though the decoded signal and chunk arrays were already disk-backed.+No decode, metadata, time, detection setting or association rule changes.++| Synthetic raw cache | Old RSS growth | Window-read RSS growth |+| --- | ---: | ---: |+|32 MiB|35.578 MiB|3.625 MiB|+|128 MiB|131.727 MiB|3.672 MiB|++Both use fixed120s chunks and60s overlap. These are synthetic zero-valued raw-cache+I/O probes, explicitly not field recordings, media acquisitions or full-pipeline+memory measurements. The operating system manages its filesystem cache; this+measures the iterator's process-resident sample buffers. Consumer results, event+records and plots have separate memory costs.++The Linux regression uses a128MiB sparse cache and samples live VmRSS in a fresh+child during iteration, with a32MiB growth budget. It also verifies complete end+coverage and zero checksum. Baseline intake module from63d620f was copied into+an isolated package overlay, without altering the working tree. The new test+fails on that baseline (regression-before.log) and passes with the window reader.+The live-RSS test is committed in975da54; the test source and production bytes+used by the full-suite run are preserved at that tree.++Checks:++- All5 intake tests pass in1.66s, including actual MP3/WAV timing and channel tests.+- Full current worktree suite: **200 passed, 6 subtests passed in38.07s**.+- A replay of the previously evaluated canonical six-event cache produces an+ exactly identical complete event list (same semantic SHA256). No threshold+ tuning; this is an I/O regression, not a new held-out or location result.++Exact commands use the shared environment and actual worktree source:++```bash+PYTHONPATH=results/baseline-package /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q tests/test_intake.py::test_chunk_iterator_does_not_retain_recording_sized_rss --basetemp=results/pytest-cache-memory-proc-before+PYTHONPATH=src /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q tests/test_intake.py --basetemp=results/pytest-cache-memory-proc-after+PYTHONPATH=src /home/cinna/aircraft-audio-geolocation/.venv/bin/python -m pytest -q --basetemp=results/pytest-cache-full-suite+```++The before overlay contains unmodified baseline intake.py from git63d620f plus+__init__.py/contracts.py. The after tests run the normal package. measure.py is+the separately executed fixed-window RSS probe; create sparse zero caches of the+recorded sizes and pass the path as its sole argument. Input cache binaries and+environments are deliberately not committed. receipt.json includes source hashes+and the before/after values; all failures and successful logs are preserved.diff --git a/evidence/audio/w1-cache-memory-20261103/SHA256SUMS.json b/evidence/audio/w1-cache-memory-20261103/SHA256SUMS.jsonnew file mode 100644index 0000000..0027a78--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/SHA256SUMS.json@@ -0,0 +1,13 @@+{+ "README.md": "036c6ca56baae1bc63c8e002c4929a3001cea067b01f3707f5632bf7c6a5a21a",+ "after-128MiB.json": "b4211dc281712ab648d8ebc3a13e983a78cd721660ec1d6b13fb6bbe12ae15b1",+ "after-32MiB.json": "78cb5170df5de6f32765e1f11fcf5b0f0f2993377eb7db6513a11da6846860be",+ "before-128MiB.json": "a0ece60b0394e4884e7c5e78af01cca911c8d2fc0cd855ce9f7c3566a1192d31",+ "before-32MiB.json": "97acf7c4c5db151f7745346654c4e36f53d428079a0af1cfb8353469a04491dc",+ "full-suite.log": "b084312b0c0b3b182d16f1c98142b5912a4919fb50bd6338e6afc18b9fc3f2f3",+ "intake-tests-after.log": "ceacb1836e51c06572c4b3587e18a749cec284e577d75429dad21ae9afadcb09",+ "measure.py": "a53d8f68c7865d05ca973e87d4a5e072795d0f2dace88352a6583a5337b3cdb2",+ "receipt.json": "2d2ec5ccd38d8f9ac07d71dbf4f989cc9c1a04fadd26674d3c0eddc7163153a9",+ "regression-before.log": "cf97cddeb4a2b68efdb151ca39cf1cabd0b8c818d29e50de91f36a8dc85cf8a9",+ "six-event-equivalence.json": "7721a7e614d0e54a2f37162c1d21b09d5474ae6e4e9e13b2b34e71282e3a0c52"+}diff --git a/evidence/audio/w1-cache-memory-20261103/after-128MiB.json b/evidence/audio/w1-cache-memory-20261103/after-128MiB.jsonnew file mode 100644index 0000000..1b2bfbb--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/after-128MiB.json@@ -0,0 +1 @@+{"scope": "Synthetic raw-cache iterator RSS only; not a recording or field acquisition", "cache_bytes": 134217728, "chunks": 139, "checksum": 0.0, "last_end_s": 8388.608, "duration_s": 8388.608, "baseline_rss_kib": 36188, "peak_rss_kib": 39948, "elapsed_s": 0.08357102802256122}diff --git a/evidence/audio/w1-cache-memory-20261103/after-32MiB.json b/evidence/audio/w1-cache-memory-20261103/after-32MiB.jsonnew file mode 100644index 0000000..638a8bc--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/after-32MiB.json@@ -0,0 +1 @@+{"scope": "Synthetic raw-cache iterator RSS only; not a recording or field acquisition", "cache_bytes": 33554432, "chunks": 34, "checksum": 0.0, "last_end_s": 2097.152, "duration_s": 2097.152, "baseline_rss_kib": 36480, "peak_rss_kib": 40192, "elapsed_s": 0.016747594985645264}diff --git a/evidence/audio/w1-cache-memory-20261103/before-128MiB.json b/evidence/audio/w1-cache-memory-20261103/before-128MiB.jsonnew file mode 100644index 0000000..dbd2948--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/before-128MiB.json@@ -0,0 +1 @@+{"scope": "Synthetic raw-cache iterator RSS only; not a recording or field acquisition", "cache_bytes": 134217728, "chunks": 139, "checksum": 0.0, "last_end_s": 8388.608, "duration_s": 8388.608, "baseline_rss_kib": 36412, "peak_rss_kib": 171300, "elapsed_s": 0.12183690900565125}diff --git a/evidence/audio/w1-cache-memory-20261103/before-32MiB.json b/evidence/audio/w1-cache-memory-20261103/before-32MiB.jsonnew file mode 100644index 0000000..78cc20f--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/before-32MiB.json@@ -0,0 +1 @@+{"scope": "Synthetic raw-cache iterator RSS only; not a recording or field acquisition", "cache_bytes": 33554432, "chunks": 34, "checksum": 0.0, "last_end_s": 2097.152, "duration_s": 2097.152, "baseline_rss_kib": 36700, "peak_rss_kib": 73132, "elapsed_s": 0.019214011990698054}diff --git a/evidence/audio/w1-cache-memory-20261103/full-suite.log b/evidence/audio/w1-cache-memory-20261103/full-suite.lognew file mode 100644index 0000000..cf88444--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/full-suite.log@@ -0,0 +1,4 @@+.................................................................. [ 33%]+........................................................................ [ 69%]+.............................................................. [100%]+200 passed, 6 subtests passed in 38.07sdiff --git a/evidence/audio/w1-cache-memory-20261103/intake-tests-after.log b/evidence/audio/w1-cache-memory-20261103/intake-tests-after.lognew file mode 100644index 0000000..056ff05--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/intake-tests-after.log@@ -0,0 +1,2 @@+..... [100%]+5 passed in 1.66sdiff --git a/evidence/audio/w1-cache-memory-20261103/measure.py b/evidence/audio/w1-cache-memory-20261103/measure.pynew file mode 100644index 0000000..491fad8--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/measure.py@@ -0,0 +1,11 @@+import hashlib,json,resource,sys,time+from pathlib import Path+import numpy as np+from aircraft_geoloc.intake import IntakeRecording+source=Path(sys.argv[1]);sr=4000;count=source.stat().st_size//4+recording=IntakeRecording(source,{'sample_rate_hz':sr,'duration_s':count/sr,'source_sha256':'0'*64,'channels':1,'source_format':'synthetic-zero-cache','time_window':None},{'sample_count':count})+before=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss;began=time.monotonic();chunks=0;checksum=0.0+for start,values in recording.iter_chunks():+ chunks+=1;checksum+=float(values.sum())+last_end=start+len(values)/sr+print(json.dumps({'scope':'Synthetic raw-cache iterator RSS only; not a recording or field acquisition','cache_bytes':source.stat().st_size,'chunks':chunks,'checksum':checksum,'last_end_s':last_end,'duration_s':count/sr,'baseline_rss_kib':before,'peak_rss_kib':resource.getrusage(resource.RUSAGE_SELF).ru_maxrss,'elapsed_s':time.monotonic()-began}))diff --git a/evidence/audio/w1-cache-memory-20261103/receipt.json b/evidence/audio/w1-cache-memory-20261103/receipt.jsonnew file mode 100644index 0000000..ac5e4dc--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/receipt.json@@ -0,0 +1,22 @@+{+ "scope": "Synthetic raw-cache memory stress, not field acquisition or full-pipeline RSS",+ "baseline_commit": "63d620f",+ "fixed_reader_commit": "1f95689915edd207b028ed8366c0536cebd449fc",+ "baseline_module_sha256": "c1d4c792c9e1cec1a9315b354d6fa58c0d4326c6773b19719bd859e7571c5648",+ "fixed_module_sha256": "15fe2a2823a57fb5856973a4b2cc711444ec5a667c1f6fc0d5e31bb482912d6a",+ "cache_values": "zero float32, synthetic fixtures",+ "chunk_s": 120,+ "overlap_s": 60,+ "rss_growth_mib": {+ "32": {+ "before": 35.578125,+ "after": 3.625+ },+ "128": {+ "before": 131.7265625,+ "after": 3.671875+ }+ },+ "rss_regression_commit": "975da54",+ "tested_intake_test_sha256": "e0e3383826aff871cd66a2a9b99d750fbdba1186bf100819aeb5519a32f5304e"+}diff --git a/evidence/audio/w1-cache-memory-20261103/regression-before.log b/evidence/audio/w1-cache-memory-20261103/regression-before.lognew file mode 100644index 0000000..08f592e--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/regression-before.log@@ -0,0 +1,42 @@+F [100%]+=================================== FAILURES ===================================+___________ test_chunk_iterator_does_not_retain_recording_sized_rss ____________++tmp_path = PosixPath('/home/cinna/dopplergeist-w1-bounded-chunks/results/pytest-cache-memory-proc-before/test_chunk_iterator_does_not_r0')++ @pytest.mark.skipif(sys.platform != "linux", reason="Linux /proc resident-memory accounting")+ def test_chunk_iterator_does_not_retain_recording_sized_rss(tmp_path):+ # A synthetic raw-cache stress fixture, not a captured audio recording.+ cache = tmp_path / "long.f32"+ with cache.open("wb") as stream:+ stream.truncate(128 * 1024**2)+ script = """+ import json, sys+ from pathlib import Path+ from aircraft_geoloc.intake import IntakeRecording+ path = Path(sys.argv[1])+ duration = path.stat().st_size / 4 / 4000+ metadata = dict(source_sha256="0" * 64, duration_s=duration, sample_rate_hz=4000,+ channels=1, source_format="synthetic_raw_cache", time_window=None)+ recording = IntakeRecording(path, metadata, {})+ def rss_kib():+ for line in Path("/proc/self/status").read_text().splitlines():+ if line.startswith("VmRSS:"):+ return int(line.split()[1])+ before = peak = rss_kib()+ checksum = 0.0+ for start, samples in recording.iter_chunks():+ checksum += float(samples.sum())+ peak = max(peak, rss_kib())+ print(json.dumps(dict(growth_kib=peak-before,+ last_end_s=start+len(samples)/4000, checksum=checksum)))+ """+ result = json.loads(subprocess.check_output([sys.executable, "-c", script, str(cache)], text=True))+> assert result["growth_kib"] < 32 * 1024, result+E AssertionError: {'growth_kib': 134880, 'last_end_s': 8388.608, 'checksum': 0.0}+E assert 134880 < (32 * 1024)++tests/test_intake.py:41: AssertionError+=========================== short test summary info ============================+FAILED tests/test_intake.py::test_chunk_iterator_does_not_retain_recording_sized_rss+1 failed in 0.44sdiff --git a/evidence/audio/w1-cache-memory-20261103/six-event-equivalence.json b/evidence/audio/w1-cache-memory-20261103/six-event-equivalence.jsonnew file mode 100644index 0000000..f773550--- /dev/null+++ b/evidence/audio/w1-cache-memory-20261103/six-event-equivalence.json@@ -0,0 +1,9 @@+{+ "scope": "I/O-only regression on previously evaluated canonical synthetic case; no new holdout/localization claim",+ "events_identical": true,+ "event_groups": 6,+ "expected_events_sha256": "ca91364341c611ac1e5127b0bb19f0dfd7e0db717875039f48b54b14c15b3dfb",+ "actual_events_sha256": "ca91364341c611ac1e5127b0bb19f0dfd7e0db717875039f48b54b14c15b3dfb",+ "decoded_cache_sha256": "5a2f1b1922d1b6c46117f51314bd154cedd3cfa4cb53b27b558a8ab09623ba15",+ "runtime_s": 2.1885961570078507+}