From fb15ca68bbd202b9f43360abfdad650c99a51cde Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:47:36 +0100 Subject: [PATCH] docs: name the sync_measurements path options The option audit test failed on --clone and --pin, and two docstrings in measurement_records.py joined clauses with a semicolon. --- scripts/measurement_records.py | 4 ++-- wiki/tools.md | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/measurement_records.py b/scripts/measurement_records.py index 0b135bf1a..ca8d01a92 100644 --- a/scripts/measurement_records.py +++ b/scripts/measurement_records.py @@ -158,7 +158,7 @@ def seal(slim: dict, sidecar: dict, rid: str | None = None) -> tuple[dict, bytes """The slim record with its data reference and id, and the sidecar bytes. ``rid`` keeps an id given before (a record carried over from the first - layout); otherwise the id is computed. + layout). Otherwise the id is computed. """ blob = sidecar_bytes(sidecar) sealed = {**slim, "data": {"sha256": sha256_hex(blob), "bytes": len(blob)}} @@ -229,7 +229,7 @@ def parse_lines(text: str, label: str) -> list[dict]: def appended_only(before: str, after: str) -> str | None: """None when ``after`` keeps every line of ``before``, in place, and - only adds lines at its end; otherwise the first line that moved.""" + only adds lines at its end, else the first line that moved.""" old, new = before.splitlines(), after.splitlines() for number, line in enumerate(old, 1): if number > len(new): diff --git a/wiki/tools.md b/wiki/tools.md index 09fe577c3..fd22fba05 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -795,6 +795,9 @@ python scripts/sync_measurements.py --check-only # check every line and sid python scripts/sync_measurements.py # write the site's measurement files ``` +`--clone` and `--pin` name another clone and pin file than +`.cache/measurements/` and `measurements-pin.json`. + `--fetch` is the only step on the network. It refuses a remote whose history changed or removed a line the pin holds, or rewrote a data file: a correction is a new line naming the record it `supersedes`. Every line must hash to its