utils/version/mod.nu had 6 `export use X *`. Each is now explicit.
Symbol counts per target:
core.nu 6
formatter.nu 3
loader.nu 6
manager.nu 7
registry.nu 6
taskserv.nu 7
Total: 35 symbols re-exported.
Validation:
nu --ide-check 50 version/mod.nu -> 0 errors
Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 3
utils/mod.nu was the top subsystem facade (10 stars reported in the DAG,
16 on closer inspection). Each `export use X *` is now `export use X [symbols]`
with an explicit list.
Symbol counts per target:
interface.nu 13
init.nu 13
logging.nu 13
settings.nu 19 (file already selective per pilot commit 8de5e63)
imports.nu 16
generate.nu 6
ssh.nu 5
files.nu 4
error.nu 2
undefined.nu 2
format.nu 2
templates.nu 2
clean.nu 1
help.nu 1
on_select.nu 1
qr.nu 1
Total: 101 distinct symbols re-exported by name. Consumers using
`use lib_provisioning/utils *` see an identical symbol set, but every
symbol is now auditable.
Validation:
nu --ide-check 50 utils/mod.nu -> 4 errors, all pre-existing (verified
by stash-and-compare against the pre-refactor version). Zero new
errors introduced.
Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 3
ui.nu is a 5-line facade re-exporting UI primitives from clean.nu, error.nu,
help.nu, interface.nu, undefined.nu. All five used `export use X *` — ADR-025
transitivity rule prohibits these root star-re-exports.
Replaced each star with explicit symbol lists (19 symbols total):
clean.nu [cleanup] (1)
error.nu [throw-error safe-execute] (2)
help.nu [parse_help_command] (1)
interface.nu [13 symbols, one per line] (13)
undefined.nu [option_undefined invalid_task] (2)
The facade keeps the 2 callers (cmd/environment.nu, cmd/lib.nu) working with
their existing `use ../utils/ui.nu *` pattern — the consumers see identical
behaviour, but the symbol set is now explicit and bounded.
Validation:
nu --ide-check 50 ui.nu -> 0 errors
nu --ide-check 50 cmd/environment.nu -> 0 errors (regression check)
nu --ide-check 50 cmd/lib.nu -> 0 errors (regression check)
Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 2
First real star-import removal. settings.nu is the highest fan-in importer
in the lib_provisioning/ transitivity DAG (8 star-imports, common ancestor
for most symbols consumed by the 16 root fat-import files).
Before:
use ../config/accessor.nu *
use ./logging.nu *
use ./nickel_processor.nu *
use ./error.nu [throw-error]
use ./init.nu [get-provisioning-infra-path get-provisioning-name get-provisioning-resources]
use ../../../../extensions/providers/prov_lib/middleware.nu *
use ../context.nu *
use ../sops/mod.nu *
use ../workspace/detection.nu *
use ../user/config.nu *
After (absolute paths from nulib/ root, named-symbol imports):
use lib_provisioning/config/accessor/core.nu [config-get]
use lib_provisioning/context.nu [setup_user_context]
use lib_provisioning/sops/lib.nu [is_sops_file decode_sops_file on_sops]
use lib_provisioning/user/config.nu [get-workspace-default-infra get-workspace-path]
use lib_provisioning/utils/error.nu [throw-error]
use lib_provisioning/utils/init.nu [get-provisioning-infra-path get-provisioning-name get-provisioning-resources get-work-format]
use lib_provisioning/utils/interface.nu [_ansi _print]
use lib_provisioning/utils/logging.nu [is-debug-enabled]
use lib_provisioning/utils/nickel_processor.nu [ncl-eval ncl-eval-soft process_nickel_export_raw]
use lib_provisioning/workspace/detection.nu [detect-infra-from-pwd get-effective-workspace infer-workspace-from-pwd]
use ../../../../extensions/providers/prov_lib/middleware.nu [mw_create_cache mw_ip_from_cache]
Cross-tree middleware import kept relative — the target is outside nulib/
(public extension API consumed by workspaces). Only two specific middleware
symbols are pulled; the rest of middleware.nu is no longer in settings.nu
scope.
Method: grep bare identifiers in settings.nu body, intersect with each
star-imported target's export set, record origin. Followed pattern from
Phase 3 pilot methodology (ADR-025 section "Fix call sites bottom-up").
Validation:
nu --ide-check 50 lib_provisioning/utils/settings.nu
-> 0 errors, 0 warnings (type hints only)
Transitivity note: several target files (error.nu, logging.nu, init.nu,
sops/lib.nu, detection.nu) still contain star-imports of their own. This
pilot proves the pattern works; subsequent commits will climb the DAG
leaves-first and eventually remove those remaining stars.
Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md (Layer 3 priority)