From e6f34644edd7ea2796b97a2c7bd27acb71123f9e Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Fri, 28 Aug 2026 03:54:40 +0200 Subject: [PATCH] fix(drv): gate the PROVIDERS enumeration against reality build-gustos-components.sh enumerates five providers by hand. Unlike the other enumerated lists found this month, that one is CORRECT to enumerate: it defines the published v0.4.0 composition, and a newly added provider must not silently join the fused composite just by existing. Glob discovery would be the wrong fix here. What was missing is the check that the deliberate list still matches reality. An enumeration nobody verifies is exactly how the Lean target list, check-providers.sh, and build-cross-arch.sh each came to exclude the newest thing without saying so. So: enumerated on purpose, and gated. If a *-provider directory exists that is not listed, the script fails and names it, and the fix is a deliberate decision (add it to PROVIDERS and build-fused-gustos.sh, or record why it is excluded) rather than a silent skip. Kill-criterion, both directions verified: real tree (5 listed, 5 present) -> exit 0, no drift reported mkdir can-provider (5 listed, 6 present) -> exit 2: present but unlisted: can-provider Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo --- .../gust/drivers/build-gustos-components.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/benches/gust/drivers/build-gustos-components.sh b/benches/gust/drivers/build-gustos-components.sh index b751398..62b8ec9 100755 --- a/benches/gust/drivers/build-gustos-components.sh +++ b/benches/gust/drivers/build-gustos-components.sh @@ -37,6 +37,25 @@ PROVIDERS=( "timer-provider:gust_timer_provider" ) +# DRIFT GATE on the list above. The enumeration is deliberate -- it defines the +# PUBLISHED composition, and a newly added provider must not silently join the +# fused composite just by existing. But an enumeration nobody checks is how three +# other gates in this tree came to exclude the newest thing without saying so +# (see CROSS-ARCH.md). So: enumerated on purpose, and verified against reality. +# +# If a `*-provider` directory exists that is not listed, this fails and names it. +# The fix is a deliberate decision -- add it to PROVIDERS and to +# build-fused-gustos.sh, or record why it is excluded -- not a silent skip. +_listed="$(printf '%s\n' "${PROVIDERS[@]}" | cut -d: -f1 | sort)" +_present="$(cd "$HERE" && ls -d *-provider 2>/dev/null | sed 's|/$||' | sort)" +if [ "$_listed" != "$_present" ]; then + echo "FATAL: PROVIDERS list has drifted from the *-provider directories." >&2 + echo " listed but absent: $(comm -23 <(echo "$_listed") <(echo "$_present") | tr '\n' ' ')" >&2 + echo " present but unlisted: $(comm -13 <(echo "$_listed") <(echo "$_present") | tr '\n' ' ')" >&2 + echo " Add it to PROVIDERS and build-fused-gustos.sh, or record why it is excluded." >&2 + exit 2 +fi + # Checked at SOURCE, not in the binary. A `Tasks` table lives in wasm .bss, which a # module never declares, so no reliable binary signal says "this module holds one" — # see build-fused-gustos.sh's gate 4 for the signal that was tried and rejected.