Skip to content

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

fix(#10): label watch output as unverified file activity (#306)

Cinna Davisf1dc933e798d
diff --git a/README.md b/README.md
index a989434..dc18880 100644
--- a/README.md
+++ b/README.md
@@ -61,8 +61,11 @@ To limit the geographic search when you have independent regional context, add
clock window must still be supported by recording metadata or other evidence.
The command prints a job ID when queued. In another terminal, run
-`.venv/bin/dopplergeist job JOB_ID --jobs jobs --watch` to follow reported
-progress, checkpoint rate, and the age of the latest tile and job status update.
+`.venv/bin/dopplergeist job JOB_ID --jobs jobs --watch` to follow the reported
+status progress and the count and modification age of coarse/fine search files.
+These filename-based indicators are unverified filesystem activity, not proof
+that payloads or retention evidence are valid or that the corresponding work
+has completed.
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 cooperative
diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md
index 5d3a49e..d017090 100644
--- a/docs/PRODUCT.md
+++ b/docs/PRODUCT.md
@@ -77,12 +77,13 @@ dopplergeist job JOB_ID --jobs jobs --watch
```
`analyze` prints the job ID and a monitor command to standard error as soon as
-the upload is queued. `job --watch` reports overall progress, the number and
-recent rate of local checkpoint pieces, the age of the newest tile checkpoint,
-and the age of the job status file on standard error. It then writes the final
-job JSON to standard output. Pieces can have different sizes and costs, so their
-rate is not an ETA; remotely staged work appears after it is imported. Pressing
-Ctrl-C stops the watcher without cancelling the analysis.
+the upload is queued. `job --watch` reports the status-file progress field, the
+count/rate of matching coarse and fine search filenames, the newest matching
+file modification age, and the job status-file age on standard error. These are
+unverified filesystem indicators: the watcher does not validate payload hashes
+or retention evidence, and the file-count rate is not a completed-work rate or
+ETA. Remotely staged work appears after it is imported. Pressing Ctrl-C stops
+the watcher without cancelling the analysis.
Direct `analyze` accepts up to 100 MiB by default. Set `--max-upload-mb 250`,
for example, to allow a larger local recording. The `serve` command has its own
diff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.py
index 7d2793c..ba435cc 100644
--- a/src/dopplergeist/cli.py
+++ b/src/dopplergeist/cli.py
@@ -202,9 +202,9 @@ def main():
break
search=directory/"search"
tiles=[path for path in search.glob("tile-*.json") if not path.name.endswith(".error.json")]
- fine_checkpoints=[path for path in search.glob("fine-tile-*.json")
- if not path.name.endswith(".error.json")]
- count=len(tiles)+len(fine_checkpoints)
+ fine_files=[path for path in search.glob("fine-tile-*.json")
+ if not path.name.endswith(".error.json")]
+ count=len(tiles)+len(fine_files)
wall_now=time.time()
progress=value.get("progress")
result_age=max(0.0,wall_now-(directory/"result.json").stat().st_mtime)
@@ -216,14 +216,14 @@ def main():
now=time.monotonic()
rate=""
if previous_count is not None and count >= previous_count and now > previous_time:
- rate=f", {(count-previous_count)*60/(now-previous_time):.1f} pieces/min since last check"
- checkpoints=tiles+fine_checkpoints
- latest=max(checkpoints,key=lambda path:path.stat().st_mtime,default=None)
- checkpoint_age=(f", newest checkpoint {age_text(max(0.0,wall_now-latest.stat().st_mtime))} ago"
- if latest else "")
+ rate=f", file-count rate {(count-previous_count)*60/(now-previous_time):.1f} files/min"
+ search_files=tiles+fine_files
+ latest=max(search_files,key=lambda path:path.stat().st_mtime,default=None)
+ file_age=(f", newest matching file modified {age_text(max(0.0,wall_now-latest.stat().st_mtime))} ago"
+ if latest else "")
print(f"{value['status']} ({value.get('stage', 'no stage')}{progress_text}): "
- f"{count} local checkpoint pieces ({len(tiles)} coarse tiles, "
- f"{len(fine_checkpoints)} fine search checkpoints){rate}{checkpoint_age}, "
+ f"{count} search files observed (unverified: {len(tiles)} coarse, "
+ f"{len(fine_files)} fine){rate}{file_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
diff --git a/tests/test_real_cli_watch.py b/tests/test_real_cli_watch.py
index a0de8b3..df2c3da 100644
--- a/tests/test_real_cli_watch.py
+++ b/tests/test_real_cli_watch.py
@@ -32,7 +32,8 @@ def test_watch_real_job_and_interrupt_only_the_watcher():
watcher.kill()
watcher.wait()
assert watcher.returncode == 130 and stdout == ''
- assert 'local checkpoint pieces' in stderr and 'pieces/min since last check' in stderr
+ assert 'search files observed (unverified:' in stderr and 'file-count rate' in stderr
+ assert 'newest matching file modified' in stderr
assert 'Stopped watching; the job continues.' in stderr
assert json.loads((job / 'result.json').read_text())['status'] == 'running'
@@ -55,7 +56,7 @@ def test_real_upload_prints_job_id_before_final_json(tmp_path):
assert (jobs / value['job_id'] / 'result.json').is_file()
-def test_watch_counts_real_search_checkpoints_not_support_diagnostics():
+def test_watch_labels_real_search_file_counts_unverified():
source = os.environ.get('DOPPLERGEIST_REAL_JOB_ROOT')
if not source:
pytest.skip('set DOPPLERGEIST_REAL_JOB_ROOT to a completed real upload')
@@ -74,6 +75,6 @@ def test_watch_counts_real_search_checkpoints_not_support_diagnostics():
'--jobs', str(job.parent), '--watch', '--interval', '1']
result = subprocess.run(command, check=True, capture_output=True, text=True, timeout=15)
- assert f'{len(coarse) + len(fine)} local checkpoint pieces' in result.stderr
- assert f'({len(coarse)} coarse tiles, {len(fine)} fine search checkpoints)' in result.stderr
+ assert f'{len(coarse) + len(fine)} search files observed (unverified:' in result.stderr
+ assert f'({len(coarse)} coarse, {len(fine)} fine)' in result.stderr
assert 'fine support checkpoints' not in result.stderr