The OSINT investigator's workbench. One case, one folder, every tool. Local-first: your media and your investigations never leave your machine.
JavaScript
Steady the tests that raced the background worker, and take the patched test tools (#126)
OsintMeThat2ded2e10a70d
diff --git a/docs/SPEC.md b/docs/SPEC.mdindex 3587752..d3bd604 100644--- a/docs/SPEC.md+++ b/docs/SPEC.md@@ -398,7 +398,9 @@ stops making sense.outside the workspace, 0600 and holding a path; deleting the copy a move setaside acts on this process's own memory, never on a path from the request.Accepted risks recorded here: cleartext keys over- localhost, the hash-verified scraper updater, the release workflow's publish job+ localhost, the hash-verified scraper updater, Intel macOS staying on cryptography 48+ for want of later wheels (Azimut uses it for AES-GCM only, not the X.509 verifier its+ two open advisories concern), the release workflow's publish jobrunning `softprops/action-gh-release` and `pypa/gh-action-pypi-publish` on mutablerefs while it holds the PyPI OIDC identity (the branch ref is the form PyPAdocuments; every other action in the workflows is pinned by tag or by commit),diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex cab0cc5..ccc1f58 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -29,12 +29,12 @@"devDependencies": {"@playwright/test": "^1.63.0","@sveltejs/vite-plugin-svelte": "^7.2.0",- "happy-dom": "^20.10.6",+ "happy-dom": "^21.0.4","svelte": "^5.0.0","svelte-check": "^4.7.3","typescript": "^5.9.3","vite": "^8.3.5",- "vitest": "^4.1.11"+ "vitest": "^4.1.12"},"engines": {"node": "^20.19.0 || >=22.12.0"@@ -954,16 +954,16 @@}},"node_modules/@vitest/expect": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz",- "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.12.tgz",+ "integrity": "sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==","dev": true,"license": "MIT","dependencies": {"@standard-schema/spec": "^1.1.0","@types/chai": "^5.2.2",- "@vitest/spy": "4.1.11",- "@vitest/utils": "4.1.11",+ "@vitest/spy": "4.1.12",+ "@vitest/utils": "4.1.12","chai": "^6.2.2","tinyrainbow": "^3.1.0"},@@ -972,13 +972,13 @@}},"node_modules/@vitest/mocker": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz",- "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.12.tgz",+ "integrity": "sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==","dev": true,"license": "MIT","dependencies": {- "@vitest/spy": "4.1.11",+ "@vitest/spy": "4.1.12","estree-walker": "^3.0.3","magic-string": "^0.30.21"},@@ -999,9 +999,9 @@}},"node_modules/@vitest/pretty-format": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz",- "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.12.tgz",+ "integrity": "sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==","dev": true,"license": "MIT","dependencies": {@@ -1012,13 +1012,13 @@}},"node_modules/@vitest/runner": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz",- "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.12.tgz",+ "integrity": "sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==","dev": true,"license": "MIT","dependencies": {- "@vitest/utils": "4.1.11",+ "@vitest/utils": "4.1.12","pathe": "^2.0.3"},"funding": {@@ -1026,14 +1026,14 @@}},"node_modules/@vitest/snapshot": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz",- "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.12.tgz",+ "integrity": "sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==","dev": true,"license": "MIT","dependencies": {- "@vitest/pretty-format": "4.1.11",- "@vitest/utils": "4.1.11",+ "@vitest/pretty-format": "4.1.12",+ "@vitest/utils": "4.1.12","magic-string": "^0.30.21","pathe": "^2.0.3"},@@ -1042,9 +1042,9 @@}},"node_modules/@vitest/spy": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz",- "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.12.tgz",+ "integrity": "sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==","dev": true,"license": "MIT","funding": {@@ -1052,13 +1052,13 @@}},"node_modules/@vitest/utils": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz",- "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.12.tgz",+ "integrity": "sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==","dev": true,"license": "MIT","dependencies": {- "@vitest/pretty-format": "4.1.11",+ "@vitest/pretty-format": "4.1.12","convert-source-map": "^2.0.0","tinyrainbow": "^3.1.0"},@@ -1123,9 +1123,9 @@}},"node_modules/chai": {- "version": "6.2.2",- "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",- "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==",+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz",+ "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==","dev": true,"license": "MIT","engines": {@@ -1861,9 +1861,9 @@"license": "MIT"},"node_modules/happy-dom": {- "version": "20.10.6",- "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.10.6.tgz",- "integrity": "sha512-6QD0ilzDDt93tX44y8tbmZdAcdTRYDhUP+Asgi6pC8Pp5IA3cvaZGyoVN/EGtlq9ziT65iPuBBn3ASLr6hCgVw==",+ "version": "21.0.4",+ "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-21.0.4.tgz",+ "integrity": "sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw==","dev": true,"license": "MIT","dependencies": {@@ -2807,9 +2807,9 @@"license": "ISC"},"node_modules/tinyrainbow": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz",- "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==",+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz",+ "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==","dev": true,"license": "MIT","engines": {@@ -2958,19 +2958,19 @@}},"node_modules/vitest": {- "version": "4.1.11",- "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz",- "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.12.tgz",+ "integrity": "sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==","dev": true,"license": "MIT","dependencies": {- "@vitest/expect": "4.1.11",- "@vitest/mocker": "4.1.11",- "@vitest/pretty-format": "4.1.11",- "@vitest/runner": "4.1.11",- "@vitest/snapshot": "4.1.11",- "@vitest/spy": "4.1.11",- "@vitest/utils": "4.1.11",+ "@vitest/expect": "4.1.12",+ "@vitest/mocker": "4.1.12",+ "@vitest/pretty-format": "4.1.12",+ "@vitest/runner": "4.1.12",+ "@vitest/snapshot": "4.1.12",+ "@vitest/spy": "4.1.12",+ "@vitest/utils": "4.1.12","es-module-lexer": "^2.0.0","expect-type": "^1.3.0","magic-string": "^0.30.21",@@ -2998,12 +2998,12 @@"@edge-runtime/vm": "*","@opentelemetry/api": "^1.9.0","@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",- "@vitest/browser-playwright": "4.1.11",- "@vitest/browser-preview": "4.1.11",- "@vitest/browser-webdriverio": "4.1.11",- "@vitest/coverage-istanbul": "4.1.11",- "@vitest/coverage-v8": "4.1.11",- "@vitest/ui": "4.1.11",+ "@vitest/browser-playwright": "4.1.12",+ "@vitest/browser-preview": "4.1.12",+ "@vitest/browser-webdriverio": "^4.1.11",+ "@vitest/coverage-istanbul": "4.1.12",+ "@vitest/coverage-v8": "4.1.12",+ "@vitest/ui": "4.1.12","happy-dom": "*","jsdom": "*","vite": "^6.0.0 || ^7.0.0 || ^8.0.0"diff --git a/frontend/package.json b/frontend/package.jsonindex 88d83fc..7ebf4c0 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -22,12 +22,12 @@"devDependencies": {"@playwright/test": "^1.63.0","@sveltejs/vite-plugin-svelte": "^7.2.0",- "happy-dom": "^20.10.6",+ "happy-dom": "^21.0.4","svelte": "^5.0.0","svelte-check": "^4.7.3","typescript": "^5.9.3","vite": "^8.3.5",- "vitest": "^4.1.11"+ "vitest": "^4.1.12"},"dependencies": {"@fontsource/barlow-condensed": "^5.3.0",diff --git a/tests/caseworkspace.py b/tests/caseworkspace.pyindex 2a05b9a..527147c 100644--- a/tests/caseworkspace.py+++ b/tests/caseworkspace.py@@ -23,6 +23,7 @@ from datetime import datetime, timedelta, timezonefrom pathlib import Pathfrom typing import Any+from jobwait import WAITfrom fullcase import FullCase, build_full_caseGOLDEN = Path(__file__).parent / "fixtures" / "case-workspace-0.3.1.json"@@ -164,6 +165,10 @@ def build_workspace_case(client) -> WorkspaceCase:"text": f"# Witness\n\nSaw [[entity:{full.vessel_id}|MV Aurora]] leave.\n",}), "filed note")+ # A snapshot keeps what the case knows when it is saved, and the dated photo's+ # capture time is read in the background: let that land first.+ assert workqueue.wait_until_idle(timeout=WAIT)+# -- saved readings: every surface, Live and Snapshot, both Timeline modes --def view(name: str, surface: str, mode: str, spec: dict[str, Any]) -> None:saved = _ok(client.post(f"{base}/analysis-views", json={@@ -220,7 +225,7 @@ def build_workspace_case(client) -> WorkspaceCase:# A Timeline view saved without tracks: the server gave it its default ones.view("Chronology defaults", "timeline", "live", {"timeline": dict(WINDOW)})- workqueue.wait_until_idle(timeout=20)+ assert workqueue.wait_until_idle(timeout=WAIT)return wsdiff --git a/tests/fullcase.py b/tests/fullcase.pyindex 76f3909..6deee1a 100644--- a/tests/fullcase.py+++ b/tests/fullcase.py@@ -23,6 +23,7 @@ from dataclasses import dataclass, fieldfrom pathlib import Pathfrom PIL import Image+from jobwait import WAITfrom azimut import layout@@ -705,7 +706,7 @@ def build_full_case(# Enrichment and thumbnails were queued along the way; let them land, or the# caller's first delete races a background write into the same case.- workqueue.wait_until_idle(timeout=20)+ assert workqueue.wait_until_idle(timeout=WAIT)run_id = Path(full.analyzer_run).stem.split("-", 1)[1]result = client.get(f"/api/cases/{case_id}/analysis/runs/{run_id}").json()assert result["status"] == "ready", result@@ -750,7 +751,7 @@ def _add_horizon_find(client, case_id: str, full: FullCase) -> None:},)assert searched.status_code == 200, searched.text- workqueue.wait_until_idle(timeout=60)+ assert workqueue.wait_until_idle(timeout=WAIT)finally:terrain.tile = fetchterrain.forget_decoded()diff --git a/tests/test_doctor.py b/tests/test_doctor.pyindex 8c6be17..573f189 100644--- a/tests/test_doctor.py+++ b/tests/test_doctor.py@@ -6,6 +6,7 @@ import sqlite3from contextlib import closingfrom azimut import layout+from jobwait import WAITfrom azimut.engine import workqueuefrom azimut.workspace import Case@@ -21,7 +22,7 @@ def _upload(client, case_id, name="evidence.txt", content=b"evidence"):f"/api/cases/{case_id}/media/upload",files={"file": (name, io.BytesIO(content), "text/plain")},).json()- assert workqueue.wait_until_idle(timeout=10)+ assert workqueue.wait_until_idle(timeout=WAIT)return resultdiff --git a/tests/test_graph.py b/tests/test_graph.pyindex 051e3a6..1d951c3 100644--- a/tests/test_graph.py+++ b/tests/test_graph.py@@ -31,6 +31,7 @@ from PIL import Imagefrom azimut.engine import entities as entity_enginefrom azimut.engine import graph as graph_enginefrom azimut.engine import links as link_engine+from jobwait import WAITfrom azimut.engine import workqueuefrom azimut.workspace import Case@@ -1070,7 +1071,7 @@ def _adjusted(client, cid, path, amount=1.4, label=None):# Saving queues enrichment, and the graph assertions below read the mirror# suggestion that job may create. Do not race the background worker on a fast# or heavily loaded runner.- assert workqueue.wait_until_idle(timeout=10)+ assert workqueue.wait_until_idle(timeout=WAIT)return res.json()["saved"][0]diff --git a/tests/test_jobs.py b/tests/test_jobs.pyindex b61dcbd..46e4f4a 100644--- a/tests/test_jobs.py+++ b/tests/test_jobs.py@@ -2,6 +2,7 @@import threading+from jobwait import WAITfrom azimut import jobs@@ -16,7 +17,7 @@ def test_start_evicts_old_finished_jobs_but_keeps_running_ones(monkeypatch):finished = threading.Event()job_id = jobs.start("t", lambda set_progress: finished.set())- assert finished.wait(timeout=5)+ assert finished.wait(timeout=WAIT)# the two oldest finished jobs were dropped; running and recent ones stayassert "done0" not in registry and "done1" not in registry@@ -33,7 +34,7 @@ def test_get_reports_completion(monkeypatch):return {"answer": 42}job_id = jobs.start("t", work)- assert finished.wait(timeout=5)+ assert finished.wait(timeout=WAIT)for _ in range(200): # the runner thread updates status after `finished`job = jobs.get(job_id)if job["status"] == "done":diff --git a/tests/test_media_api.py b/tests/test_media_api.pyindex d06591e..2af6dcb 100644--- a/tests/test_media_api.py+++ b/tests/test_media_api.py@@ -1927,7 +1927,7 @@ def test_concurrent_sidecar_merges_do_not_drop_each_other(client, monkeypatch):start = threading.Barrier(2)def write(patch):- start.wait(timeout=5)+ start.wait(timeout=WAIT)for _ in range(20):media_engine.merge_item(case, rel, patch)@@ -1979,7 +1979,7 @@ def test_naming_an_item_survives_the_enrichment_of_the_same_sidecar(client, monkif data.get("dhash") and not blocked_once:blocked_once = Trueenrichment_started.set()- assert let_enrichment_finish.wait(timeout=5)+ assert let_enrichment_finish.wait(timeout=WAIT)real_write(path, data)monkeypatch.setattr(media_engine, "_write_sidecar", block_enrichment_write)@@ -1988,7 +1988,7 @@ def test_naming_an_item_survives_the_enrichment_of_the_same_sidecar(client, monkargs=(case, rel, {"dhash": "ff00ff00ff00ff00"}),)enrich_thread.start()- assert enrichment_started.wait(timeout=5)+ assert enrichment_started.wait(timeout=WAIT)renamed = {}@@ -1998,8 +1998,8 @@ def test_naming_an_item_survives_the_enrichment_of_the_same_sidecar(client, monkname_thread = threading.Thread(target=name_it)name_thread.start()let_enrichment_finish.set()- enrich_thread.join(timeout=10)- name_thread.join(timeout=10)+ enrich_thread.join(timeout=WAIT)+ name_thread.join(timeout=WAIT)assert not enrich_thread.is_alive()assert not name_thread.is_alive()@@ -2127,7 +2127,7 @@ def test_enrich_counts_the_jobs_the_queue_took(client):assert client.post(f"/api/cases/{cid}/media/enrich", json={"path": image["path"]}).json() == {"queued": 1}- workqueue.wait_until_idle()+ assert workqueue.wait_until_idle(timeout=WAIT)# ── clipboard paste ──────────────────────────────────────────────────────────diff --git a/tests/test_relaunch.py b/tests/test_relaunch.pyindex 7f391ce..83e212d 100644--- a/tests/test_relaunch.py+++ b/tests/test_relaunch.py@@ -10,6 +10,7 @@ from pathlib import Pathfrom typing import Anyimport pytest+from jobwait import WAITSCRIPT = Path(__file__).parents[1] / "scripts" / "relaunch.py"@@ -41,13 +42,13 @@ def test_control_socket_stops_only_the_matching_launcher(tmp_path: Path):control.start()def close_after_request() -> None:- assert control.stop_requested.wait(timeout=2)+ assert control.stop_requested.wait(timeout=WAIT)control.close()closer = threading.Thread(target=close_after_request)closer.start()- assert relaunch._stop_previous(state_path, timeout=2) is True- closer.join(timeout=2)+ assert relaunch._stop_previous(state_path, timeout=WAIT) is True+ closer.join(timeout=WAIT)assert not closer.is_alive()assert not state_path.exists()diff --git a/tests/test_trash.py b/tests/test_trash.pyindex f4b172a..8c6efb8 100644--- a/tests/test_trash.py+++ b/tests/test_trash.py@@ -9,6 +9,7 @@ from pathlib import Pathimport fullcasefrom azimut import layout+from jobwait import WAITfrom azimut.engine import workqueuefrom azimut.workspace import Case@@ -248,7 +249,7 @@ def test_a_restored_media_gets_its_thumbnail_back(client):assert not case.resolve_inside(thumb_rel).exists()client.post(f"/api/cases/{full.case_id}/trash/{group}/restore")- workqueue.wait_until_idle(timeout=20)+ assert workqueue.wait_until_idle(timeout=WAIT)assert case.resolve_inside(thumb_rel).is_file()diff --git a/tests/test_workspace_api.py b/tests/test_workspace_api.pyindex fd42d96..17e8bb2 100644--- a/tests/test_workspace_api.py+++ b/tests/test_workspace_api.py@@ -15,6 +15,7 @@ from pathlib import Pathimport pytestfrom fastapi.testclient import TestClient+from jobwait import WAITfrom azimut import configfrom azimut.engine import workspacemovefrom azimut.workspace import Case@@ -304,7 +305,7 @@ def test_case_work_is_refused_while_the_workspace_is_being_moved(assert queued.status_code == 200, queued.json()# Bounded: a move refused before it copies would spin here forever, and a# hung test costs a whole CI job rather than one red line.- deadline = time.monotonic() + 20+ deadline = time.monotonic() + WAITwhile not reached["copying"]:assert time.monotonic() < deadline, "the move never reached the copy step"time.sleep(0.01)diff --git a/tests/test_workspace_lock.py b/tests/test_workspace_lock.pyindex eeb73cb..d71280f 100644--- a/tests/test_workspace_lock.py+++ b/tests/test_workspace_lock.py@@ -24,6 +24,7 @@ from pathlib import Pathimport pytest+from jobwait import WAITfrom azimut.engine import workspacelockfrom azimut.engine.workspacelock import WorkspaceBusy@@ -108,7 +109,7 @@ def test_a_second_instance_is_refused_and_names_the_holder(workspace):workspacelock.acquire(8478)finally:child.kill()- child.wait(timeout=10)+ child.wait(timeout=WAIT)# A pid, not *this* pid: on Windows the interpreter Popen starts is not always# the process that ends up running the code, so `child.pid` can name a@@ -126,7 +127,7 @@ def test_the_lock_dies_with_the_process(workspace):a crashed Azimut must never leave a workspace nobody can open."""child = _holder_process(workspace)child.kill()- child.wait(timeout=10)+ child.wait(timeout=WAIT)_acquire_once_free(8478) # no exception: the OS let go on its own@@ -136,7 +137,7 @@ def test_the_lock_dies_with_the_process(workspace):def test_a_clean_exit_leaves_no_payload_to_age(workspace):child = _holder_process(workspace)child.terminate()- child.wait(timeout=10)+ child.wait(timeout=WAIT)# The child's atexit-free path still releases via the OS; what matters is# that the next run can take it without judging a corpse.@@ -230,7 +231,7 @@ def test_forcing_past_a_process_that_really_holds_it_still_reports_the_truth(worassert _payload(workspace)["pid"] == os.getpid()finally:child.kill()- child.wait(timeout=10)+ child.wait(timeout=WAIT)# -- holding, releasing, heartbeat ---------------------------------------------@@ -257,7 +258,7 @@ def test_the_heartbeat_is_refreshed_while_it_is_held(workspace, monkeypatch):workspacelock.acquire(8477)first = _payload(workspace)["at"]- deadline = time.monotonic() + 5+ deadline = time.monotonic() + WAITwhile time.monotonic() < deadline and _payload(workspace)["at"] == first:time.sleep(0.05)diff --git a/tests/test_workspace_move.py b/tests/test_workspace_move.pyindex 41ffa32..d6f2bd1 100644--- a/tests/test_workspace_move.py+++ b/tests/test_workspace_move.py@@ -18,6 +18,7 @@ from pathlib import Pathimport pytest+from jobwait import WAITfrom azimut import configfrom azimut.engine import workspacelock, workspacemovefrom azimut.engine.workspacemove import MoveError@@ -418,7 +419,7 @@ def test_a_second_move_is_refused_while_one_runs(workspace, tmp_path, monkeypatcworkspacemove.start(str(tmp_path / "first"))# Bounded, like `_finish`: a move that never reaches the copy step must fail# this test rather than hang the run.- deadline = time.monotonic() + 20+ deadline = time.monotonic() + WAITwhile not started["copying"]:assert time.monotonic() < deadline, "the move never reached the copy step"time.sleep(0.01)