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
Six symbols were referenced across the codebase but had no definition anywhere.
Star-imports from lib_provisioning/mod.nu silenced the missing-def errors at
parse time; at runtime the call sites either threw or took dead code paths.
ADR-025 Phase 2 (AST audit) surfaced them as blockers for Phase 3 because
selective imports would expose them as "variable not found" errors.
Resolution: add stub getters in lib_provisioning/config/accessor/functions.nu
following the existing pattern (env -> config -> PROVISIONING-derived -> ""):
- get-providers-path (14 call sites)
- get-prov-lib-path (2 call sites)
- get-core-nulib-path (7 call sites)
- get-provisioning-generate-dirpath (5 call sites)
- get-provisioning-generate-defsfile (1 call site)
- get-provisioning-req-versions (4 call sites)
All existing callers already guard results with is-empty / path exists checks,
so empty-string returns fall back to safe no-op paths.
show_tools_info (main_provisioning/tools.nu) was missing a guard around its
open call; added is-empty / path-exists check matching sibling fns.
The only non-path symbol (on_clusters in clusters/create.nu) had no recoverable
implementation; its closure is replaced with a user-facing message directing
to 'prvng cluster deploy' (the supported workflow).
Refs: ADR-025, .coder/benchmarks/phase2-findings.md blockers section
Six symbols were referenced across the codebase but had no definition anywhere.
Star-imports from lib_provisioning/mod.nu silenced the missing-def errors at
parse time; at runtime the call sites either threw or took dead code paths.
ADR-025 Phase 2 (AST audit) surfaced them as blockers for Phase 3 because
selective imports would expose them as "variable not found" errors.
Resolution: add stub getters in lib_provisioning/config/accessor/functions.nu
following the existing pattern (env -> config -> PROVISIONING-derived -> ""):
- get-providers-path (14 call sites)
- get-prov-lib-path (2 call sites)
- get-core-nulib-path (7 call sites)
- get-provisioning-generate-dirpath (5 call sites)
- get-provisioning-generate-defsfile (1 call site)
- get-provisioning-req-versions (4 call sites)
All existing callers already guard results with is-empty / path exists checks,
so empty-string returns fall back to safe no-op paths.
show_tools_info (main_provisioning/tools.nu) was missing a guard around its
open call; added is-empty / path-exists check matching sibling fns.
The only non-path symbol (on_clusters in clusters/create.nu) had no recoverable
implementation; its closure is replaced with a user-facing message directing
to 'prvng cluster deploy' (the supported workflow).
Refs: ADR-025, .coder/benchmarks/phase2-findings.md blockers section
Six symbols were referenced across the codebase but had no definition anywhere.
Star-imports from lib_provisioning/mod.nu silenced the missing-def errors at
parse time; at runtime the call sites either threw or took dead code paths.
ADR-025 Phase 2 (AST audit) surfaced them as blockers for Phase 3 because
selective imports would expose them as "variable not found" errors.
Resolution: add stub getters in lib_provisioning/config/accessor/functions.nu
following the existing pattern (env -> config -> PROVISIONING-derived -> ""):
- get-providers-path (14 call sites)
- get-prov-lib-path (2 call sites)
- get-core-nulib-path (7 call sites)
- get-provisioning-generate-dirpath (5 call sites)
- get-provisioning-generate-defsfile (1 call site)
- get-provisioning-req-versions (4 call sites)
All existing callers already guard results with is-empty / path exists checks,
so empty-string returns fall back to safe no-op paths.
show_tools_info (main_provisioning/tools.nu) was missing a guard around its
open call; added is-empty / path-exists check matching sibling fns.
The only non-path symbol (on_clusters in clusters/create.nu) had no recoverable
implementation; its closure is replaced with a user-facing message directing
to 'prvng cluster deploy' (the supported workflow).
Refs: ADR-025, .coder/benchmarks/phase2-findings.md blockers section