Read the flat single-artifact layout in release verification

download-artifact@v8 extracts the only pattern-matched artifact directly
into the target path, without the artifact-name directory the resolve
step assumed, so every workflow_run verification died at
"No distributed release identity found" before checking a single
surface. The directory-name attempt check now applies only when the
artifact directory exists; a flat identity is still pinned by the
run-id and attempt-eligibility asserts. The workflow_run path of
5c6588b had never executed: v0.38.0's run failed on later checks and
the surfaces were confirmed by a manual dispatch.

The new test drives the real workflow script against the flat layout
and reproduced the production failure before the fix.

pre-commit: 1) maintain.sh - exit 2 (uv-secure on the documented
lightning/accelerate blocks, unchanged lock; core checks separately:
C2PA sync current, Ruff clean with no rewrites, Pyright src/ 0 errors,
2360 passed 3 skipped); 2) /simplify - single-pass four angles, clean;
3) docs sync - grepped distributed-release over docs/: the one mention
stays accurate; 4) CLAUDE.md - improver grade A earlier this session,
revise: no additions
This commit is contained in:
Victor Kuznetsov committed 2026-09-08 20:30:59 -07:00
1 parent e556ed032a
commit de03748849
2 files changed
+35 -2

No files matched your search

+6 -2
View File
@@ -59,9 +59,13 @@ jobs:
import json, os
from pathlib import Path
identities = []
for path in Path("distribution-identities").glob("*/release-identity.json"):
for path in Path("distribution-identities").rglob("release-identity.json"):
item = json.loads(path.read_text(encoding="utf-8"))
assert path.parent.name == 'distributed-release-' + item['run_attempt'], "Artifact attempt mismatch"
# download-artifact@v8 extracts the only matched artifact directly
# into the path, with no artifact-name directory; several matches
# each get one, so the attempt is name-checked only in that layout.
if path.parent.name.startswith('distributed-release-'):
assert path.parent.name == 'distributed-release-' + item['run_attempt'], "Artifact attempt mismatch"
identities.append(item)
assert identities, "No distributed release identity found"
assert all(item["run_id"] == os.environ["DISTRIBUTION_RUN_ID"] for item in identities), "Distribution run mismatch"