mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 23:08:38 +01:00
apps.conf carries plan/price columns that were added before the numbers existed, on the explicit reasoning that "the gaps are the point — right now 'what am I owed this month' and 'what am I maintaining for free' are unanswerable, which is why these columns exist before the numbers do". That reasoning was right and nothing acted on it. All 15 rows still read plan=- price=-, including four LIVE client engagements: kivvi (RevampIT), aoz-wohnen (AOZ), vitareba (clinic) and sink (S-Ink). The columns made the gap recordable; they did not make it visible, nothing ever read them, and months of '-' looked exactly like having no clients. This is the reader. check-client-ledger.sh — counts LIVE client-app/client-site rows whose plan or price is '-'. Ratcheted at 4: may fall, never rise. Deliberately narrow — a product owes nobody an invoice, and a prospect with no price is honest, so both are excluded and the near-misses are printed rather than silently dropped. new-site.sh — the same rule, enforced earlier: --status live on client work now requires --plan/--price and refuses at argument validation, before the repo, the box and the deploy exist. CI would reject the row anyway, but by then the site is created, pushed and serving. Not wired into the daily fleet-register-check on purpose: a recurring message about a number that does not change is how alerts get muted. It fires at the one moment the answer is cheap — the PR that puts a client app live. Proved by mutation, both directions, on copies (12 cases): a regression goes red, an improvement goes green and prints how to bank it, products are never counted, and a register with nothing to announce still reaches its verdict. The last one exists because the two trailing announcements are `[ -n "$x" ] && echo`, a shape that can end a `set -e` script early on exactly the register that has nothing wrong with it. Also fixes scripts/hetzner/verify.sh, which read 6 variables from a 12-field line, so $db silently carried "-|S-Ink|client-site|live|-|-|-" on every row — harmless only while that loop ignores $db, and the same trap app_lookup() in lib.sh already documents having been bitten by. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>