You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: hold the component metadata vocabulary to one list
discloses: was checked against a fixed set of values, method: only for
presence, so any word at all passed as a technique category. The two
vocabularies were also written in three places -- this check, the
KASLD_META reference in api.h, and the metadata table in CONTRIBUTING.md
-- with nothing holding them together, and they discriminate only while
all three agree. Both directions had drifted: a value shipped components
carry that neither document named, and a name borrowed from the
confidence ladder documented as a method, where it says nothing about a
technique. Neither surfaces at runtime, because only detection is
branched on and every other value is printed verbatim.
The two sets are now named once and are the source of truth. method: is
checked against its set per component as discloses: already was, both
documents must name exactly the same sets, and every allowed value must
be carried by at least one component -- which is what catches a name
imported from a neighbouring vocabulary, since such a value has no
component to point at. Retiring the last component of a category now
means dropping the value in the same change.
The documents are read as text, so their present shape is load-bearing:
the api.h method entry lists its values after "Values:" and ends the
sentence with a period, its discloses entry quotes each value, and
CONTRIBUTING.md carries one table row per key with the values last.
Rewriting either away from that shape fails this check rather than
passing silently.
printf'%scheck-component-meta: FAIL%s — KASLD_META without a method: key:\n'"$RED""$RESET"
92
191
forcin$nomethod;doprintf' %s\n'"$c";done
93
192
fi
193
+
if [ -n"$badmethod" ];then
194
+
printf'%scheck-component-meta: FAIL%s — method: must be one of %s:\n'"$RED""$RESET""$METHOD_VALUES"
195
+
forcin$badmethod;doprintf' %s\n'"$c";done
196
+
fi
94
197
if [ -n"$nodisc" ];then
95
198
printf'%scheck-component-meta: FAIL%s — KASLD_META without a discloses: key:\n'"$RED""$RESET"
96
199
forcin$nodisc;doprintf' %s\n'"$c";done
@@ -106,6 +209,6 @@ fi
106
209
if [ "$rc"-eq 0 ];then
107
210
guard_scope "check-component-meta""$n" 80
108
211
109
-
printf'%scheck-component-meta: OK%s (%d components, all declare KASLD_META with method: and discloses:)\n'"$GREEN""$RESET""$n"
212
+
printf'%scheck-component-meta: OK%s (%d components, all declare KASLD_META with method: and discloses:; vocabulary matches api.h and CONTRIBUTING.md)\n'"$GREEN""$RESET""$n"
0 commit comments