evig-cron@timecard-reminders.service went red on 2026-09-10 and stayed red.
Nothing was broken.
The box booted at 08:01:48 UTC. `Persistent=true` makes systemd fire every
schedule missed while the box was off the moment it comes back, so the 08:00
run caught up at 08:01:58 — the same second evig-app.service started. Next
bound :4004 at 08:02:00. curl got connection-refused in between, `set -e`
turned curl's exit 7 into run-cron.sh's exit status, and because this is a
*daily* timer the unit then sat `failed` until the next morning: an incident
page for a two-second race, and one day of reminders silently skipped.
`After=evig-app.service` cannot fix this — it orders the timer after the app
unit's *start*, never its readiness. So run-cron.sh now waits for the app it is
supposed to call: retry ONLY curl's exit 7 (10 attempts, 6s apart, bounded well
inside TimeoutStartSec=180), and log each wait so it is not a silent hang. A
real HTTP status still fails on the first response — a broken endpoint stays
exactly as loud as it was.
Two smaller things in the same file: `set -e` would have killed the run before
curl if CRON_SECRET were ever unset (the `[ -n ... ] && hdr=(...)` one-liner is
the script's exit status when the test is false), and a connection failure used
to produce no journal line at all.
The Never-Twice half: scripts/ci/test-run-cron.sh drives the script against a
fake app that binds late, one that answers 500, and one that never comes up,
and asserts the retry is spent on exactly one of them. Wired into `verify` as
`test:ops`, so CI runs it. Verified it fails against the pre-fix script.
Editing this file changes nothing on the box — the deploy only rsyncs the
standalone build — so the README's install block is now flagged as the only
channel that ships it, and it must be re-run.
Claude-Session: https://claude.ai/code/session_014FMEgKPDG3iMFExEvdJzWy
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Completes the deliberate follow-up #434 called out: the box paths were
already fixed to /opt/evig, but the unit *names* — evig-transcription
(installed directly on the box, no repo unit file existed for it),
evig-backup.{service,timer}, and evig-cron@{.service,*.timer} — were
still revampit-*.
Renamed on the box first with a verified cutover (installed new units,
confirmed every timer's next-elapse time was unchanged from the old
schedule, ran a live one-off test of evig-cron@close-decisions.service —
got a real HTTP 200 from the app — then removed the old units). This
commit brings the repo, the source of truth per scripts/ops/README.md,
in line with what's now actually running.
Left alone, deliberately: the R2 bucket name (`revampit-backups`) and its
object-key prefixes (`revampit-db-`, `revampit-uploads-`) — renaming
live storage is a separate, higher-stakes change with no reliability
upside, not folded in here.
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
`revampit-cron@timecard-reminders.service` failed at 08:01 UTC today with
status=203/EXEC: "Unable to locate executable /opt/revampit/ops/run-cron.sh".
#430 renamed the box directory /opt/revampit -> /opt/evig at 07:44 UTC and
deliberately left the revampit-cron@* and revampit-backup units for a separate
pass. But those units name their program as a literal path — systemd cannot
interpolate a variable into ExecStart — so from 07:44 they all pointed at a
directory that no longer exists. timecard-reminders was simply the first timer
to fire afterwards; wake-recurring-tasks had run at 07:01, before the rename,
which is why only one unit looks broken.
It is not one job:
- all five revampit-cron@* timers are dead from their next fire onward
- revampit-backup.service — the ONLY off-box copy of prod Postgres — dies at
03:32 UTC, and a 203/EXEC failure leaves no dump behind to notice
- revampit-transcription.service still has WorkingDirectory=/opt/revampit and
survives only because it has not been restarted since
and fixing the units alone would not have been enough: run-cron.sh itself
defaults APP_ENV to /opt/revampit/app/.env, so it would have read no
CRON_SECRET and every call would have come back 401.
Repoints every /opt path under scripts/ops/ at /opt/evig. Unit *names* stay
revampit-* — renaming a live schedule is still the separate, deliberate step
#430 called it.
Also here, because the same drift hid them:
- revampit-cron@timecard-reminders.timer existed on the box but not in this
repo, which claims to be the source of truth for scripts/ops/. Added,
byte-identical to the installed copy.
- release-escrow is the reverse: in this repo, never enabled on the box, so
/api/cron/release-escrow has never once run on a schedule. Documented as a
money-side go/no-go rather than switched on by an install loop.
The automation that ends the class: scripts/ci/ops-box-paths.sh compares every
/opt/<name> literal under scripts/ops/ against NAME= in the deploy script — the
one place that decides where the app lives — and fails when they disagree. Wired
into verify as `lint:ops`. Verified it fails on the pre-fix tree. The next box
rename now breaks CI instead of breaking the backups at 03:32 UTC.
.prettierignore gains .venv: a local python virtualenv (services/transcription)
made `npm run verify` fail locally on vendored site-packages while CI, which
never has one, stayed green — the precise local/CI split verify exists to
prevent.
Claude-Session: https://claude.ai/code/session_01LmyE2aLaXKB2V7WA3XQprm
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: add a formatter, matching the style this repo already writes
singleQuote=true was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.
Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* style: format with prettier, and close a comment that was never closed
The formatter refused this repo outright, which turned out to be a real defect
rather than a tooling complaint. kivitendo-intake.css opens a header comment,
and line 17 contains an inner /* ⚠ PRÜFEN */ — CSS comments do not nest, so
that inner terminator CLOSES the header. Everything after it is parsed as CSS
until the stray */ on line 20. A browser mis-parses it the same way.
The file exists in two places (public/presentations/ and deliverables/), both
carrying the same defect; fixing one still failed the gate, which is how the
duplicate surfaced at all.
Mechanical otherwise. This SHA is listed in .git-blame-ignore-revs.
* chore: teach git blame to skip the reformat
* fix: undo a 3-way merge duplication in AdminSidebar.tsx
Merging main with -X theirs duplicated a 30-line block: main's currency-sweep
commit and this branch's prettier reformat both touched overlapping lines in
the single-destination-group render path, and the -X theirs strategy inserted
rather than replaced, leaving two near-identical copies and a dangling closing
brace — SyntaxError: ',' expected at line 298.
The branch has no legitimate change to this file's logic, only formatting, so
main's content is correct outright. Took it wholesale rather than hand-editing
the merge result.
* fix(lint): reattach 5 directives the reformat detached
Four eslint-disable-next-line sites for react-hooks/set-state-in-effect and one
@ts-expect-error, all the same defect: the directive sat above useEffect( (or
above a JSX element), while the statement that actually errors is 1-2 lines
further down inside the block. eslint/tsc report at the real statement; the
directive, still bound to its original line number, protects nothing there.
TimecardReviewDrawer.tsx (x2), DataEntryTabs.tsx, AppointmentBookingForm.tsx,
CreatePoolModal.tsx. Same root cause documented for hirnli, fleetcrown and
ivy-portal earlier today — a positional directive is a hidden dependency on
formatting, and this is the fourth distinct shape it's taken.
* fix(i18n): restore a same-line audit-exemption marker
Fifth shape of today's positional-directive defect, this time the repo's own
i18n-hardcoded-audit convention rather than eslint or tsc: a // i18n-ok comment
exempts a hardcoded string only when it trails the SAME line. prettier wrapped
this one if-statement's long condition onto its own line, leaving the marker
on the return statement below — the exact sibling one line down
('fortgeschrittene bis experten') stayed on one line because it was short
enough not to wrap, and it alone kept passing.
Restored the one-line form and added // prettier-ignore so a future reformat
cannot re-split it. Verified against the real audit script locally: 0 new
violations.
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Audit of the Payrexx integration found gaps that would break live payments the
moment real credentials are added. Closes them so go-live is config-only:
G1 (critical) — webhook signature header. The handler read `payrexx-signature`,
but Payrexx signs with `X-Webhook-Signature` (lowercase-hex SHA-256 HMAC of the
raw body, key as UTF-8 — which the code already computes correctly). With the
wrong header every live webhook was rejected (fail-closed) → customers charged
but orders never advance. One-line header fix.
G2 — capture for workshops/appointments. Gateways only RESERVE funds (authorize);
capture was wired only for marketplace. Non-escrow workshop/appointment payments
were authorized but never captured → the hold expires (~7 days) and the money is
never collected. The webhook now captures non-escrow generic payments immediately
on the reserved event (after the state commit, with loud logging on failure so a
user is never locked out of what they paid for). Escrow payments stay held.
G3 — escrow auto-release. The old `scripts/auto-release-escrow.js` was dead
frankenstein code (Stripe + retired Neon DB_* vars) — deleted. Replaced with a
real `GET /api/cron/release-escrow` that captures any escrow still held past its
deadline (Payrexx), + a `revampit-cron@release-escrow.timer` (daily 04:00). Tested.
G4 — partial-config guard. `isPayrexxConfigured()` ignores the webhook secret, so
a config with INSTANCE+SECRET but no WEBHOOK_SECRET silently charges customers
while rejecting every webhook. `createGateway` now logs a loud error in that exact
state (`isPayrexxPartiallyConfigured()`).
Also: `reservation` now sent as the documented `1` (the string "true" is coerced
to 0 by Payrexx's PHP backend → reservation silently disabled); removed dead
`getBaseUrl()`; rewrote docs/operations/PAYREXX_SETUP.md as the precise
plug-and-play go-live checklist.
Verified live behavior unchanged in mock mode; typecheck + lint + umlauts clean;
full suite 530/7688 green.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Companion to purge-demo-content.sql. Records the one-time prod cleanup (already
applied) that truncated E2E org content (blog/jobs/workshops/decisions/protocols/
tasks — all "E2E …" titled) and deleted all ~53 test accounts, keeping only the
two real staff users (georgy.butaev@, shop@), georgy's real membership
application, and the 3 physical locations. Prod is now a clean slate.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The public technician profile showed fabricated data — "George" (a seeded test
account) with 80 reviews / 80 jobs / 5.0★ / verified / professional but ZERO
backing review rows. Root cause: aggregate columns were seeded with fake numbers
and `recomputeTechnicianAggregate` only updated technicians that HAD reviews
(inner join), so a 0-review tech kept stale/seeded values forever.
- recomputeTechnicianAggregate now LEFT JOINs a base row + COALESCE, so a
technician with no published reviews is reset to 0/0.0 — fake aggregates can
no longer survive a recompute.
- Technician profile now shows the real avatar (user_profiles.avatar_url, joined
in getTechnicianById) with the initial-letter fallback. Avatar upload already
works at /dashboard/profile → /api/uploads → Cloudflare R2 (storage was never
missing — it's R2, verified live).
- scripts/ops/purge-demo-content.sql: the one-time prod cleanup (already applied)
that TRUNCATEd the E2E/demo content (159 listings, 150 IT-Hilfe requests, 82
appointments, 75 erfassung items, reviews, conversations) + removed the
fabricated technician profiles, keeping all user accounts and org tables.
The profile's stats render was already guarded (>0), so with truthful data a
no-review technician simply shows no rating/jobs line.
typecheck + lint clean; full suite zero new failures vs baseline.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Retire cloud DB and AUTH_DB_* split in code, env examples, and docs so
local dev uses Docker Postgres and prod ops use the Hetzner tunnel pattern.
Add Playwright user-admin-flows spec with locale-aware auth helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
Retiring Vercel silently killed its 4 cron jobs (close-decisions,
close-it-hilfe-requests, prune-audit-log, wake-recurring-tasks) — nothing was
running them on the box. Re-created them as systemd timers (UTC schedules
matching the old vercel.json) driven by run-cron.sh, which calls the local
/api/cron/* endpoints with Authorization: Bearer $CRON_SECRET and fails non-zero
on any non-200. Also generated + set CRON_SECRET on the box (it was unset, so the
endpoints were publicly triggerable; now they return 401 without the bearer).
All four verified: HTTP 200 end-to-end. Docs in scripts/ops/README.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prod Postgres lives only on the Hetzner box since Neon was retired, so this is
the single copy's safety net. pg_dump (custom format, as the postgres superuser
via peer auth — the app role lacks USAGE on the drizzle schema) + a tar of the
local uploads dir are pushed to the PRIVATE R2 bucket revampit-backups with
30-day retention. Reuses the app's bundled @aws-sdk and the same S3_* creds
already in app/.env (one R2 token covers all buckets) — nothing extra to
configure. systemd timer runs it nightly at 03:30 UTC; verified end-to-end.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>