CluPilotCloud/tests/Feature
nexxo 5ae2dc41fc Ein Waechter, der aufraeumt — und die vier offenen Punkte aus dem Betrieb
DER WAECHTER. Ein abgebrochenes Update liess den Stapel halb unten liegen, den
Tunnel weg und die Seite eine Stunde lang mit 500 antworten — bis jemand von
Hand nachsah. Das wartet nie wieder auf einen Menschen.

deploy/watchdog.sh laeuft jede Minute als systemd-Dienst AUF DEM WIRT, nicht in
einem Container: ein Waechter im Container braeuchte den Docker-Socket
hineingereicht (Root auf dem Wirt fuer jeden, der je hineinkommt) und waere
genau dann tot, wenn man ihn braucht. Er nimmt dieselbe Sperre wie der
Update-Agent und fasst waehrend eines Updates nichts an.

Er kennt vier Fehlerbilder, alle vier heute wirklich passiert, und fuer jedes
genau einen Griff: fehlende Dienste starten; Container, die einander nicht mehr
finden, NEU ERZEUGEN (ein Neustart hilft da nicht); wg0 hochziehen; einen seit
ueber einer halben Stunde haengenden Wartungsmodus beenden. Was er nicht kennt,
protokolliert er und laesst es in Ruhe. `maintenance-hold` ist die Handbremse.
Beides nachgemessen: Dienst gestoppt -> wieder da; wg0 abgeraeumt -> wieder oben.

DREI LUECKEN, DIE DERSELBE VORFALL AUFGEDECKT HAT:

1. `phase()` machte `mkdir -p` ohne Fangnetz. Gehoerte storage/ nach einem
   frueheren Fehltritt root, starb das Update mit `set -e` an seiner ERSTEN
   Zeile, ohne eine einzige Ausgabe. Von aussen sah das aus wie
   "haengengeblieben"; in Wahrheit war es nach einer Millisekunde vorbei.
2. Ein zweiter Aufruf meldete "Already up to date" und tat NICHTS — der Checkout
   stand ja schon auf dem Ziel. Der Commit ist die falsche Frage; jetzt wird der
   Zustand gefragt: laeuft jeder Dienst, ist der Wartungsmodus aus.
3. Nach einer Netz-Umstellung reicht `up -d` nicht: nur neu gestartete Container
   haengen weiter am alten Netz, alle laufen, und trotzdem loest kein Name mehr
   auf. Jetzt `--force-recreate`.

DIE VIER PUNKTE AUS DEM BETRIEB:

- Provisioning zeigte 15/16 in der Liste und "16 von 16" in der Karte daneben,
  bei Status "Fertig" und 100 %. Die Liste rechnete `current_step + 1` — "dieser
  Schritt laeuft gerade" —, und bei einem fertigen Lauf laeuft keiner mehr.
- Mahngebuehren standen in CENT im Feld. Wer eine Gebuehr eintraegt, denkt in
  Euro und tippt "5"; daraus wurden fuenf Cent, ohne Widerspruch. Jetzt Euro im
  Feld, Cent in der Datenbank, gerundet statt abgeschnitten ((int)(19.99*100)
  ist 1998). Und Fristen und Geld stehen in zwei eigenen Bloecken mit eigener
  Ueberschrift, die Einheit im Feld statt in der Beschriftung.
- Die Bueroadresse stand in der Konsole neben dem Management-Netz mit dem
  Vermerk "nicht entfernbar" — sie kommt aber aus TRUSTED_RANGES in der .env und
  ist sehr wohl aenderbar. Beim naechsten Umzug des Anschlusses waere das ein
  Aussperren gewesen. Strukturell sind nur zwei Eintraege; alles andere steht
  jetzt als das da, was es ist, mit dem Weg heraus.
- Ein Host-Zugang hiess weiter "pve-fns-1", waehrend der Host laengst "fsn-01"
  hiess. Die Zeile zeigt jetzt den Namen des Hosts, nicht den einmal
  gespeicherten — damit traegt sie jede kuenftige Umbenennung von selbst.

Und die Frage "wofuer brauche ich Uptime Kuma": es ist benutzt — RegisterMonitoring
legt fuer jede Kunden-Instanz eine Ueberwachung an, SyncMonitoringStatus holt den
Stand, und ein Ausfall steht auf der Uebersicht. Ohne Kunden-Instanzen gibt es
nichts zu sehen, was wie "unbenutzt" aussieht. Das steht jetzt in den
Einstellungen, statt dort nur "API-Token und wo die Bruecke erreichbar ist".

