Skip to content

The agent that grows with you

test: windows marker timestamp test pins the v2 body

Teknium4c4da27c36b8
diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py
index 922fa28c6cb..a4126efccdd 100644
--- a/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py
+++ b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py
@@ -1,6 +1,7 @@
"""The Windows handoff writes numeric Unix seconds under comma-decimal locales."""
import json
+import re
import os
from pathlib import Path
import shutil
@@ -31,7 +32,9 @@ def test_windows_update_writes_locale_independent_marker_and_result(tmp_path, mo
assert result.returncode == 0, result.stdout + result.stderr
marker = (tmp_path / ".hermes-update-in-progress").read_text(encoding="utf-8-sig").splitlines()
receipt = json.loads((tmp_path / ".hermes-update-result.json").read_text(encoding="utf-8-sig"))
- assert len(marker) == 2 and int(marker[0]) > 0
+ # v2 body (contract C1): the creation-time line is culture-invariant too.
+ assert len(marker) == 3 and int(marker[0]) > 0
+ assert re.fullmatch(r"ct:\d+\.\d{3}", marker[2]), marker
assert started <= int(marker[1]) <= finished
assert type(receipt["finished_at"]) is int
assert started <= receipt["finished_at"] <= finished