Commit graph

3 commits

Author SHA1 Message Date
Jesús Pérez
6f0de7ae89
core: move cluster introspection helpers to domain/cluster (ADR-026 slice 2b)
Complete the cluster decomposition: the 23 introspection helpers (capacity,
kubectl/ssh summaries, live-check, badges) move from cli/components_cluster.nu to
domain/cluster/introspect.nu. cli/components_cluster.nu now holds ONLY the 5
`main cluster *` verbs (963 -> 452 lines). introspect.nu imports downward only
(tools/nickel, domain/cluster/access, platform/clients/ssh, primitives/logging).

Exported 4 previously-private helpers (fmt-gib, k8s-quantity-bytes,
node-operator-labels, cluster-top-legend) so the cli verbs can call them across
the module boundary; dropped a dead comp-dag-summary import. component.nu repoints
its 11 helper imports to introspect.nu.

Verified: module-load of all touched modules (no cycle, no upward import); ADR-026
topology clean across the whole cluster subsystem; cluster --help + component list
run. Concludes slices 2a+2b: cli/components.nu 3611 -> 2410 (-33%).
2026-07-10 07:24:20 +01:00
Jesús Pérez
c22722a418
core: push cluster foundation out of cli/components.nu to proper layers (ADR-026 slice 2a)
Untangle the shared foundation that the cluster subsystem depends on, moving each
helper to the layer its dependency topology dictates, de-cli-ifying on the way
(cli-err → error make). One-directional imports only; verified no cycles.

  comp-ncl-export                        → tools/nickel/process.nu
  ws-resolution (8 fns + root finders)   → domain/workspace/resolve.nu  (new)
  comp-ssh-run, comp-server-ssh-info     → platform/clients/ssh.nu       (new)
  comp-kubectl-access, comp-kubectl-ssh  → domain/cluster/access.nu      (new)

Consumers (components.nu, components_cluster.nu, component.nu) repointed to the
new locations. components.nu 2664 → 2408.

Verified: NU_LIB_DIRS module-load of all 8 touched modules (no cycle, no missing
command, no export error); ADR-026 hygiene (no upward imports in the new
platform/domain/tools modules); `provisioning component list` runs; component/cluster
--help exit 0. Prereq for slice 2b (cluster helpers → domain/cluster/introspect.nu).
2026-07-10 07:16:14 +01:00
Jesús Pérez
c935aa530d
core: extract cluster-observability slice from components.nu (ADR-026) 2026-07-10 06:20:26 +01:00