Skip to content

The agent that grows with you

test(release): fixtures follow receipt-only stable advance

ethernetf587c031061f
diff --git a/tests/scripts/test_release_artifacts.py b/tests/scripts/test_release_artifacts.py
index a02870e1f3d..26cecbf8672 100644
--- a/tests/scripts/test_release_artifacts.py
+++ b/tests/scripts/test_release_artifacts.py
@@ -212,8 +212,13 @@ def test_candidate_publication_and_store_selection(tmp_path, monkeypatch, r2_ser
assert puts == ['/hermes-releases/' + name for name in (
'releases/darwin/stable/stable-mac.yml', 'releases/win32/stable/stable.appinstaller',
'releases/termux/stable/dists/hermes-stable/Release', 'releases/termux/stable/dists/hermes-stable/InRelease')]
+ # Promotion materializes only feed legs and indexes; packages stay receipt-bound on R2.
for item in manifest['files']:
- assert (tmp_path / 'promote' / item['path']).read_bytes() == r2_server.store[f"releases/tag/{manifest['archive']}/{item['path']}"][0]
+ local = tmp_path / 'promote' / item['path']
+ if item['path'].endswith(artifacts.PACKAGE_SUFFIXES):
+ assert not local.exists(), item['path']
+ else:
+ assert local.read_bytes() == r2_server.store[f"releases/tag/{manifest['archive']}/{item['path']}"][0]
descriptor = ET.fromstring(r2_server.store['releases/win32/stable/stable.appinstaller'][0])
assert descriptor.attrib == {
'Uri': base + '/releases/win32/stable/stable.appinstaller',
diff --git a/tests/scripts/test_release_channels.py b/tests/scripts/test_release_channels.py
index ce0ff0c0e92..bd5451a57ee 100644
--- a/tests/scripts/test_release_channels.py
+++ b/tests/scripts/test_release_channels.py
@@ -2,6 +2,7 @@
from __future__ import annotations
from contextlib import contextmanager
+import base64
import hashlib
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import json
@@ -460,6 +461,12 @@ def test_accepted_release_receipts_feed_the_protected_head_without_rebuilding(tm
name = f"{identity['artifactNamePascal']}-2.0.0-mac-{arch}.{suffix}"
files[name] = (name + " fixture bytes").encode()
metadata["filename"] = f"{identity['artifactNamePascal']}-2.0.0-mac-{arch}.zip"
+ # The per-arch electron feed leg, as the macOS build stages it.
+ leg = {"version": "2.0.0", "files": [
+ {"url": name, "size": len(files[name]),
+ "sha512": base64.b64encode(hashlib.sha512(files[name]).digest()).decode("ascii")}
+ for name in (f"{identity['artifactNamePascal']}-2.0.0-mac-{arch}.{ext}" for ext in ("zip", "dmg"))]}
+ files[f"{arch}-stable-mac.yml"] = canonical_json(leg)
else:
metadata.update(publisher="CN=Fixture", applicationId=identity["appNamePascal"])
files[f"{identity['artifactNamePascal']}-2.0.0-win-{arch}.msix"] = b"fixture msix"