From 0e67f1711295960a18c81e6802e8fe97c909a87b Mon Sep 17 00:00:00 2001 From: reachableceo Date: Wed, 2 Sep 2026 18:42:46 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20bootstrap=20repo=20=E2=80=94=20enforcem?= =?UTF-8?q?ent=20layer=20+=20#685=20perf=20capture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enforcement (check-rules/hooks/shellcheck) per ADOPTING pattern; perf/ SoR from the #685 session (memcensus, pg role-caps SQL, applied sysctl, planned daemon.json); questions-v1 (API token + dockerd window asks). Meat + verification: https://projects.knownelement.com/issues/727#note-3913 --- .env.example | 7 + .gitignore | 3 + AGENTS.md | 50 +++++ LICENSE | 235 ++++++++++++++++++++++++ README.md | 40 +++- STATUS.md | 21 +++ ansible/.gitkeep | 0 perf/docker-daemon.json.planned | 8 + perf/memcensus.sh | 30 +++ perf/pg-role-caps.sql | 22 +++ perf/sysctl/99-cloudron-tuning.conf | 5 + questions-v1.md | 28 +++ scripts/check-rules.sh | 274 ++++++++++++++++++++++++++++ scripts/lib/common.sh | 137 ++++++++++++++ scripts/pre-commit | 25 +++ scripts/pre-push | 25 +++ scripts/setup-hooks.sh | 44 +++++ tests/shellcheck.sh | 97 ++++++++++ 18 files changed, 1049 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 LICENSE create mode 100644 STATUS.md create mode 100644 ansible/.gitkeep create mode 100644 perf/docker-daemon.json.planned create mode 100755 perf/memcensus.sh create mode 100644 perf/pg-role-caps.sql create mode 100644 perf/sysctl/99-cloudron-tuning.conf create mode 100644 questions-v1.md create mode 100755 scripts/check-rules.sh create mode 100644 scripts/lib/common.sh create mode 100755 scripts/pre-commit create mode 100755 scripts/pre-push create mode 100755 scripts/setup-hooks.sh create mode 100755 tests/shellcheck.sh diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9434215 --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# KNEL/cloudron — credential REFS only. +# Material secrets live in ~/.creds (0600). NEVER commit real values here. +# +# Pending founder ask (#685/#727): Cloudron API token. +# When issued, store the material value in ~/.creds/cloudron.env as: +# CLOUDRON_API_TOKEN= +CLOUDRON_API_TOKEN= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf38fee --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.crush/ +*.log +.tmp/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..96db1f6 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,50 @@ +# AGENTS.md — KNEL/cloudron (tsys-cloudron / my.knownelement.com) + +Fleet-machine repo for the production Cloudron host. Layering: global +`~/.zcode/AGENTS.md` < `KNEL/PFVCluster/AGENTS.md` < this file. The global +rules (ticket-governed work, push-as-you-go, Discourse as doc SoR, secrets in +`~/.creds` only) all apply; this file adds host specifics only. + +## Agent authority (non-negotiable) + +- No work without an approved Redmine ticket (project 88, Cloudron). + Ticket-first: `echo '#NNN' > .crush/active-ticket`. +- Propose, never implement — findings become Feedback sub-tickets. +- NEVER close a ticket; NEVER 100% done-ratio — founder UAT gates "done". +- Production mutations only when the ticket says so; rollback documented + in the ticket BEFORE the change (see #685 notes for the pattern). + +## Access (SSH-only, NON-NEGOTIABLE) + +- SSH `root@my.knownelement.com` is the ONLY access path. No panel + back-channels, no guest-agent (qemu guest exec is banned fleet-wide). +- ALL ssh/scp routes through the chokepoint (from a PFVCluster checkout): + + ```bash + VM_IP=my.knownelement.com VM_USER=root bash tests/remote.sh vm '' # quick reads, timeout 30 + VM_IP=my.knownelement.com VM_USER=root bash tests/remote.sh vm-file