From e4fe2298f8ac569625028a7f8fd38024a8aa7aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Pe=CC=81rez?= Date: Fri, 17 Apr 2026 08:01:04 +0100 Subject: [PATCH] refactor(platform/bootstrap): selective imports + drop 3 dead imports (ADR-025 L2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bootstrap.nu had 5 star-imports. Body scan showed only 2 of the 5 files contributed any used symbols: config/accessor.nu -> config-get services/health.nu -> wait-for-service The other 3 files were imported with `use X *` but supplied zero used symbols — dead imports inherited from an earlier architecture: utils/logging.nu (0 used) dropped services/lifecycle.nu (0 used) dropped services/dependencies.nu (0 used) dropped All imports now use absolute paths from nulib/ root. Existing selective imports (context_manager, setup/mod, nickel_processor) kept as-is and promoted to absolute paths for consistency with ADR-025 rule. Validation: nu --ide-check 50 platform/bootstrap.nu -> 0 errors Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 2 --- nulib/lib_provisioning/platform/bootstrap.nu | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nulib/lib_provisioning/platform/bootstrap.nu b/nulib/lib_provisioning/platform/bootstrap.nu index a8a3459..5d72454 100644 --- a/nulib/lib_provisioning/platform/bootstrap.nu +++ b/nulib/lib_provisioning/platform/bootstrap.nu @@ -2,14 +2,15 @@ # Ensures critical platform services are running before executing provisioning tasks # Infrastructure-agnostic: supports Docker, Kubernetes, remote servers, etc. -use ../config/accessor.nu * -use ../config/context_manager.nu [get-active-workspace] -use ../setup/mod.nu [get-config-base-path] -use ../utils/logging.nu * -use ../utils/nickel_processor.nu [ncl-eval-soft] -use ../services/health.nu * -use ../services/lifecycle.nu * -use ../services/dependencies.nu * +# Selective imports — absolute paths (ADR-025 Phase 3 Layer 2). +# 5 former star-imports reduced to 2 selective imports. The other 3 +# (utils/logging.nu, services/lifecycle.nu, services/dependencies.nu) had +# zero used symbols in this file — they were dead imports. +use lib_provisioning/config/accessor/core.nu [config-get] +use lib_provisioning/config/context_manager.nu [get-active-workspace] +use lib_provisioning/setup/mod.nu [get-config-base-path] +use lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft] +use lib_provisioning/services/health.nu [wait-for-service] # Load service deployment configuration def get-service-config [service_name: string] {