2522 Tests gruen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 09:43:33 +02:00
..
Admin Ein Waechter, der aufraeumt — und die vier offenen Punkte aus dem Betrieb 2026-08-03 09:43:33 +02:00
Auth Accept terms instead of a start date, and fix the sender no server accepts 2026-07-30 15:22:35 +02:00
Billing Ein Waechter, der aufraeumt — und die vier offenen Punkte aus dem Betrieb 2026-08-03 09:43:33 +02:00
Console Restart a machine, enforce the quota that was sold, end a route that ended 2026-07-29 18:28:28 +02:00
Host Hostnamen vergibt CluPilot: ein Name statt zweier, und der Zaehler ueberlebt das Loeschen 2026-08-01 13:45:43 +02:00
Mail Bereitschaft: das Absender-Postfach wird gefragt, ob es senden KANN 2026-07-31 20:35:58 +02:00
Portal Portal: Karte tauschen, offene Rechnungen begleichen, Hinweis bei Faelligkeit 2026-07-31 21:12:31 +02:00
Provisioning Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
Readiness Interne Pakete gehören nicht nach Stripe 2026-08-01 18:31:37 +02:00
BillingTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
BladeCommentsTest.php Sell the year as well as the month, and say what it saves 2026-07-30 15:44:35 +02:00
CartTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
ChartLiveUpdateTest.php Release v1.3.91 — die Host-Seite zeigt Last statt Ausstattung 2026-08-01 10:24:21 +02:00
CheckoutPageTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
CheckoutWithoutStripeKeyTest.php Pin the one question that must never throw 2026-07-30 16:58:22 +02:00
ComponentTest.php feat(portal): Fortify auth + Login/2FA/Dashboard + component kit 2026-07-25 01:20:25 +02:00
ConfirmInModalTest.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
ConnectionStateTest.php Recover silently from an expired session, and show a connection banner when offline 2026-07-28 21:36:21 +02:00
ContactRequestTest.php Anfrage zuerst in den Posteingang, dann erst die Mail: ein gescheiterter Versand darf sie nicht verschlucken 2026-08-01 23:50:35 +02:00
CustomDomainServingTest.php Fix nine defects in the provisioning pipelines 2026-07-30 01:34:55 +02:00
CustomDomainTest.php Close the domain page to packages that may not have one 2026-07-29 16:20:21 +02:00
CustomerTwoFactorTest.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
DashboardTest.php Stop mailing the initial admin password, hold it in the panel until noted 2026-07-28 23:19:20 +02:00
DeliveryPromiseTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
DeploymentRunsAsTheAppUserTest.php Ein Waechter, der aufraeumt — und die vier offenen Punkte aus dem Betrieb 2026-08-03 09:43:33 +02:00
DisplayTimezoneTest.php Show times on the operator's clock, keep storing them in UTC 2026-07-27 17:32:21 +02:00
DoubleOptInTest.php Require a confirmed address before an account can use anything 2026-07-28 23:43:20 +02:00
DowngradeTest.php Refuse the sale instead of reaching Stripe without a key 2026-07-30 11:58:01 +02:00
EditInModalTest.php R20: Begruendung im Modal, und der Waechter sieht jetzt auch Listenzeilen 2026-07-31 22:09:05 +02:00
EnsureCustomerActiveTest.php Satisfy Pint on the two new guard-boundary tests 2026-07-28 15:10:58 +02:00
ErrorPagesTest.php Ask the tunnel gateway where it actually listens 2026-07-27 14:43:23 +02:00
ExampleTest.php chore: bootstrap CluPilot control-plane (Laravel 13, Docker stack) 2026-07-25 00:21:30 +02:00
GrossPricingTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
HostStepTest.php Let an update install host packages, without handing out root 2026-07-29 10:27:56 +02:00
IconLayoutTest.php Ask the tunnel gateway where it actually listens 2026-07-27 14:43:23 +02:00
IdentitySeparationTest.php Write down that the console and the portal share no identity 2026-07-28 12:15:13 +02:00
ImpersonationTest.php Refuse a portal login for an address that already belongs to an operator 2026-07-28 14:42:16 +02:00
InstanceMetricsTest.php Measure what the template draws 2026-07-27 16:29:28 +02:00
LandingPriceSheetTest.php Schalter je Paket, ehrliche Statusanzeige, Reste der alten Leiter 2026-08-01 17:53:06 +02:00
MailSenderOwnershipTest.php Accept terms instead of a start date, and fix the sender no server accepts 2026-07-30 15:22:35 +02:00
MailTemplatesTest.php Actually issue the invoice when the money arrives 2026-07-29 03:25:56 +02:00
ModalHeightTest.php R24: a modal is never taller than the screen 2026-07-29 23:33:57 +02:00
MonitoringStatusSyncTest.php Move the console off /admin, give the status page its own address, and measure monitoring 2026-07-27 06:05:40 +02:00
NewDeviceWarningTest.php Recognise the devices an account signs in from, and warn about a new one 2026-07-28 23:28:34 +02:00
OfficialDomainsTest.php Re-apply what the last release commit silently reverted 2026-07-29 17:36:43 +02:00
OperatingModeTest.php Give the installation a test mode and a live mode 2026-07-30 10:41:23 +02:00
PasswordPolicyTest.php Passwortrichtlinie einstellbar, doppelte Anmelde-Mail behoben 2026-07-31 20:53:19 +02:00
PortalHostTest.php Answer on every name for the website, and send them all to one 2026-07-29 01:29:33 +02:00
PortalTabsTest.php Re-apply what the last release commit silently reverted 2026-07-29 17:36:43 +02:00
ProcessingAgreementTest.php Stop asking for a signature the law does not want, and lay out the tab 2026-07-30 17:30:55 +02:00
ProgressStepperTest.php Release v1.3.83 — Fortschritt zeigte Übersetzungsschlüssel 2026-08-01 02:08:28 +02:00
PublicSiteGateTest.php Stop a disabled operator from bypassing the hidden-site gate 2026-07-28 14:42:29 +02:00
ReadinessPageTest.php Hetzner-Cloud-DNS, Bereitschaftsseite aus sich heraus behebbar 2026-07-31 19:50:01 +02:00
ReleaseComparisonTest.php Stop the update agent dying on its own tag arithmetic 2026-07-29 00:00:17 +02:00
ReleaseVersionTest.php Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
SeatsTest.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
SecretSlotMigrationTest.php Remember which Stripe account the catalogue was built in 2026-07-30 17:12:56 +02:00
SecretVaultModeTest.php Say which slot the value in force is really coming from 2026-07-30 17:01:33 +02:00
SelfServiceOrderTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
ServerMarketTest.php Take the order, park it, and say when it will be delivered 2026-07-29 18:50:46 +02:00
SessionListTest.php Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
SettingsTest.php Rebuild the settings page out of panels and rows 2026-07-30 17:38:57 +02:00
SignInMailOnceTest.php Passwortrichtlinie einstellbar, doppelte Anmelde-Mail behoben 2026-07-31 20:53:19 +02:00
SiteDesignSystemTest.php Write the processing agreement and its annex, and let it be downloaded 2026-07-30 17:12:30 +02:00
SparkGapTest.php Release v1.3.94 — die Kurven zeigen wieder, wie ausgelastet der Host ist 2026-08-01 11:56:10 +02:00
StatusHistoryTest.php Let an incident be deleted, and start measuring whether the hosts answer 2026-07-29 15:16:48 +02:00
StripeStrictModeTest.php Make source() respect strict entries like get() does 2026-07-30 11:21:07 +02:00
StripeWebhookSecretByModeTest.php Verify webhooks against the secret of the mode we are in 2026-07-30 12:13:55 +02:00
SupportRequestTest.php Editing in modals, an update button that is not gated on a stale reading, and a support page that is real 2026-07-27 17:55:49 +02:00
SwitchOperatingModeTest.php Fix round: name the slot on the card, and cover the modal that already worked 2026-07-30 15:32:16 +02:00
TrafficTest.php Die neue Leiter: Start 39, Team 79, Business 139 2026-08-01 17:05:58 +02:00
TranslationParityTest.php Ask the tunnel gateway where it actually listens 2026-07-27 14:43:23 +02:00
WelcomeTest.php Give customers two-factor, and stop every button on the settings page reacting at once 2026-07-27 08:48:34 +02:00