From 043705f347a263fe5c7d90b180ddfbf7c953c7a9 Mon Sep 17 00:00:00 2001 From: Horizon agent Date: Thu, 5 Nov 2026 22:58:28 +0100 Subject: [PATCH] Redstone catalogue: each shard writes its own schematic part file CI runs the three shards at once on an empty .local/lra-catalog: two of them downloaded the same schematic into one `.part` name and one rename found it gone. The part file now carries the process id. Co-Authored-By: Claude Opus 5.5 --- tools/test_redstone_catalog_parity.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test_redstone_catalog_parity.py b/tools/test_redstone_catalog_parity.py index 3931d62361..88be6e06cf 100644 --- a/tools/test_redstone_catalog_parity.py +++ b/tools/test_redstone_catalog_parity.py @@ -71,8 +71,10 @@ def fetch_schematics(entries): request = urllib.request.Request(url, headers={'User-Agent': 'horizon/0.1'}) with urllib.request.urlopen(request, timeout=120) as response: data = response.read() - path.with_suffix('.part').write_bytes(data) - path.with_suffix('.part').replace(path) + # The shards download into the same folder at once: each writes its own part file. + part = path.with_name(f'{path.name}.{os.getpid()}.part') + part.write_bytes(data) + part.replace(path) sums[rel] = lab.digest(path, 'sha256') listing = ''.join(f'{rel} {sums[rel]}\n' for rel in sorted(sums)) combined = hashlib.sha256(listing.encode()).hexdigest()