fix(core): resolve undefined symbols hidden by lib_provisioning star-imports
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
This commit is contained in:
parent
758848fff9
commit
a6ecf5b7fb
3 changed files with 2 additions and 5 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
# Re-export provider middleware to avoid deep relative imports
|
|
||||||
# This centralizes all provider imports in one place
|
|
||||||
export use ../../../extensions/providers/prov_lib/middleware.nu *
|
|
||||||
|
|
@ -16,7 +16,7 @@ use ../lib_provisioning/platform/service-manager.nu [load-service-config get-ser
|
||||||
# COMMENTED OUT: tera_daemon.nu has parse errors - will use fallback tera plugin
|
# COMMENTED OUT: tera_daemon.nu has parse errors - will use fallback tera plugin
|
||||||
# use ../lib_provisioning/tera_daemon.nu *
|
# use ../lib_provisioning/tera_daemon.nu *
|
||||||
|
|
||||||
use ../lib_provisioning/providers.nu [mw_enrich_template_context]
|
use ../../extensions/providers/prov_lib/middleware.nu [mw_enrich_template_context]
|
||||||
use ../lib_provisioning/utils/undefined.nu [invalid_task]
|
use ../lib_provisioning/utils/undefined.nu [invalid_task]
|
||||||
use ../lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft]
|
use ../lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft]
|
||||||
use ../lib_provisioning/utils/settings.nu *
|
use ../lib_provisioning/utils/settings.nu *
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ def state-tmp-path [workspace_path: string]: nothing -> string {
|
||||||
const LOG_MAX_ENTRIES = 50
|
const LOG_MAX_ENTRIES = 50
|
||||||
|
|
||||||
# Trim log to last LOG_MAX_ENTRIES entries.
|
# Trim log to last LOG_MAX_ENTRIES entries.
|
||||||
def log-trim [entries: list]: nothing -> list {
|
export def log-trim [entries: list]: nothing -> list {
|
||||||
let n = ($entries | length)
|
let n = ($entries | length)
|
||||||
if $n <= $LOG_MAX_ENTRIES { return $entries }
|
if $n <= $LOG_MAX_ENTRIES { return $entries }
|
||||||
$entries | last $LOG_MAX_ENTRIES
|
$entries | last $LOG_MAX_ENTRIES
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue