Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

docs(scripts): PR checklist for shell changes + updater channel decision

Juan Denisfbea0f47375b
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index e800fa5d..f72449d8 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -22,3 +22,22 @@
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
+
+## Shell scripts only (`install.sh`, `uninstall.sh`, `serverkit`, `scripts/**`)
+<!-- These scripts run under `set -Eeuo pipefail` on production boxes, and the
+ updater self-updates from main — a broken merge is live on every install
+ instantly. Skip this section if the PR doesn't touch them. -->
+- [ ] Every new pipeline / command substitution can **benignly fail** (empty dir,
+ missing conf, zero matches, dead service) without aborting the script —
+ observations are guarded; `halt` is reserved for "cannot safely continue"
+- [ ] No `[ … ] && cmd` as a function's **last statement** (returns 1 when the
+ test is false and kills unguarded callers) — use `if`
+- [ ] Bare `x="$(cmd)"` assignments only wrap **infallible** producers; anything
+ that can fail sits inside `if x="$(cmd)"; then`
+- [ ] Functions whose stdout is **captured** send progress output to stderr
+- [ ] "Warn and continue" helpers are errexit-immune **internally**, and
+ teardown/rollback paths never abort over a single failed step
+- [ ] Every new observation/discovery/snapshot/report function is appended to
+ the **fresh-box loop** in its test suite, and I named which degenerate
+ fixture covers the new failure mode
+- [ ] The fix/feature ships with its **proving test in the same commit**
diff --git a/scripts/update.sh b/scripts/update.sh
index 276883fb..fcf9f749 100644
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -193,6 +193,15 @@ report_failure() {
# fixed one. Before doing any work, fetch the newest update.sh for the target
# ref and re-exec into it. From this version on, "just run serverkit update"
# is reliable no matter how old the box is.
+#
+# CHANNEL DECISION (2026-07, scripts-reliability round 2): stable installs keep
+# fetching this file from *main* — no release buffer. The flip side is that any
+# updater bug merged to main is live on every box instantly, so merges touching
+# scripts/** are gated by the real install+update e2e job in scripts-ci.yml
+# (update-e2e). Fetching from the latest release tag was considered and
+# rejected: a broken *released* updater would need a whole new release to fix,
+# while main + a CI gate keeps the one-push-fixes-the-fleet property that
+# resolved the 2026-07-02 incident.
SELF_PATH="${BASH_SOURCE[0]}"
maybe_reexec_latest_updater() {
[ -n "${SERVERKIT_UPDATER_REEXECED:-}" ] && return 0 # already the latest