Add full banner headers to all scripts across the codebase

Every script now has the established header format: PURPOSE with ─────── separator,
OPERATIONAL MODEL, DESIGN PRINCIPLES, OPERATIONAL SAFEGUARDS, CONFIGURATION, and
RUNTIME MODES — structured with full ====== banner sections throughout.

Orchestrators converted from compact ── inline format to full banners. Stale
emby-fallback and dirty sync references removed from Plugin/user_script_plug-in.sh.
This commit is contained in:
Gmer4Lfe
2026-06-26 18:50:05 -04:00
parent 1003bee72a
commit f92ee4064b
51 changed files with 1822 additions and 563 deletions
+19
View File
@@ -18,6 +18,25 @@
# configuration issue. Silent on clean runs.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# No Persistent State
# Every report is generated fresh from the Emby API. No local database, no
# incremental tracking. A missed run leaves no gap — the next run simply
# covers its own window.
#
# Silent When Healthy
# The report goes to Discord/notification as a summary. Transcode alerts are
# the only proactive notification — high transcode ratios may indicate a
# misconfigured client that needs attention before it becomes a performance issue.
#
# Section Independence
# Each report section (sessions, library, activity, top content) guards its own
# API calls. A failure in one section does not abort the others — the report
# produces partial output rather than nothing.
#
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
+30
View File
@@ -24,6 +24,36 @@
# Safe to share with mesh members — contains no API keys, passwords, or SSH keys.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Read-Only, No Network Calls
# All data comes from conf files — no SSH, no API calls, no pings. The output
# is always instant and never fails due to a node being unreachable. This makes
# it safe to run at any time without side effects.
#
# Scales Automatically
# Iterates all defined HOST* vars rather than a hardcoded list. Adding a new
# node to master.conf/host*.conf makes it appear in the output immediately.
#
# Safe to Share
# Output contains only identity and coverage configuration — no API keys,
# no passwords, no SSH keys. The report can be shared with other mesh members
# without exposing secrets.
#
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
# No External Dependencies
# Reads only from already-sourced conf files. No curl, no ssh, no docker —
# nothing that can fail, hang, or require credentials.
#
# Empty Mesh Guard
# collect_hosts() populates ALL_HOST_IDS — if no HOST* vars are defined the
# output sections iterate over an empty array and exit cleanly.
#
# ==============================================================================================
# CONFIGURATION
# ==============================================================================================
#
+19
View File
@@ -19,6 +19,25 @@
# from master.conf if dynamix.cfg is not found.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Live Queries, No Persistent State
# Every run queries smartctl directly — no cached attribute history, no trend
# tracking. Each report is a snapshot of current drive health. This keeps the
# script simple and the output always current.
#
# Threshold Parity With unRAID Dashboard
# Temperature thresholds are read from dynamix.cfg — the same values unRAID
# uses on its own dashboard. A consistent threshold means no conflicting alerts
# between this script and the built-in unRAID warnings.
#
# Silent When Healthy
# No output, no notification on a clean run. The absence of a report is the
# confirmation that all drives passed. Noise from weekly healthy runs would
# erode attention to the reports that matter.
#
# ==============================================================================================
# OPERATIONAL SAFEGUARDS
# ==============================================================================================
#
+18
View File
@@ -18,6 +18,24 @@
# WebGUI slowdowns or timeouts under load.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Snapshot for Trend, Not Just Alert
# Exhaustion events are rarely instant — they build over hours or days.
# Logging every 6 hours builds a trend that weekly_health_digest.sh can
# surface as a warning count, catching gradual pressure before it becomes
# an outage.
#
# Bounded Log Size
# Log entries are trimmed to TUNING_LOG_RETENTION days on every write.
# The log never grows unbounded regardless of how long the server runs.
#
# Silent When Healthy
# No output, no notification on a clean run. Threshold breach is the only
# signal — routine snapshots below the threshold produce nothing.
#
# ==============================================================================================
# OPERATIONAL MODEL
# ==============================================================================================
#
+18
View File
@@ -14,6 +14,24 @@
# into a single digest. Reads only — writes nothing, changes nothing.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Aggregator, Not Generator
# This script reads state files that other scripts maintain. It never produces
# health data itself — it only presents what is already there. Each source
# script remains responsible for its own state; this script is the envelope.
#
# Profile-Driven Notification
# The cron schedule never changes. The DIGEST_PROFILE in master.conf controls
# when notifications actually send — switching from daily noise to weekly
# summaries is a one-line conf change, not a cron edit.
#
# Read-Only, No Side Effects
# Writes nothing, changes nothing, triggers nothing. Safe to run at any time
# for a health snapshot without affecting any running service or state file.
#
# ==============================================================================================
# OPERATIONAL MODEL
# ==============================================================================================
#
+19
View File
@@ -15,6 +15,25 @@
# comparison. In --dry-run mode, console only — nothing written to the log.
#
# ==============================================================================================
# DESIGN PRINCIPLES
# ==============================================================================================
#
# Informational, Not Interventional
# This script reports — it does not act. system_watchdog.sh handles
# threshold-based intervention. Keeping the roles separate means the report
# is never suppressed by the same logic that triggers remediation.
#
# Week-Over-Week Comparison
# Output is written to ZFS_REPORT_LOG so the same snapshot can be reviewed
# across weeks. Memory pressure and ARC creep are slow — a single run is
# rarely conclusive; the trend across weeks is what matters.
#
# Section Independence
# Each of the five report sections guards its own data source. ZFS not
# available, Docker not responding — those sections skip, the rest still run.
# A partial report is more useful than no report.
#
# ==============================================================================================
# OPERATIONAL MODEL
# ==============================================================================================
#