Reject empty min_release_age, self-age the e2e fixtures, run self-tests in CI

An empty min_release_age string now maps to unparseable rather than absent,
so "min_release_age": "" fails validation instead of silently running
with a zero-second quarantine. The end-to-end fixtures extend the
checked-in pkgver (.90/.91) so the test keeps working at any future mise
version. A Tests workflow runs bin/sync-upstream self-test and
bin/omarchy-pkgs self-test on every PR in the Arch container, making the
proof machine-checked instead of author-supplied. The README package
metadata field list documents upstream and min_release_age.
This commit is contained in:
Ryan Hughes
2026-08-24 20:22:33 -04:00
parent 83bdfb5fa1
commit fd03757f22
4 changed files with 55 additions and 11 deletions
+7 -3
View File
@@ -93,10 +93,14 @@ package_min_release_age_seconds() {
echo 0
return 0
fi
# A present-but-empty value maps to "unparseable", not to "absent": only a
# missing key means no hold, so '"min_release_age": ""' cannot silently
# disable the quarantine.
raw=$(jq -r '
if has("min_release_age") then
.min_release_age | if type == "string" or type == "number" then tostring else "unparseable" end
else "" end
if has("min_release_age") | not then ""
elif (.min_release_age | type) == "string" or (.min_release_age | type) == "number" then
.min_release_age | tostring | if . == "" then "unparseable" else . end
else "unparseable" end
' "$metadata")
if [[ -z "$raw" ]]; then
echo 0