Skip to content

Commit c360440

Browse files
committed
fix(release): cover the legacy ui-* aliases in checksums.txt
The ui-* archives are byte-identical copies of the canonical ones, published after verify so they inherit the hash-bound VirusTotal verdicts. They were absent from checksums.txt, and publish-legacy-aliases.sh documented that as intentional: "checksums.txt covers the canonical names current installers request." That reasoning has a hole. The aliases exist only for 0.9.x updaters (DeusData#1538), and those verify the NAME they asked for. So the alias fixed the 404 and moved the failure one step later - the updater downloads the archive, cannot find its name in checksums.txt, and refuses: warning: codebase-memory-mcp-ui-darwin-arm64.tar.gz not found in checksums.txt error: refusing to install an unverified download Reported by AmooAti in DeusData#1134. Confirmed on the live v0.10.4 release: eight ui-* archives published, zero of them listed. Every pre-0.10 user who answered the old variant chooser with "ui" is hard-blocked from updating by any path. The same digest is now emitted under the legacy name before the attestation step, so the attested artifact covers both names. No new bytes and no new scan surface: an alias is a copy, so its sha256 is by construction the one already computed. The rule lives in scripts/ci/append-legacy-alias-checksums.sh rather than inline in the workflow, because the venue-parity contract requires it: a venue may provision, plumb artifacts, or call a canonical leg script, and text transformation is none of those. Keeping it beside publish-legacy-aliases.sh also puts the two halves of the alias rule in one place, which matters because they must stay in step - .tar.gz and .zip only, never an already-ui-* name. It fails closed when it matches nothing, since a name with no asset is as broken as an asset with no name. Validated against the real v0.10.4 checksums file: the generated set is exactly the eight ui-* assets that release published - no phantom names, none missing - and the empty case exits non-zero. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent a598a5a commit c360440

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ jobs:
164164
release-selection.tsv \
165165
> checksums.txt
166166
167+
# The legacy ui-* aliases are byte-identical copies published after verify
168+
# (scripts/ci/publish-legacy-aliases.sh), so they were absent from
169+
# checksums.txt and 0.9.x updaters refused to install them (#1134). Their
170+
# digests are added here, BEFORE attestation, so the attested artifact
171+
# covers both names.
172+
- name: Cover legacy ui-* aliases in checksums
173+
run: scripts/ci/append-legacy-alias-checksums.sh checksums.txt
174+
167175
- name: Attest checksum provenance
168176
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
169177
with:
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
# Add the legacy ui-* names to checksums.txt, carrying the canonical digest.
3+
#
4+
# publish-legacy-aliases.sh publishes byte-identical ui-*-named copies of the
5+
# release archives so already-released 0.9.x updaters stop 404ing (#1538). It
6+
# runs after verify, so those copies inherit the hash-bound VirusTotal verdicts
7+
# — and it therefore left them out of checksums.txt entirely, on the reasoning
8+
# that the file "covers the canonical names current installers request".
9+
#
10+
# That reasoning has a hole. The aliases exist ONLY for 0.9.x updaters, and
11+
# those verify the NAME they asked for. So the alias fixed the 404 and moved the
12+
# failure one step later: the updater downloads the archive, cannot find its name
13+
# in checksums.txt, and refuses to install it (#1134):
14+
#
15+
# warning: codebase-memory-mcp-ui-darwin-arm64.tar.gz not found in checksums.txt
16+
# error: refusing to install an unverified download
17+
#
18+
# An alias is a copy, so its sha256 is by construction the digest already
19+
# computed for the canonical archive. Emitting that digest under the legacy name
20+
# introduces no new bytes and no new scan surface. This runs BEFORE the
21+
# attestation step so the attested artifact covers both names.
22+
#
23+
# The alias rule MUST stay in step with publish-legacy-aliases.sh: .tar.gz and
24+
# .zip only, never an already-ui-* name. A name here with no published asset is
25+
# as broken as an asset with no name, so this fails closed when it matches
26+
# nothing.
27+
#
28+
# Usage: append-legacy-alias-checksums.sh <checksums-file>
29+
set -euo pipefail
30+
31+
CHECKSUMS="${1:?usage: append-legacy-alias-checksums.sh <checksums-file>}"
32+
33+
if [ ! -s "$CHECKSUMS" ]; then
34+
echo "error: $CHECKSUMS is missing or empty" >&2
35+
exit 1
36+
fi
37+
38+
aliases="$(mktemp)"
39+
trap 'rm -f "$aliases"' EXIT
40+
41+
awk '
42+
$2 ~ /^codebase-memory-mcp-/ &&
43+
$2 !~ /^codebase-memory-mcp-ui-/ &&
44+
($2 ~ /\.tar\.gz$/ || $2 ~ /\.zip$/) {
45+
alias = $2
46+
sub(/^codebase-memory-mcp-/, "codebase-memory-mcp-ui-", alias)
47+
print $1 " " alias
48+
}
49+
' "$CHECKSUMS" > "$aliases"
50+
51+
if [ ! -s "$aliases" ]; then
52+
echo "error: no canonical archives matched the ui-* alias rule in $CHECKSUMS;" >&2
53+
echo " publish-legacy-aliases.sh would then publish assets that" >&2
54+
echo " checksums.txt does not cover (#1134)." >&2
55+
exit 1
56+
fi
57+
58+
cat "$aliases" >> "$CHECKSUMS"
59+
echo "added $(wc -l < "$aliases" | tr -d ' ') legacy alias checksum line(s); $CHECKSUMS now covers $(wc -l < "$CHECKSUMS" | tr -d ' ') names"

0 commit comments

Comments
 (0)