The API and worker start from the same environment mapping but end up with different settings. Implement load_config(env) in config.py and have both entry points delegate to it.
Contract: missing RETRIES defaults to 3; present RETRIES must contain decimal digits only and represent an integer from 0 to 10. Missing FEATURE defaults to false; present FEATURE must be exactly "true" or "false". A present setting that is blank or invalid raises ValueError before startup; a blank value is not the same as a missing key. Return {"retries": int, "feature": bool}, never mutate env. RETRIES="0" means 0 retries and FEATURE="false" means False.
Flag the divergent return expression in both original loaders and explain why a single configuration contract is needed.