prvng_core/nulib/lib_provisioning/utils
Jesús Pérez 8de5e63c2b
refactor(lib_provisioning/utils/settings): selective imports (ADR-025 pilot)
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)
2026-04-17 07:53:08 +01:00
..
version feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
clean.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
command-registry.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
config.nu chore: complete KCL to Nickel migration cleanup and setup pre-commit 2026-01-08 20:08:46 +00:00
error.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
error_clean.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
error_final.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
error_fixed.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
files.nu chore: release 1.0.11 - nu script cleanup & refactoring + i18n fluentd 2026-01-14 02:00:23 +00:00
format.nu chore: complete KCL to Nickel migration cleanup and setup pre-commit 2026-01-08 20:08:46 +00:00
generate.nu chore: release 1.0.11 - nu script cleanup & refactoring + i18n fluentd 2026-01-14 02:00:23 +00:00
git-commit-msg.nu chore: release 1.0.11 - nu script cleanup & refactoring + i18n fluentd 2026-01-14 02:00:23 +00:00
help.nu chore: complete KCL to Nickel migration cleanup and setup pre-commit 2026-01-08 20:08:46 +00:00
hints.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
imports.nu chore: release 1.0.11 - nu script cleanup & refactoring + i18n fluentd 2026-01-14 02:00:23 +00:00
init.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
interface.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
logging.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
mod.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
nickel_processor.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
on_select.nu chore: release 1.0.11 - nu script cleanup & refactoring + i18n fluentd 2026-01-14 02:00:23 +00:00
path-utils.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
qr.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
script-compression.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
service-check.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
settings.nu refactor(lib_provisioning/utils/settings): selective imports (ADR-025 pilot) 2026-04-17 07:53:08 +01:00
simple_validation.nu chore: complete KCL to Nickel migration cleanup and setup pre-commit 2026-01-08 20:08:46 +00:00
ssh.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
templates.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
test.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
ui.nu chore: complete KCL to Nickel migration cleanup and setup pre-commit 2026-01-08 20:08:46 +00:00
undefined.nu feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration 2026-04-17 04:27:33 +01:00
validation.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
validation_helpers.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00
version.nu chore: Fix try cath and nushell bugs, fix long script files, review for nu 0.110.0 2026-01-21 10:24:17 +00:00