We introduced a bit stricter check for the envvar names here: https://gitlab.wikimedia.org/repos/cloud/toolforge/envvars-api/-/commit/ed54564c569d27f35250dfb48c82e1bb41727e7b
But it's a bit too strict as it does not allow numbers after the first letter, though it should allow them (ex. TEST1 should be a valid name).