Skip to content

Commit e28d2c1

Browse files
zurfyxclaude
andauthored
Updater: tolerate unused Claude manifest metadata (#55)
Anthropic dropped the modsCommit field from the Claude Code release manifest (it is absent from 2.1.301; the last pinned 2.1.295), and the exact top-level key match has failed every scheduled vendor update since 2026-10-10. Require only the fields the updater consumes; artifacts are still pinned by sha256 and size. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9be4bc0 commit e28d2c1

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎.github/workflows/update.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ jobs:
125125
[[ "$claude_version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
126126
claude_manifest=$(curl_text "https://downloads.claude.ai/claude-code-releases/$claude_version/manifest.json")
127127
jq -e --arg version "$claude_version" '
128-
(keys == ["buildDate", "commit", "manifestSignatureEnforcement", "modsCommit", "platforms", "sdkCompat", "version"]) and
128+
(has("platforms") and has("version")) and
129129
.version == $version and
130-
(.platforms["linux-arm64"] | keys == ["binary", "checksum", "size"]) and
131-
(.platforms["linux-x64"] | keys == ["binary", "checksum", "size"]) and
130+
(.platforms["linux-arm64"] | has("binary") and has("checksum") and has("size")) and
131+
(.platforms["linux-x64"] | has("binary") and has("checksum") and has("size")) and
132132
.platforms["linux-arm64"].binary == "claude" and
133133
.platforms["linux-x64"].binary == "claude"
134134
' <<<"$claude_manifest" >/dev/null

‎scripts/update-versions.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ claude_version=$(curl_text "$CLAUDE_LATEST_URL")
143143
die "Claude latest channel did not return a stable semantic version"
144144
claude_manifest=$(curl_text "$CLAUDE_RELEASE_ROOT/$claude_version/manifest.json")
145145
jq -e --arg version "$claude_version" '
146-
(keys == ["buildDate", "commit", "manifestSignatureEnforcement", "modsCommit", "platforms", "sdkCompat", "version"]) and
146+
(has("platforms") and has("version")) and
147147
.version == $version and
148-
(.platforms["linux-arm64"] | keys == ["binary", "checksum", "size"]) and
149-
(.platforms["linux-x64"] | keys == ["binary", "checksum", "size"])
148+
(.platforms["linux-arm64"] | has("binary") and has("checksum") and has("size")) and
149+
(.platforms["linux-x64"] | has("binary") and has("checksum") and has("size"))
150150
' <<< "$claude_manifest" > /dev/null || die "Claude manifest schema changed"
151151

152152
read_claude_field() {

‎tests/updater.test.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ case " $* " in
254254
case "$url" in
255255
*/claude-code-releases/latest) printf '${claudeVersion}\\n' ;;
256256
*/${claudeVersion}/manifest.json)
257-
printf '%s\\n' '{"buildDate":"","commit":"","manifestSignatureEnforcement":false,"modsCommit":"","platforms":{"linux-arm64":{"binary":"claude","checksum":"${claudeSha}","size":101},"linux-x64":{"binary":"claude","checksum":"${claudeSha}","size":101}},"sdkCompat":{},"version":"${claudeVersion}"}'
257+
printf '%s\\n' '{"buildDate":"","commit":"","manifestSignatureEnforcement":false,"platforms":{"linux-arm64":{"binary":"claude","checksum":"${claudeSha}","size":101},"linux-x64":{"binary":"claude","checksum":"${claudeSha}","size":101}},"sdkCompat":{},"version":"${claudeVersion}"}'
258258
;;
259259
*/codex/channels/latest)
260260
printf '%s\\n' '{"assets":[{"browser_download_url":"https://releases.openai.com/codex/releases/${codexVersion}/codex-package-aarch64-unknown-linux-musl.tar.gz","digest":"sha256:${codexSha}","name":"codex-package-aarch64-unknown-linux-musl.tar.gz"},{"browser_download_url":"https://releases.openai.com/codex/releases/${codexVersion}/codex-package-x86_64-unknown-linux-musl.tar.gz","digest":"sha256:${codexSha}","name":"codex-package-x86_64-unknown-linux-musl.tar.gz"}],"tag_name":"rust-v${codexVersion}"}'
@@ -353,7 +353,7 @@ case " $* " in
353353
case "$url" in
354354
*/claude-code-releases/latest) printf '${claudeVersion}\\n' ;;
355355
*/${claudeVersion}/manifest.json)
356-
printf '%s\\n' '{"buildDate":"","commit":"","manifestSignatureEnforcement":false,"modsCommit":"","platforms":{"linux-arm64":{"binary":"claude","checksum":"${driftSha}","size":101},"linux-x64":{"binary":"claude","checksum":"${driftSha}","size":101}},"sdkCompat":{},"version":"${claudeVersion}"}'
356+
printf '%s\\n' '{"buildDate":"","commit":"","manifestSignatureEnforcement":false,"platforms":{"linux-arm64":{"binary":"claude","checksum":"${driftSha}","size":101},"linux-x64":{"binary":"claude","checksum":"${driftSha}","size":101}},"sdkCompat":{},"version":"${claudeVersion}"}'
357357
;;
358358
*/codex/channels/latest)
359359
printf '%s\\n' '{"assets":[{"browser_download_url":"https://releases.openai.com/codex/releases/${codexVersion}/codex-package-aarch64-unknown-linux-musl.tar.gz","digest":"sha256:${"2".repeat(64)}","name":"codex-package-aarch64-unknown-linux-musl.tar.gz"},{"browser_download_url":"https://releases.openai.com/codex/releases/${codexVersion}/codex-package-x86_64-unknown-linux-musl.tar.gz","digest":"sha256:${"2".repeat(64)}","name":"codex-package-x86_64-unknown-linux-musl.tar.gz"}],"tag_name":"rust-v${codexVersion}"}'

0 commit comments

Comments
 (0)