From f8d7dd139d1bd3ac717861c57153ad44c370ff4b Mon Sep 17 00:00:00 2001 From: librelad Date: Wed, 19 Aug 2026 02:15:10 +0100 Subject: [PATCH] fix(updater): load the ladder before probing for newer tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updaterNewerVersionByProbe guarded on updaterTagExists being defined and gave up when it was not. That function lives in the ladder, and a cross-file function is not reliably loaded in the generator's context — updaterAppPolicy a few lines below already carries an explicit source fallback for exactly this. Without one the probe silently did nothing, which is the failure mode it was added to remove. Source the ladder when the function is absent, matching the existing idiom. Verified by calling the probe with updaterTagExists undefined: it now loads the ladder and returns v1.159.0 for matrixdotorg/synapse instead of an empty string. Co-Authored-By: Claude Opus 5 --- scripts/source/files/arrays/function_manifest.sh | 3 +++ .../data/generators/updater/webui_updater_scan.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/source/files/arrays/function_manifest.sh b/scripts/source/files/arrays/function_manifest.sh index e9b9eed..78a3ff5 100644 --- a/scripts/source/files/arrays/function_manifest.sh +++ b/scripts/source/files/arrays/function_manifest.sh @@ -684,6 +684,7 @@ declare -gA LP_FN_MAP=( [_lpvCheckCompose]="validation/validate_config.sh" [_lpvCheckConfigFile]="validation/validate_config.sh" [_lpvCheckDeployedSecrets]="validation/validate_config.sh" + [_lpvCheckDeployedValues]="validation/validate_config.sh" [_lpvCheckPlaceholders]="validation/validate_config.sh" [lpVerifyInstall]="source/verify.sh" [lpVerifyMinisig]="source/fetch.sh" @@ -1831,6 +1832,7 @@ declare -gA LP_FN_ROOT=( [_lpvCheckCompose]="scripts" [_lpvCheckConfigFile]="scripts" [_lpvCheckDeployedSecrets]="scripts" + [_lpvCheckDeployedValues]="scripts" [_lpvCheckPlaceholders]="scripts" [lpVerifyInstall]="scripts" [lpVerifyMinisig]="scripts" @@ -3014,6 +3016,7 @@ _lpvCheckAuthAdapter() { unset -f _lpvCheckAuthAdapter; __lpAutoload "${install_ _lpvCheckCompose() { unset -f _lpvCheckCompose; __lpAutoload "${install_scripts_dir}validation/validate_config.sh"; _lpvCheckCompose "$@"; } _lpvCheckConfigFile() { unset -f _lpvCheckConfigFile; __lpAutoload "${install_scripts_dir}validation/validate_config.sh"; _lpvCheckConfigFile "$@"; } _lpvCheckDeployedSecrets() { unset -f _lpvCheckDeployedSecrets; __lpAutoload "${install_scripts_dir}validation/validate_config.sh"; _lpvCheckDeployedSecrets "$@"; } +_lpvCheckDeployedValues() { unset -f _lpvCheckDeployedValues; __lpAutoload "${install_scripts_dir}validation/validate_config.sh"; _lpvCheckDeployedValues "$@"; } _lpvCheckPlaceholders() { unset -f _lpvCheckPlaceholders; __lpAutoload "${install_scripts_dir}validation/validate_config.sh"; _lpvCheckPlaceholders "$@"; } lpVerifyInstall() { unset -f lpVerifyInstall; __lpAutoload "${install_scripts_dir}source/verify.sh"; lpVerifyInstall "$@"; } lpVerifyMinisig() { unset -f lpVerifyMinisig; __lpAutoload "${install_scripts_dir}source/fetch.sh"; lpVerifyMinisig "$@"; } diff --git a/scripts/webui/data/generators/updater/webui_updater_scan.sh b/scripts/webui/data/generators/updater/webui_updater_scan.sh index 9e1878e..ea3928d 100644 --- a/scripts/webui/data/generators/updater/webui_updater_scan.sh +++ b/scripts/webui/data/generators/updater/webui_updater_scan.sh @@ -241,7 +241,16 @@ updaterTagBumpAt() { # turn one app's scan into a crawl. updaterNewerVersionByProbe() { local cur="$1" repo="$2" - declare -F updaterTagExists >/dev/null 2>&1 || return 0 # ladder unavailable + # updaterTagExists lives in the ladder, and a cross-file function is not + # reliably already loaded here — same situation updaterAppPolicy handles + # below, so use the same remedy rather than assuming. Without the explicit + # source a missing function would make this whole fallback silently do + # nothing, which is precisely the failure mode it exists to remove. + if ! declare -F updaterTagExists >/dev/null 2>&1; then + [ -f "$install_scripts_dir/cli/commands/updater/cli_updater_ladder.sh" ] \ + && source "$install_scripts_dir/cli/commands/updater/cli_updater_ladder.sh" 2>/dev/null + declare -F updaterTagExists >/dev/null 2>&1 || return 0 + fi local shape; shape="$(updaterTagShape "$cur")" local ncomp; ncomp="$(printf '%s' "$cur" | grep -oE '[0-9]+' | wc -l | tr -d ' ')" [ "${ncomp:-0}" -gt 0 ] 2>/dev/null || return 0