Description
The pkg/envutil package was created to centralise env-var access but exposes only GetIntFromEnv. Boolean flags (CI, GO_TEST_MODE, CODESPACES) and token-presence checks are still read via raw os.Getenv, and IsRunningInCI() in pkg/cli is bypassed by 3 same-package callsites. Add GetBoolFromEnv and GetStringFromEnv helpers (with spec tests + README, mirroring GetIntFromEnv), then migrate the 3 os.Getenv("CI") bypasses to call IsRunningInCI().
Expected Impact
Consistent, mockable env-var behaviour across environments; unblocks the stalled osgetenvlibrary migration.
Suggested Agent
Copilot SWE Agent
Estimated Effort
Medium (1-4 hours)
Data Source
DeepReport 2026-07-07; Repository Quality Report #44041
Generated by 🔬 Deep Report · 191.8 AIC · ⌖ 16.9 AIC · ⊞ 10K · ◷
Description
The
pkg/envutilpackage was created to centralise env-var access but exposes onlyGetIntFromEnv. Boolean flags (CI,GO_TEST_MODE,CODESPACES) and token-presence checks are still read via rawos.Getenv, andIsRunningInCI()inpkg/cliis bypassed by 3 same-package callsites. AddGetBoolFromEnvandGetStringFromEnvhelpers (with spec tests + README, mirroringGetIntFromEnv), then migrate the 3os.Getenv("CI")bypasses to callIsRunningInCI().Expected Impact
Consistent, mockable env-var behaviour across environments; unblocks the stalled
osgetenvlibrarymigration.Suggested Agent
Copilot SWE Agent
Estimated Effort
Medium (1-4 hours)
Data Source
DeepReport 2026-07-07; Repository Quality Report #44041