Files
DeepSeek-Reasonix/scripts/compare-cli-release-manifests.sh
T
SivanCola c54516a516 fix(release): preserve legacy manifests and exact notes
Problem:
- Existing CLI and Desktop manifests predate exact release-note URLs, RC notes had no supported catalog path, and unpublished exact routes could 404.
- The Preview SignPath call-graph test also retained the old allowlist.

Root cause:
- New manifest validation and byte comparisons did not distinguish legacy persisted objects from newly generated candidates.
- Standalone RCs were treated as public changelog identities, and version routes were generated only after publication markers.

Fix:
- Add strict and legacy validation plus semantic comparators that normalize only the missing release-notes field and preserve immutable Desktop manifests.
- Reuse Stable notes for standalone RCs, generate safe unpublished redirects, and update the SignPath contract test.
- Add focused workflow, manifest, route, and RC regression coverage.

Verification:
- bash scripts/release-workflows.test.sh
- go test ./... and go vet ./...
- desktop go test ./... and go vet ./...
- site npm test and npm run build
- node --test scripts/release-notes.test.mjs
- actionlint with the repository CI allowlist
- live v1.18.0 CLI and Desktop manifest compatibility checks
2026-07-31 08:18:49 +08:00

22 lines
649 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
candidate="${1:-}"
existing="${2:-}"
for manifest in "$candidate" "$existing"; do
if [ ! -f "$manifest" ]; then
echo "CLI release manifest does not exist: $manifest" >&2
exit 1
fi
done
# Immutable manifests published before release_notes_url existed remain valid.
# Normalize only that missing field from the strict candidate; every other
# semantic difference must still fail the immutable recovery check.
jq -e -s '
.[0] as $candidate |
.[1] as $existing |
($existing | .release_notes_url = (.release_notes_url // $candidate.release_notes_url)) == $candidate
' "$candidate" "$existing" >/dev/null