Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
fix(#10): report fine support progress in job watch
Cinna Davis9787d1c694ea
diff --git a/README.md b/README.mdindex e1a58e6..77c01df 100644--- a/README.md+++ b/README.md@@ -92,12 +92,14 @@ does not establish localization accuracy. See [country profiles](docs/COUNTRIES.The command prints a job ID when queued. In another terminal, run`.venv/bin/dopplergeist job JOB_ID --jobs jobs --watch` to follow the reportedpipeline/grid estimate and the count and modification age of coarse/fine search-files. A separate search-write age includes support JSON and retention database-or WAL writes, so those writes remain visible while a fine payload is pending.-They do not increase the payload count or its file-count rate.-These filename-based indicators are unverified filesystem activity, not proof-that payloads or retention evidence are valid or that the corresponding work-has completed.+files. It separately counts fine support records: the search writes one after a+fine tile's scoring call returns and its retained scores are imported. These+records show tile-level scoring completion, but are not validated search+checkpoints and do not mean the full search has finished. A separate search-write+age includes support JSON and retention database or WAL writes, so activity stays+visible while a checkpoint payload is pending. The file-based counts and ages do+not validate payloads or retention evidence; use the terminal job result to tell+whether the full search succeeded, failed or remained inconclusive.Stop a running service-managed job with `.venv/bin/dopplergeist cancel JOB_ID`;pass `--server-url` when the service uses a non-default port.For a directly managed `analyze` or `resume --jobs` job, request cooperativediff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.pyindex 695f295..b458b0b 100644--- a/src/dopplergeist/cli.py+++ b/src/dopplergeist/cli.py@@ -203,7 +203,7 @@ def main():elif args.command=="job":from .jobs import read_jsondirectory=Path(args.jobs)/args.job_id- previous_count=previous_time=None+ previous_count=previous_time=previous_fine_support_count=Nonetry:while True:try:@@ -216,6 +216,9 @@ def main():tiles=[path for path in search.glob("tile-*.json") if not path.name.endswith(".error.json")]fine_files=[path for path in search.glob("fine-tile-*.json")if not path.name.endswith(".error.json")]+ support_files=list((search/"support").glob("*.json"))+ fine_support_files=[path for path in support_files if path.name.startswith("fine-")]+ fine_support_count=len(fine_support_files)count=len(tiles)+len(fine_files)wall_now=time.time()progress=value.get("progress")@@ -229,10 +232,15 @@ def main():rate=""if previous_count is not None and count >= previous_count and now > previous_time:rate=f", file-count rate {(count-previous_count)*60/(now-previous_time):.1f} files/min"+ fine_support_rate=""+ if (previous_fine_support_count is not None+ and fine_support_count >= previous_fine_support_count and now > previous_time):+ fine_support_rate=(f", fine support record rate "+ f"{(fine_support_count-previous_fine_support_count)*60/(now-previous_time):.1f} records/min")search_files=tiles+fine_files# Support diagnostics, worker ledgers and retention writes show# activity, not completed payloads. Keep them outside the count and rate.- activity_files=(search_files+list((search/"support").glob("*.json"))+ activity_files=(search_files+support_files+list((search/".tile-workers").glob("*.sqlite*"))+[search/"retention.sqlite", search/"retention.sqlite-wal"])modified={}@@ -245,17 +253,24 @@ def main():latest=max((modified[path] for path in search_files if path in modified),default=None)file_age=(f", newest matching file modified {age_text(max(0.0,wall_now-latest))} ago"if latest is not None else "")+ latest_fine_support=max((modified[path] for path in fine_support_files if path in modified),+ default=None)+ fine_support_age=(f", newest fine support record modified "+ f"{age_text(max(0.0,wall_now-latest_fine_support))} ago"+ if latest_fine_support is not None else "")activity=max(modified,key=modified.get,default=None)activity_age=(f", newest search write {age_text(max(0.0,wall_now-modified[activity]))} ago "f"({activity.relative_to(search)}; unverified file activity)"if activity is not None else "")print(f"{value['status']} ({value.get('stage', 'no stage')}{progress_text}): "f"{count} search files observed (unverified: {len(tiles)} coarse, "- f"{len(fine_files)} fine){rate}{file_age}{activity_age}, "+ f"{len(fine_files)} fine){rate}{file_age}, "+ f"{fine_support_count} fine support records observed (unverified)"+ f"{fine_support_rate}{fine_support_age}{activity_age}, "f"status updated {age_text(result_age)} ago",file=sys.stderr,flush=True)if value["status"] in {"needs_input", "succeeded", "inconclusive", "failed", "cancelled"}:break- previous_count,previous_time=count,now+ previous_count,previous_time,previous_fine_support_count=count,now,fine_support_counttime.sleep(args.interval)except KeyboardInterrupt:print("Stopped watching; the job continues.",file=sys.stderr)diff --git a/tests/test_real_cli_watch.py b/tests/test_real_cli_watch.pyindex 9b34032..87f9fa0 100644--- a/tests/test_real_cli_watch.py+++ b/tests/test_real_cli_watch.py@@ -36,6 +36,7 @@ def test_watch_real_job_and_interrupt_only_the_watcher():assert watcher.returncode == 130 and stdout == ''assert 'search files observed (unverified:' in stderr and 'file-count rate' in stderrassert 'newest matching file modified' in stderr+ assert 'fine support records observed (unverified)' in stderrassert 'newest search write ' in stderrassert 'unverified file activity' in stderrif recent_worker_write: