From /simplify codebase sweep (2026-06-10).
robustness/semantics.py:68-70 (_TARGET_KWARG_KEYS), :132-156 (_resolve_epsilon over "eps"/"epsilon"/"epsilons"; _BUDGET_KEY_GROUPS with "alpha"/"step_size"/"steps"): the shared semantics builder knows torchattacks'/foolbox's parameter spellings by name. budget_kwarg_source correctly delegated WHICH dict to the adapter, but WHICH KEYS stayed central.
Cost: a new adapter with different spellings (ART #287: eps_step; cleverhans: nb_iter) silently reports epsilon=None/steps=None in RobustnessSemantics -- the "what actually executed" record degrades without an error. The misplaced-budget warning also misses unknown spellings.
Fix: per-adapter ClassVar mapping canonical budget fields to that library's kwarg names, declared next to budget_kwarg_source, e.g.
budget_kwarg_names = {"epsilon": ("eps",), "step_size": ("alpha",), "steps": ("steps",)}
Semantics consumes the mapping. Same pattern as baseline_kwarg_name on transparency adapters.
From /simplify codebase sweep (2026-06-10).
robustness/semantics.py:68-70(_TARGET_KWARG_KEYS),:132-156(_resolve_epsilonover"eps"/"epsilon"/"epsilons";_BUDGET_KEY_GROUPSwith"alpha"/"step_size"/"steps"): the shared semantics builder knows torchattacks'/foolbox's parameter spellings by name.budget_kwarg_sourcecorrectly delegated WHICH dict to the adapter, but WHICH KEYS stayed central.Cost: a new adapter with different spellings (ART #287:
eps_step; cleverhans:nb_iter) silently reportsepsilon=None/steps=NoneinRobustnessSemantics-- the "what actually executed" record degrades without an error. The misplaced-budget warning also misses unknown spellings.Fix: per-adapter ClassVar mapping canonical budget fields to that library's kwarg names, declared next to
budget_kwarg_source, e.g.Semantics consumes the mapping. Same pattern as
baseline_kwarg_nameon transparency adapters.