Three files with 3 stars each -> selective.
cmd/lib.nu:
utils/init.nu [get-workspace-path get-provisioning-infra-path] (kept)
sops/lib.nu [find-sops-key on_sops]
config/accessor DROPPED (dead)
utils/ui.nu DROPPED (dead)
config/loader/core.nu:
All 3 star-imports (interpolators, context_manager, sops_handler) were
dead — NONE of their exports are used in the file body. All dropped.
config/encryption.nu:
sops/lib.nu [3 symbols — get-sops-age-key-file is_sops_file on_sops]
kms/lib.nu [on_kms]
plugins/kms.nu [3 symbols] (already selective; kept)
config/accessor DROPPED (dead)
Deferred from this batch: cmd/environment.nu.
It calls 7+ functions that are not defined anywhere in the codebase
(list-available-environments, get-current-environment, switch-environment,
init-environment-config, show-config, compare-environments, etc.).
Converting its star-imports to selective would surface those as undefined
symbol errors. Needs the Blocker-1 style treatment (stubs or elimination)
in a dedicated commit. Tracked as follow-up.
Validation: all 3 nu --ide-check 50 -> 0 errors.
Refs: ADR-025
Two export-env blocks in lib_provisioning/ ran at module load time as side
effects of the lib_provisioning/mod.nu star-import chain. ADR-025 empties
that chain; the side effects were never going to fire again and neither has
a remaining reader that depends on them.
1. lib_provisioning/cmd/env.nu
Former block: called check_env (a pre-flight gate for PROVISIONING_VARS /
PROVISIONING_WORKSPACE_PATH / PROVISIONING_WK_ENV_PATH existence) and set
$env.PROVISIONING_DEBUG = false. Nobody imports cmd/env.nu directly; every
downstream reader of PROVISIONING_DEBUG either sets it explicitly via a
--debug flag branch or reads it with `?` + default fallback.
2. lib_provisioning/providers/registry.nu
Former block: $env.PROVIDER_REGISTRY_INITIALIZED = false. The four read
sites in registry.nu already use `$env.PROVIDER_REGISTRY_INITIALIZED? |
default false`; the unset state is equivalent to false. Zero behaviour
change.
Both files now carry a comment explaining the removal so future contributors
understand the history without reading ADR-025.
Refs: ADR-025, .coder/benchmarks/phase2-findings.md export-env decisions