As a buildpack user
I want an environment variable providing my tool's registered Toolforge name
So I can use that data in configuration for my tool without requiring that I set my own envvar, compute it from $TOOL_DATA_DIR after mounting a volume, or otherwise derive the value from weak signals provided by the platform.
Use case(s):
It can be really handy within the configuration for a tool to know what the tool's name is so that things like contact emails and canonical URLs can be computed rather than requiring explicit configuration or hard coded values.
One concrete example is the $wlToolName value in mwdemo's LocalSettings.php which is computed using posix_getuid() which is valid in legacy shared containers, but not present in buildpack managed containers.
Benefits (why should this be implemented?):
Easier for endusers than remembering to add their own toolforge envvars create TOOL $(id -un | cut -d. -f2) local configuration.
Using $TOOL as the envvar also nicely matches many Toolforge documentation examples where the docs are trying to be generic about which tool account is being used (e.g. become $TOOL).
This would be even more awesome when combined with T358537: [envvars-cli] Enable use of `toolforge envvar` managed data on bastions so that $TOOL would also be present on the bastions after a become.