Complete the header template across Partnership, Kernel, Deployment and Plugin
Finishes the pass: every script now documents its safeguards, and the deliberate absences in the sourced libraries are recorded so they are not "corrected" later.
This commit is contained in:
@@ -36,6 +36,65 @@
|
||||
# This loader sources whatever conf files ARE present — sparse checkout handles the rest.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# No Root, No Lock, No detect_hosts on Load — Deliberate
|
||||
# Sourced by every script in the ecosystem, including read-only ones. A root check here
|
||||
# would gate all of them, a lock would be taken on every source, and auto-calling
|
||||
# detect_hosts() would exit the caller on an unknown hostname before it could handle that
|
||||
# itself. The executable scripts own those gates. Do not add them here.
|
||||
#
|
||||
# Fatal on Missing common.sh
|
||||
# Aborts loudly if common.sh is absent. Every downstream script assumes log(), error(),
|
||||
# acquire_lock() and detect_hosts() exist; continuing without them would produce
|
||||
# command-not-found errors scattered through unrelated scripts instead of one clear cause.
|
||||
#
|
||||
# Adapter Load Is Optional
|
||||
# A missing Plugin/$PLATFORM/adapter.sh is tolerated so the ecosystem can run before the
|
||||
# plugin directory exists — bootstrap and early install paths depend on that.
|
||||
#
|
||||
# Load Order Is Enforced, Not Incidental
|
||||
# confs before common.sh before adapter. common.sh needs HOST* to already be set, and the
|
||||
# adapter needs common.sh's output helpers. Reordering breaks both silently.
|
||||
#
|
||||
# Partner Confs Are Cache-Only
|
||||
# Partner host*.conf files load from the tmpfs RAM cache, never from disk. Sparse checkout
|
||||
# means this host has no partner conf in the repo, and reading a stale on-disk copy would
|
||||
# resurrect credentials the partner has since rotated.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
# This file is the thing that loads configuration, so it consumes almost none itself. The one
|
||||
# input it must find on its own:
|
||||
#
|
||||
# /boot/config/plugins/varaverk/varaverk.cfg
|
||||
# SCRIPTS_DIR the authoritative install path — everything else derives from it
|
||||
# PLATFORM selects which Plugin/<platform>/adapter.sh gets sourced
|
||||
#
|
||||
# It then defines the paths the rest of the ecosystem builds on:
|
||||
#
|
||||
# CONF_RAM_CACHE_DIR /tmp/.cache/vv/d — tmpfs partner conf cache, cleared each reboot
|
||||
# ARR_CACHE_DIR /tmp/arr_cache — tmpfs, restored from DATA_DIR on demand
|
||||
#
|
||||
# Everything else (STATE_DIR, DATA_DIR, thresholds, credentials) comes out of master.conf and
|
||||
# host*.conf, which this file sources rather than defines.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# None — sourced, never executed. Every script begins with:
|
||||
#
|
||||
# SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# source "$SCRIPT_DIR/../load_config.sh"
|
||||
#
|
||||
# It takes no arguments and honours no flags. parse_args() arrives via common.sh and is
|
||||
# called by the script itself afterwards.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user