mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-03 20:07:01 +01:00
admin-access-gmail
247
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
892b870d66 |
Let the owner Gmail addresses administer evig
Admin is no longer a Revamp mailbox. butaeff@gmail.com and butai@gmail.com join the lockout floor; the current Revamp login stays so that account is not locked out. A verified floor address can open /admin even before the staff flag is set. Einstellungen can change the login address (code sent to the new inbox, and a bootstrap owner keeps admin on the new address) and the password. Anyone signed in can ask for admin. An existing admin confirms full admin or everyday staff from the same screen. |
||
|
|
6c94ad5f25 |
Stop briefing agents with retired Revamp-IT facts. (#560)
Staff is the is_staff column, and production is one app on Hetzner. The agent brief, the auth doc, and the generated API page still said otherwise, so the next session kept reopening closed work. lint:claims fails the build if those sentences come back. |
||
|
|
8739ae753c |
feat(records): the changelog catches up, and the roadmap says when each step shipped (#548)
CHANGELOG.md and src/config/changelog.ts stopped at 0.1.4 (2026-06-16)
while four months shipped. Five releases written from the merged PRs, in
both shapes (de + en for the site): 0.1.5 QC gate and open CO2 data, 0.2.0
Revamp-IT becomes evig, 0.3.0 divisions/pillars and what did not work,
0.4.0 security, mail and the public roadmap, 0.5.0 Sign in with OrangeCat;
0.5.1 is this change.
- bip-kit ^0.3.1 -> ^0.6.0 (additive): /roadmap links each finished step
to the changelog day that delivered it ({#id} on the ROADMAP.md step and
the CHANGELOG.md line); /changelog carries a change-<date> anchor on the
first release of each day; tokens never reach the page.
- changelog-record.test.ts: both shapes list the same releases and dates,
no token in rendered copy, every cited id declared, every ticked id
delivered.
- i18n-hardcoded audit: config/changelog.ts is excluded — it stores
release notes as translated { de, en } pairs, not hardcoded strings.
Claude-Session: https://claude.ai/code/session_01MFTqYKVJNY7ddWNQqsc7yM
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
1c2131e914 |
fix(copy): stop claiming a workshop, partners, receipts and evig.ch evig does not have (#531)
* fix(copy): stop claiming a workshop, partners and receipts evig does not have evig is online-first and in Gründung (org.ts BASE_REGION: no public store), but several public pages still carried Revamp-IT's facts: - get-involved: drop the "Partnerorganisationen" list (Uster, Rüti, HEKS, AOZ) - Revamp-IT's partners, never evig's. - reparaturbonus: drop the "Werkstatt und Verkaufsstelle" card, "seit über zwei Jahrzehnten", "repariert seit 2026 mitten in Zürich" and "bring dein Gerät direkt zu evig"; repairs are found through IT-Hilfe technicians. - faq: drop "Kann ich ohne Termin vorbeikommen? Gerne." and fix the mojibake closing quote in "Right to Repair" (de). - donate: drop "Spendenquittung auf Anfrage" (no receipts until the Verein is recognised) and the uncited 285 kg CO2 figure (co2-impact.ts gives a laptop 150 kg). - about: drop "Werkstatt, Repair-Café" from the repair line. - home/transparenz: drop "kostenlos"/"ohne Gebühren" and "freiwillige Techniker" (technicians can be paid); fix "Als in Gründung" grammar. - changelog: evig.ch is not registered - drop it; `npm run d` -> `pnpm run d`. All eight locales changed together; ru home "Nutzen" card had a wrong string. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(copy): README states TypeScript 6 and no stale table count The badge said TypeScript 5 (package.json pins ^6.0.3) and "~130 table name constants" when TABLE_NAMES has 121; say what it does instead of a count that drifts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): inquiry confirmation links the site by its real host, not evig.ch The auto-reply to a contact inquiry said "mehr über uns erfahren auf evig.ch" (ORG.emailDomain) while linking ORG.website. evig.ch is not registered (org.ts: no MX, no A record), so the visible text named a domain that does not resolve. Show the host of ORG.website instead (evig.orangecat.ch). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): finish the workshop cut, stop implying a technician network Round 2 after independent review of PR #531. - Workshop/on-site claims left one key away from round 1: donate hero, wishlist, drop-off intro, device path, FAQ, technical-experts benefits (workshop access + "diverse expert team"), founding story, dashboard appointments card. - /api/technicians total = 1: copy describes request -> offer instead of "technicians near you" / "Techniker-Netzwerk" (reparaturbonus, about, home, IT-Hilfe hub + meta, divisions, transparenz, nav, techniker meta). - /api/workshops = []: drop "vor Ort in Zürich" courses and the donate tier's "place in our Linux workshop". - transparenz.mission.body: non-de locales no longer interpolate the German ORG.legalForm; dead keys mission.text + geschichteSection.milestoneDesc deleted; Hirn prompts say "Verein in Gründung". - Admin impact page + metric formula: 285 kg/device replaced by the per-category factors read from config/co2-impact.ts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): ru transparenz no longer claims no fees, like the other locales Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cqEJ2nWRCs2CA6GP6BmoZ --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
d09c4d621d |
fix(sh): grep -q reads a here-string, not a pipe — no SIGPIPE false negatives under pipefail (#509)
* fix(sh): grep -q reads a here-string, not a pipe — no SIGPIPE false negatives under pipefail Under pipefail, `producer | grep -q PAT` can report a miss for text that is there: grep -q exits on its first match, the producer dies of SIGPIPE, and pipefail returns 141. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(sh): grep -q reads a here-string, not a pipe — no SIGPIPE false negatives under pipefail Under pipefail, `producer | grep -q PAT` can report a miss for text that is there: grep -q exits on its first match, the producer dies of SIGPIPE, and pipefail returns 141. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
bbd25803b6 |
feat(auth): "Sign in with OrangeCat" beside the password login; connect from the profile (#523)
* feat(auth): "Sign in with OrangeCat" beside the password login; connect from the profile
Step D8 of orangecat ADR-0009 ("One account for every door"). evig keeps its
own accounts — staff grants, orders and memberships live here — and lets an
account BE an OrangeCat account by carrying the actor id.
- /auth/login: "Mit OrangeCat anmelden" beside the password form, shown only
when Auth.js actually mounted the provider (the form asks /api/auth/providers),
so the button can never be a dead end.
- users.orangecat_actor_id (migration 141, unique): the ONLY cross-product
key. Never email — OrangeCat's password sign-up does not verify the address,
so an email match would let anyone who registers the victim's address there
walk in here. src/lib/auth/orangecat.ts holds the rules, pure and tested:
a linked actor signs in; a new person gets an account (email unverified,
like a fresh password registration); an existing unlinked account with that
email is refused with a message that names the way forward.
- That way forward: "OrangeCat verbinden" on the profile. POST /api/user/orangecat
mints a signed ten-minute cookie for the signed-in user; the sign-in callback
reads it and attaches the OrangeCat identity to THAT account and no other.
- Staff is untouched: is_staff stays the sole grant, whatever the sign-in.
Provider config mirrors Solon/Heidi/Loki (client_secret_post, PKCE + state,
openid profile email). Env pair documented in .env.example; the client is
registered on the OrangeCat box with scripts/oauth/register-client.ts.
Verified: the pure module typechecks and its 10 tests pass; prettier and
lint:umlauts clean. A full tsc/lint run was not possible in the sandbox (the
ai-forms GitHub tarball is blocked there); CI is the gate.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3
* fix(auth): typecheck and docs-path check for the OrangeCat sign-in
- OrangeCatSection: apiFetch may resolve undefined; fall back to the
hidden state instead of passing undefined to setState (CI tsc).
- CLAUDE.md: name orangecat's ADR-0009 without a path the docs-paths
checker reads as local.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3
* fix(auth): OrangeCat section reads the apiFetch envelope; strings in every locale
- apiFetch resolves { success, data?, error? }; the section typed the payload
as the envelope (CI tsc). Read data on success, treat a refused link intent
as an error instead of starting the round-trip anyway.
- The nine new strings translated into fr, it, es, ru, ja, ko so the i18n
audit's baseline stays where it is.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
34ec6f6d20 |
fix(ai): stop the close-decisions cron from spending the free AI (#508)
The nightly close-decisions timer closed expired votes through transitionDecision(), which fired generateOutcomeNarrative() in the background: one free-tier model call (evig's Groq key, then the OpenRouter key shared by eleven apps) per closed decision, with nobody asking. A manual close did the same as an unrequested side effect. Closing no longer calls a model. The Beschluss narrative is now written only when staff click "Beschlusstext mit KI erstellen" on a closed decision: POST /api/decisions/[id]/narrative, rate-limited to 10/h per staff member, living in a module the decisions barrel does not export. Regression test src/lib/ai/__tests__/no-background-ai.test.ts walks the import graph transitively from every cron route, webhook route, boot module and page/layout and fails if any can reach a model module. Mutation-proven: re-adding the decisions-narrative import to decisions-transitions.ts failed 3 of its 6 tests (cron, render, and the narrative assertion); reverting made them pass. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
65ed27a08c |
fix(e2e): stop shipping the two E2E login addresses as defaults (#491)
The E2E personas are real accounts on a real deployment, and every place that needed one carried it as a literal in a public repo: a fallback in scripts/e2e-inventory-prod.sh, four `|| '...'` defaults across the e2e specs and their auth helper, a workflow header comment, and two docs tables. The repo therefore published whose accounts they are — and the defaults were dead weight besides: CI has supplied both addresses from the repository secrets of the same name since they were created, so the literals were an unreachable branch that only ever leaked. Now there is no default anywhere. The addresses come from AUTH_TEST_USER_EMAIL and AUTH_TEST_ADMIN_EMAIL, both existing repo secrets, and the absence of one is an error rather than a quiet substitution: - scripts/e2e-inventory-prod.sh requires both with `:?` naming the secret. The "no passwords configured, skip" path still runs first, so an unconfigured checkout is unaffected. - The two consuming jobs guard first and fail with `::error::` naming the missing secret, instead of dying inside bash or playwright. - The specs skip a persona when its address is unset, the same way they already skip on a missing password, rather than attempting a login with an empty e-mail and reporting it as a broken page. Unchanged: the e2e-local job, which sets all four addresses to its own seeded @evig.test fixtures at job level, so the defaults were never reached there either. Not addressed here, and still in the tree: the owner's address in the SUPER_ADMIN_EMAILS allowlist (plus its assertions and the applied SQL migrations that reference it), and the public contact address in src/config/org.ts, which is published on purpose. Those are identity and data, not E2E credentials, and removing them is a separate decision. Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f71ad23316 |
chore(config): stop duplicating the box IP, the old repo path, and the retired host (#489)
Five literals that each duplicated a fact owned somewhere else, or named
something that no longer exists.
1. packages/saldo/package.json — `homepage` pointed at
`revampit.orangecat.ch/saldo`. That host is retired: the organisation renamed
to evig, the canonical host is `evig.orangecat.ch`, and this repo's own
`src/config/urls.ts` and `.env.selfhost.local.example` already say so. A
published package's homepage is the one copy that would outlive the Caddy
redirect keeping the old name alive.
2. scripts/setup-deploy-keybind.sh — the generated trigger script baked
`PROJECT_DIR="/home/g/dev/revampit"`, wrong twice over: it names one
developer's laptop, and it names the repo by a directory it no longer uses.
The checkout knows where it is, so ask it: PROJECT_DIR is now derived from
the setup script's own resolved location (`scripts/` -> repo root), which is
the same root the rest of the file already assumes. The heredoc had to become
interpolating for that, so the generated script's own `$PROJECT_DIR`
references are escaped to stay literal. Verified by running it: the generated
file lands on the parent of `scripts/`, and `bash -n` passes on both.
3+4. The Hetzner box IP was written out twice — `ssh-keyscan -H 167.233.22.31`
in .github/workflows/deploy-selfhost.yml and
`BOX="${BOX:-ubuntu@167.233.22.31}"` in scripts/selfhost-deploy-evig.sh — for
one fact that already has an org-wide definition: the `HETZNER_IP` Actions
variable (visibility: all). Both now read it, the workflow passing it to the
script through the job env.
Each end fails LOUDLY rather than proceeding on an empty value.
`ssh-keyscan -H ""` writes nothing and exits 0, so an unset variable would
have produced a deploy that died much later with an unhelpful host-key error;
the step now emits `::error::` and stops. The script uses `${HETZNER_IP:?…}`
so it refuses to guess a target. Setting BOX explicitly still overrides both,
for a one-off host. Proved by mutation: unset -> exit 1 with the message;
set -> ubuntu@<ip>; BOX set with HETZNER_IP unset -> BOX wins.
5. src/config/e2e-test-accounts.ts held two real personal addresses as a shipped
`as const` array. That published who they were in a public repo and made
changing them a release. The list is configuration: it now comes from
`E2E_TEST_ACCOUNT_EMAILS` (comma-separated) and defaults to EMPTY.
Empty is the safe direction and the reason this is not a behaviour risk: the
list only ever RELAXES a rate limit, so an unset variable means nobody is
exempt — the strict path every other account already takes. The opposite
default would trust an address nobody configured on every deployment of this
code. It is read at call time, not module load, so the value cannot be
snapshotted before the environment is populated. This follows the direction
scripts/e2e-inventory-prod.sh already took when it dropped its own hardcoded
account default.
OPERATIONAL NOTE: until `E2E_TEST_ACCOUNT_EMAILS` is added to `SELFHOST_ENV`,
the prod dual-persona smoke runs under normal rate limits. Documented in
.env.example and .env.selfhost.local.example.
The test asserted the hardcoded list's length, which is no longer a property
of the source. It now sets the variable itself with fictional fixture
addresses — a test naming a real person's mailbox is the same leak the source
just stopped committing — and adds the two cases that matter most: unset and
empty must both exempt nobody.
Deliberately NOT touched: src/config/org.ts DEFAULT_CONTACT_EMAIL. The comment
above it records that the gmail address is a live decision because evig.ch is
not registered and the previous address bounced.
Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
e2c67d8aa5 |
chore(cleanup): dedupe migrations, blog scripts, i18n baseline; rate limiting over limitkit; no-console (#488)
* chore(db): empty the two byte-identical duplicate migrations instead of skipping one 004_ai_inventory_system.sql and 005_messaging_system.sql were 402- and 295-line copies of 004b and 005c (the originals were renamed with a suffix in |
||
|
|
43eeb203fc |
chore: rename FleetCrown to Loki (#476)
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch, LOKI_* env keys, loki-* units. This repo referenced the old name in 21 files changed, 30 insertions(+), 30 deletions(-). Email addresses at the old sending domain stay until the new domain is verified in Resend. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
3c1cf2db79 |
fix(cron): a reboot raced the app, and a daily timer stayed failed for 24h (#471)
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> |
||
|
|
f091488f98 |
refactor(blog): typed blocks render the article — react-markdown rendered DB content with no sanitizer (#466)
* refactor(blog): typed blocks render the article — react-markdown rendered DB content with no sanitizer
The blog body went through react-markdown + remark-gfm with a hand-written
component map. That map was fine for the git-authored posts it was written
for, but the same component renders DB posts — including bodies that arrive
through the public submission flow — and no sanitizer sat anywhere on that
path. bip-kit's parser removes the surface rather than filtering it: markdown
becomes a discriminated union of typed blocks, and the reference renderer
emits React elements from typed data, so there is no HTML passthrough for
submitted content to hide in.
One module owns the pipeline for both content sources
(src/lib/longform/): parse.ts normalizes author-flavored markdown into
bip-kit's vocabulary (`*`/`+` bullets, indented items, a stray body `# h1`)
and re-slugs headings with evig's unicode-friendly slugger, because bip-kit's
is ASCII-only and would have renamed every published anchor in the de/ja/ko/ru
translations. LongformBody.tsx is the renderer; longform.css maps evig's
tokens onto bip-kit's --bp-* contract for both themes and keeps the 19px/1.75
editorial measure.
Heading extraction leaves blog-toc.ts: the TOC now derives from the same
typed blocks the article renders, so the rail and the anchors cannot drift.
evig's own sticky TOC shell stays — bip-kit's Toc has no i18n label and no
scroll-spy aria-current — fed by the extracted entries.
Capabilities that came with the swap: heading anchors, shiki highlighting,
callouts, figures with the Lightbox island, ReadingProgress, and mermaid.
The `setHighlighterLoader(() => import('shiki'))` one-liner lives in our code
on purpose: bip-kit's zero-config load goes through a bundler-hidden dynamic
import the Next tracer cannot see, and a standalone build would ship without
shiki while dev looked fine. The deploy script restores the top-level
node_modules/shiki symlink output-tracing drops — the same hole FleetCrown
and OrangeCat both fell into.
Verified by a word-level diff of old vs new rendered output across all 100
file posts (every locale) and every DB post: 113 of 113 identical.
react-markdown and remark-gfm stay in package.json — the deliverables chat
and the career detail page still use them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
* fix(blog): bip-kit 0.2.3 — Tailwind's reset ate the list bullets
`bip-kit/styles.css` colored `::marker` but never declared `list-style-type`,
so under a reset that zeroes `ul, ol { list-style: none }` — which Tailwind's
preflight does — every bulleted and numbered list in an article rendered with
no marker at all. Invisible in the word-level parity diff, because a missing
bullet removes no words. 0.2.3 declares the type explicitly (disc/decimal,
with circle/square and lower-alpha at depth).
Parity re-run at 0.2.3: still 113 of 113 posts identical.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
d2662cfe22 |
chore(pnpm): convert to pnpm 11 (#446)
* chore: pnpm — the fleet has one package manager - packageManager pnpm@11.25.0; lockfile via pnpm import, package-lock.json gone - npm overrides moved to pnpm-workspace.yaml overrides (pnpm ignores package.json overrides); allowBuilds for @parcel/watcher, @sentry/cli, @swc/core, esbuild, puppeteer, unrs-resolver, and the ai-forms git dep (pnpm requires the exact resolved URL for git-dep prepare builds) - @tiptap/core added as a direct dependency: RichTextEditor.tsx augments 'module @tiptap/core' and tiptap-markdown's Storage augmentation rides on it — a phantom dependency npm's hoisting hid and pnpm's isolation exposed - all workflows: pnpm/action-setup@v6 before setup-node, cache: pnpm, store-dir pinned, pnpm install --frozen-lockfile; Next cache key now hashes pnpm-lock.yaml - scripts/ci/dependency-audit.sh: pnpm audit --prod (parses both npm-v2 'vulnerabilities' and pnpm's v1 'advisories' shapes) - selfhost-deploy-evig.sh, ship.sh, start-all.sh, e2e-inventory-prod.sh, husky pre-commit, Dockerfile.prod (node 24 + corepack) converted - engines: node >=22.13 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn * fix(deps): declare espree — eslint.config.mjs imports it directly npm's hoisting provided it as a phantom; pnpm's isolated node_modules exposed ERR_MODULE_NOT_FOUND in CI. Verified in a true clean room (parent node_modules masked): full verify green, 7783 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn * fix(deps): declare tsx — npx fetched it on demand, pnpm exec does not e2e:seed (and the hirn:*/setup-admins scripts) ran 'npx tsx', which silently downloaded tsx because it was never in devDependencies. pnpm exec only resolves installed bins, so CI's Seed E2E step died with 'Command tsx not found'. Declare it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn * fix(ci): drop '--' separators — pnpm run forwards them verbatim npm strips the first '--' before handing args to the script; pnpm 11 passes it through, so 'pnpm run start -- -p 3001' executed 'next start -- -p 3001' and next read '-p' as a project directory. pnpm forwards everything after the script name anyway, so the separator is dead weight: remove it in ci.yml (start, e2e journeys, e2e guards) and ship.sh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn --------- Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
1b69f7746e |
fix(ops): rename revampit-* systemd units to evig-* (#435)
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> |
||
|
|
b9248b21e1 |
fix(ops): the systemd units follow the box to /opt/evig (#432)
`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> |
||
|
|
ba754f6508 |
chore(deploy): rename revampit infra references to evig (#430)
* chore(deploy): rename revampit infra references to evig The GitHub repo was renamed revamp-it -> evig a while back and the domain/Caddy layer already points at evig.orangecat.ch (with a 308 from the old revampit.orangecat.ch), but the self-host deploy pipeline was still targeting /opt/revampit and the revampit-app systemd unit. Renamed the deploy script, CI's throwaway fixture names, and the smoke-test default URLs to match. The systemd unit + /opt directory on the box were renamed to evig-app / /opt/evig directly, verified live (200 before and after). Left untouched: production database names/users (revampit_cms etc. in rollback-production.sh, monitoring-setup.sh, check-services.sh) and the revampit-cron@*.timer / revampit-backup units — those are a separate, higher-stakes rename. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG * chore(deploy): point deploy pipeline + CI fixtures at evig, not revampit The GitHub repo was renamed revamp-it -> evig a while back and the domain/Caddy layer already points at evig.orangecat.ch (with a 308 from the old revampit.orangecat.ch), but the self-host deploy pipeline was still targeting /opt/revampit and the revampit-app systemd unit. Updates the deploy script's NAME var, CI's throwaway fixture names/emails, and the smoke-test default URLs to match. The systemd unit + /opt directory on the box were renamed to evig-app / /opt/evig directly, verified live (200 before and after, zero downtime). Left untouched: production database names/users (revampit_cms etc. in rollback-production.sh, monitoring-setup.sh, check-services.sh) and the revampit-cron@*.timer / revampit-backup units — those touch live data and a schedule (one timer looks like it releases escrow), so they're a separate, higher-stakes rename flagged for a deliberate go/no-go rather than folded in here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG * fix(docs): point deploy-script docs at the renamed evig script The rename to scripts/selfhost-deploy-evig.sh left 5 docs pointing at the old filename, tripping the docs-paths CI gate (stale count rose 68 -> 73). Fixed the references; net stale count actually fell to 65, so lowered the baseline in the same PR per the gate's own instruction. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG * fix(ci): correct the docs-paths baseline back to 68 My previous commit set this to 65 based on a local run that was reading a dirty working tree (leftover untracked files were falsely satisfying 3 path checks). Verified against a truly clean clone of this branch: the real count, after the doc-path fixes, is 68 — unchanged from main, since this PR only touches the 5 revampit->evig references and leaves the pre-existing unrelated stale docs alone. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> 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> |
||
|
|
a21d8906af |
chore: add a formatter, and close a CSS comment that was never closed (#419)
* 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> |
||
|
|
ddd337d68c |
refactor(nav, services): one source of truth for what evig offers and where it appears (#389)
* wip: nav regroup
* refactor(nav, services): one source of truth for what evig offers and where it appears
Two menus were describing the same organisation and drifting apart. This makes
placement DATA and deletes what nothing read.
## The SSOT break was mine, from an hour earlier
Moving Linux and the open-source registry into Lernen, I listed them by hand
in navigation.tsx — while SERVICE_CONFIGS still fed them to the
Dienstleistungen menu. One item, two menus, two independent lists to keep in
step: exactly the drift the config exists to prevent.
Each service now declares `navGroup: 'services' | 'learn'` ONCE, and both
menus derive from that. A service cannot be in two menus or in none, and
`services-nav.test.ts` asserts precisely that — proved by planting the
duplicate back, which fails with "linuxOpenSource appears in 2 menus
(expected exactly 1)".
## The catalogue
Kept: webDesign (George's call — it is real revenue), linuxOpenSource,
openSourceSolutions. Added `aiAdoption` at /services/ai-robotics: pillar 5
existed only as a /contact link. The page describes how the work goes — look
at the work for a day, pick one task, build it, hand it over so someone on
their side can run and switch it off — and carries the required honesty
boundary: not a silver bullet, not a dependency, not a big firm.
Removed:
hardwareRecycling → off-thesis outright. "Verantwortungsvolle Entsorgung"
is disposal; evig is not a recycler, and the homepage
now says so in as many words.
buildYourComputer → 549 lines of interactive configurator for a service
flagged `available: false`, still selling the previous
org's "Revamped"-Zertifizierung under an English title.
computerRepair → redirects to /it-hilfe. It advertised evig repairing
dataRecovery your machine at CHF 70/h, which contradicts the
marketplace model where the technician sets the price.
Its "booking slug" also booked nothing: the seeded
service_types slugs never matched these hrefs, so the
page always fell through to isBookable: false.
Redirects rather than 404s — the URLs are indexed and the visitor still wants
the same thing. Also deleted /services/[service]/repair, a 135-line orphan
that ignored its own route param and rendered the same page at
/services/<anything>/repair.
## Über uns answers one question now
Nine unsectioned items spanning five unrelated groups — identity, a brand
division, a transactional product (join a pool, pay a share), trust pages,
and two operational explainers including a City of Zürich subsidy evig does
not administer and cannot redeem. Two carried a `new` badge simultaneously.
It was the only multi-item menu without `isSection` eyebrows.
Now five items in two groups: Wer wir sind (Mission, Vision, Projekte) and
Vertrauen (Transparenz, FAQ). `evig ai` and `Abos teilen` moved to Marktplatz,
which gains a third section — from the reader's side these are three ways to
get something, not three parts of an org chart. `So funktioniert’s` and
`Reparaturbonus Zürich` left the nav; both pages remain.
## Config that held German nobody read
src/config/community.ts was 644 lines: INVOLVEMENT_OPTIONS,
PARTNER_INSTITUTIONS and seven full PageContent trees with German titles,
descriptions and CTA labels — a second copy of getInvolved.* in the message
files. Nothing imported any of it except one type. It could have drifted from
the real copy forever without anyone noticing, because nothing read it. Now
22 lines: the type.
## A duplication that cannot be deleted yet, so it is gated instead
WORKSHOP_CATEGORIES carries German name/description per category, and the
messages carry the same strings again. The public page renders the MESSAGE
version; the config version is load-bearing elsewhere — normalizeCategoryId
matches legacy DB rows on the German name, and the admin filter uses it as an
option value. Deleting it needs an admin refactor.
So it can no longer diverge: workshops-config-matches-messages.test.ts fails
if you edit one and not the other. Mutation-tested. The real fix is noted in
the file.
Also removed the last "Vintage" copy: the hardware workshop said
"Vintage-Restauration", and a dead components.communitySpace block advertised
a "Museum für seltene Vintage-Hardware" — rendered by no component at all.
i18n baseline fell 2531 → 2430 source findings, most of it the deleted
community.ts tree. The one new entry is the edited workshop description: a
pre-existing violation whose text changed. Baselined rather than marked
i18n-ok, because it IS UI text in the wrong layer and should stay visible as
debt until the admin refactor removes it.
npm run verify green: lint, umlauts, chrome, docs, compliance, typecheck,
7755 tests (535 suites), production build.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
f20d183b3f |
fix(i18n): teach the wrong-language detector what it can actually detect (#387)
Third time in three PRs that this gate flagged correct Italian and Spanish —
"Trovare un tecnico", "Encontrar a quien lo repare", "LO QUE HACEMOS" and
seven more, none of them defects. Twice I verified them by hand and bumped
the baseline. The rule says the third time you stop fixing instances and
close the class.
## Why it was wrong
Not a threshold problem — HOLES in the stop-word lists. `un` was listed only
under fr; it had `una`/`uno` but not the masculine `un`. So "Trovare un
tecnico" scored Italian 0.00, French 0.33 and got flagged. Spanish was
missing `lo` and `a` while Italian had `lo`, which is why "Encontrar a quien
lo repare" looked Italian. A hole in a list makes CORRECT text look foreign.
Filling the holes then made it worse in the other direction: teaching es the
word `su` immediately made correct Italian ("Linux su vecchi ThinkPad") look
Spanish, and `e`, `non`, `nos` did the same across the other pairs. Sibling
Romance languages share their function words. A bag-of-stop-words comparison
cannot separate them, and no amount of dictionary work will change that.
## What it does now
It detects what it CAN detect: untranslated **English or German** sitting in
a translated file. Those function words barely overlap with Romance or CJK
ones, and that is the leak that actually happens here — DE is the source
language and EN the pivot. Sibling-language comparison is dropped.
Three guards, each earned:
- LEAK_SOURCES = ['en','de'] — only judge against languages it can tell apart.
- MIN_TOKENS_FOR_LANGUAGE_GUESS = 6 — the heuristic's resolution is 1/N; on
a three-word string one shared article moves the ratio by 0.33, clearing
the threshold on its own.
- A script guard, because \w is ASCII-ONLY in JavaScript even under /u, so
`[^\W\d_]` counted Hangul, kana and Cyrillic as ZERO letters and my first
attempt at this guard silently did nothing. It uses \p{L} now. Without it
a Korean sentence containing "evig" and "Revamp-IT" scores as English on
those crumbs.
Proved by mutation, not by assertion: 16 cases, eleven correct-language
strings (it/es/fr/ko/ja/ru, including CJK carrying Latin brand names) all
clean, five real English/German leaks all still caught.
## What the fix immediately found
**Real untranslated English shipped to five locales.** es, fr, it, ja and ko
were all rendering English inside the IT-Hilfe hub — "Describe your issue and
receive offers from technicians", "Browse profiles and contact someone
directly", "Help as a technician — requests near you", "Register as a
technician and help people nearby." — plus the privacy page's data-export
sentence in ja and ko. The KEYS existed, so the missing-key audit passed;
only the values were English, and the old detector could not see them. All
translated here.
This is the same class as itHelp.hub.subtitle in #382, which I found by
reading a rendered page. The gate finds them now.
## And a dead storefront
`shop.*` held 140 keys; three loading/error boundaries use SIX. The other 134
describe a storefront whose pages are pure `redirect()` calls to /marketplace
— product grids, cart labels, category breadcrumbs, opening hours — shipped
in every visitor's page payload in eight languages. Pruned: ~54KB of JSON,
6511 deleted lines. Liveness checked by namespace prefix, not just call
sites (the lesson from home.newsletter), then proved by typecheck.
Baseline lowered in the same commit, per the ratchet rule: 706 message
findings → 84, with 632 resolved and 0 new.
Also folded in (was #386, which deadlocked against this: its new Italian and
Spanish headlines were flagged by the very detector this fixes):
- /it-hilfe still showed "Computer reparieren, OS neu installieren,
IT-Probleme lösen" as its H1 — a keyword list. #382 reframed the metadata
and subtitle and missed the line a visitor reads first. It now matches the
homepage pillar's link text exactly, so clicking "Jemanden finden, der es
repariert" lands on a page with that headline.
- "CHF 300.00" wrapped onto two lines on a 390px pool card. A price must not
wrap; the title beside it gives way instead.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
f6b9a73b8b |
feat(brand): evig repairs becomes evig technicians, and evig stops asking for printers (#382)
Three changes from the same focusing pass, all of them cases where the copy
described an organisation the code had already outgrown.
## The division is named after the person, not the service
`evig repairs` → `evig technicians`. "Repairs" names what happens; a user is
looking for someone who will do it. The surface has worked that way for a long
time — post a request, receive offers from technicians nearby, choose one, with
a budget filter that already splits "Gratis / Community" from "Mit Budget" —
only the naming lagged behind the product.
Contained to `src/config/divisions.ts` plus the `divisions.items.<id>` key in
eight locales, because the wordmark is composed (`${ORG.name} ${id}`) and every
consumer derives from the array. No component changed.
## IT-Hilfe stops promising charity
The page called itself "Kostenlose Community-Reparatur" and said "kostenlos"
three times over: meta title, meta description, subtitle, tagline. That framing
does two bad things at once — it hides the marketplace the code implements, and
it forecloses the half of the model where a technician actually earns. Rewritten
to what it is: describe the problem, get offers, choose. "Über die Community
gratis oder fair bezahlt" keeps the free path visible without making it the
whole promise.
Fixed alongside: `itHelp.hub.subtitle` was stored as literal ENGLISH in es, fr,
it, ja and ko. Not a missing key — a wrong value, so no fallback could catch it
and no missing-key audit could see it. Five locales showed an English sentence
in the middle of a translated page.
## No more printers
The donation pages solicited "Laptops, Desktop-PCs, Monitore, Tastaturen,
Mäuse, Drucker" while the new homepage copy says evig does not deal in
printers. One of the two had to go. A printer is the archetype of what evig
deliberately does not take: low value, hard to refurbish, and — per
co2-impact.ts, which already refuses to publish a factor for the category —
without a defensible open number, so we could not even honestly claim a saving
for keeping one alive. GPUs take their place in the list, which is what the AI
thesis actually needs.
The erfassung category '60' (Drucker & Scanner) deliberately STAYS. Existing
inventory rows point at it, and deleting a category that historical records
reference would corrupt them. Not soliciting new ones is the change; rewriting
the past is not.
## /revamped deleted
294 lines selling "die REVAMPED-Zertifizierung … unser exklusives REVAMPED-
Label" — the previous organisation's name, as a product label, after the
rebrand. It was orphaned from nav and footer but still listed in the sitemap,
so it was indexable. It also advertised a certification for computers "we
build" on behalf of a service flagged `available: false`, and its inbound CTA
copy had sat unmaintained long enough to contain a German grammar error ("Hol
sich deine" for "Hol dir deine"). Page, messages, sitemap entry and the
inbound certification block are all gone. If evig wants a quality label later,
it belongs on the QC Prüfsiegel the intake pipeline already produces.
Also removed `ROUTES.public.transparenzKennzahlen` — a route constant used by
nothing, pointing at a page that deliberately calls notFound().
## One baseline moved, deliberately
Two new "wrong language" findings, both false positives of the same kind as the
last batch: "Trovare un tecnico" (correct Italian) and "Encontrar a quien lo
repare" (correct Spanish), each scored `own 0` because the words are absent
from the detector's own word list for that language. Verified by reading, then
accepted.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
c9db8c32ed |
feat(home): state the five pillars, and put shared subscriptions with evig ai (#381)
The hero already said the right thing — "Zugang zu Intelligenz. Für alle
bezahlbar." Everything under it was still the story of the organisation evig
came from.
## The homepage
Two bands are gone: a "zweites Leben / weitergeben" ribbon, and a "Drei
Schritte. Ein Kreislauf." funnel that opened by asking the reader to donate
their old kit. That story is true, but it is the consequence, not the reason,
and it answered a question nobody arriving here is asking. In their place, one
section driven by a new SSOT (`src/config/pillars.ts`):
hardware → machines good enough for real work, at a price people can pay
technicians → finding someone to fix it, as easily as booking a ride
software → Linux and open source, because the machine gets faster
training → retraining for a labour market that AI is rewriting
adoption → helping organisations actually put AI and robotics to work
`adoption` points at a conversation, not a service page. Writing a consulting
page for work nobody has scoped yet is exactly the claim the honesty rule
exists to prevent. The section count is ICU-driven from the array — the
divisions subtitle taught us why: it hand-wrote "vom Gerät bis zum Gebäude"
and kept promising a building division for hours after that division was
deleted, sitting directly under a heading that correctly read "3 Bereiche".
That subtitle is fixed here too, along with two nav keys for the removed
divisions that were still being serialised into every page payload.
Pillars are deliberately NOT derived from EVIG_DIVISIONS. Divisions are how the
org is named; pillars are what it does. `training` and `adoption` have no
division and should not get one — inventing "evig academy" to make the lists
match is the brand proliferation that got architecture and health deleted.
## Subscription pools moved
They sat under "Mitmachen → Mitgliedschaft" as a generic Netflix/Spotify swap
board. The /ai page states the exact problem they solve — "Wer ein teures Abo
bezahlen kann, lernt schneller, arbeitet besser und kommt an Chancen, die
anderen verschlossen bleiben" — and then never said how. So: `ai` is now the
first pool category and the default, the page leads with the real number
(CHF 22 alone, CHF 5.50 split four ways), the nav entry sits beside evig ai,
and /ai gains a fourth strand that links to it. Strand links are a new optional
config field implementing the contextual-links rule: a paragraph naming an
offer with no way to reach it is a dead end.
## Metadata that had not caught up
The JSON-LD told search engines evig does "Reparatur und Aufbau von
Vintage-Computern" — a term for the opposite of what evig sells. And the SEO
keywords were a German array frozen into the component, so seven locales were
served German keywords. Keywords now come from the messages like every other
sentence, split from one comma-separated string per locale (the shape
`jsonld.areaServed` already uses — avoids the array-in-messages fragility,
since the DE fallback replaces arrays wholesale with no per-element merge).
## Chrome drift on the pools page
CreatePoolModal was a hand-rolled `fixed inset-0` overlay with its own
useFocusTrap and its own rounded-2xl surface — a second encoding of the
centered-dialog shape. It uses <Modal> now. PoolCard used `card-shell
rounded-2xl`, overriding the shared radius, so pool cards were visibly rounder
than every other card on the site; it uses <Card>. The loading skeleton
hand-rolled the shell in a way the ratchet grep could not even see
(`rounded-2xl` slips past a pattern matching `rounded-(lg|xl)`).
## One baseline moved, deliberately
The i18n gate flagged 8 new "wrong language" findings on the Spanish and
Italian strings. All 8 are correct in their own language ("Trova un tecnico",
"LO QUE HACEMOS"). The detector scored them "own 0" — the words are absent
from its Italian/Spanish word lists entirely, which is the sibling-language
limit, not a translation error. Accepted into the baseline; net it FELL
(48 insertions vs 53 deletions), it did not rise.
npm run verify green: lint, umlauts, chrome, docs, compliance, typecheck,
7746 tests, production build.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
2b0699faba |
ci(compliance): five named gates had never run — wire four, state the fifth (#374)
package.json defined 'compliance' (ssot + i18n + i18n-hardcoded + i18n-leaks + i18n-stale). grep across .github, .husky and package.json found ZERO callers: the only one was scripts/ship.sh, which is manual. npm run verify — the bundle CI actually calls — did not include it. Five named gates buying confidence none of them had earned, while docs/TRANSLATION.md said 'Pipe it into CI'. Unrun, they had drifted far red: 1723 hardcoded-string violations, 175 missing translation keys, and locale leaks at ja 169 / ko 170 / ru 35 against a baseline of 9. compliance:ci (ssot + i18n + hardcoded + leaks) now runs inside verify, so it gates every PR AND the deploy. The three baselines are refreshed to today's counts: that ACCEPTS the existing debt, deliberately. Ratcheted debt that cannot grow beats invisible debt that has been growing for months, and the numbers are stated here rather than buried. compliance:i18n-stale is deliberately NOT in the bundle. Its --update records that locale strings match the current German text — a claim only a translator can make. A machine refreshing it to go green would be writing down something false. It stays a manual command. Mutation-tested rather than trusted, which surfaced a real blind spot: the hardcoded scanner only reads QUOTED string literals, so a German sentence written as JSX TEXT (<p>Keine Einträge…</p>) yields '0 new' and a green gate. Attribute values and props ARE caught. Documented at the top of the scanner so nobody reads green as 'no hardcoded German'. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
fe811bcfc2 |
docs: correct the design-system section that described a deleted file (#370)
CLAUDE.md carried a full 'Layer 2 — tailwind.config.ts' section for a file Tailwind v4 removed, plus a token table naming --color-bg / --color-surface / --color-border (zero occurrences in globals.css; the real names are --surface-base, --text-primary, --border-default), a dark-mode mechanism that does not exist (it claimed @layer utilities auto-remaps bg-white — globals.css contains no 'bg-white'), and a green #f0fdf4..#14532d palette for a brand that is Ion Lime. Five false claims in sixty lines, in the file every agent session reads first. Also corrected: Tailwind 3.4 -> 4 and React 18 -> 19 in the stack tables; the .claude/CLAUDE.md ADMIN_SECTIONS table (10 rows, wrong paths, ids that no longer exist — 'products' and 'finances' are gone, and granting 'workshops' grants nothing because the admin section is 'workshops-admin') replaced by a pointer to sections.ts and the two rules that do not change; the dev-DB row that said Neon while CLAUDE.md said Docker:5433; 002-simplified-auth.sql -> 002b-; repairer_profiles -> technician_profiles (renamed by migration 105); and a Revamp-IT street address in SHARED_CONTEXT that org.ts explicitly forbids publishing. scripts/ci/docs-paths-exist.sh closes the class: every backticked repo path in the docs must exist. CLAUDE.md, .claude/CLAUDE.md and README.md are held at ZERO; the 68 stale references in older reference docs are ratcheted so they can fall but never rise. Historical plans and audits are excluded — a June plan naming files that later moved is history, not a defect. Proven by mutation: a planted bad path in CLAUDE.md exits 1. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
fed2289a2d |
fix(money): invoices charged the pre-2024 VAT rate — consolidate to one SSOT (#368)
Switzerland raised standard VAT from 7.7% to 8.1% on 2024-01-01. The rate was declared in five places — lib/pricing, lib/payments/tax-compliance, lib/payments/currency (twice), the zod default in api/invoices and the invoices.tax_rate column default — and every copy carried the old rate. Two of those files each described themselves as 'the SSOT for VAT'. Meanwhile lib/services/payment-webhook books Kivvi at 8.1%, and its own comment flagged the divergence as a follow-up nobody closed. So the platform issued invoices at one rate and posted the accounting entry at another, on every paid order. - src/config/tax.ts is now the only declaration; everything derives. - getVATRateLabel() returned a literal '7.7' — that string is printed on invoices, so customers were shown a rate that also wasn't charged. - Migration 140 moves the invoices.tax_rate default to 0.0810. Existing rows are NOT back-filled: the column records what was actually charged, and rewriting it would falsify history rather than correct it. Any commercial correction is a business decision. - ~25 assertions across six suites pinned the old rate, so correcting it looked like a regression. They now derive from the constant; the literal rate is asserted in exactly one place (config/__tests__/tax-ssot.test.ts), which also fails if any source file hardcodes 0.077 again. Verified: migration applied to a real database (it initially targeted the wrong table — caught by applying it rather than reading it), 7802 tests, typecheck, lint 0 errors, umlaut gate clean. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
1f03185863 |
fix(deploy): one migration order for all three runners, and stop the prod fail-open (#359)
Migrations were enumerated three different ways. run-migration.sh sorted -V with no skip list, apply-migrations-ci.sh sorted -V WITH one, and the production deploy used a bare glob — lexicographic, which orders the 005* duplicates the opposite way. So the order production would use in a disaster-recovery rebuild was the one order CI never replayed, and a from-scratch local DB died on a duplicate CI had been skipping for months. scripts/db/migration-order.sh is now the only enumeration. The deploy also read schema_migrations with '|| true'. An empty answer does not mean 'nothing applied', it means 'could not look' — and the loop treats every unlisted file as pending, so one ssh blip would have re-applied ~150 migrations to the live database. It now fails closed. Also: - deploy-selfhost.yml re-inlined four checks instead of calling verify, making the DEPLOY gate weaker than the MERGE gate (no card-shell ratchet, i18n subset instead of the full suite). Calls verify verbatim. - .gitignore had a blanket *.sh + hand-kept negations, so every new script under scripts/ was invisible to git — it commits clean, then CI fails on a file that exists on one laptop. Anchored to the repo root. - 5 dev-only packages sat in dependencies, where dependency-audit.sh (npm audit --omit=dev) reports an ESLint advisory as a runtime critical. Moved to devDependencies. - dependabot: groups for the next / next-auth / tailwind / eslint / jest lockstep families, and @types/node major pinned to the runtime major (Node 20) — PR #356 was closed for exactly that. - Untracked 2.7 MB of committed Jest output and a .bak dropping. Verified: from-zero CI replay green (133 applied), local runner green from a fresh DB (149 applied — it could not complete at all before), lint 0 errors, typecheck clean, 7798 tests. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
df3818ddf6 |
refactor(chrome): normalize 95 hand-rolled card shells to Card/card-shell, ratchet 99 -> 3 (#347)
Every static-div shell becomes <Card>; non-div elements (Link, li, ul, form, details, section) and dynamic classNames take the card-shell class. The two remaining sites are deliberate: HelpRequestCard's urgency-conditional border and AlternativeCard's border-2 hover shell. Baseline lowered 99 -> 3 in the same change. Verified: typecheck, lint (0 errors), 7798 tests, production build, and before/after headless screenshots (1440px + 390px) of 11 affected admin/dashboard pages on a locally seeded instance — layouts identical, corners/borders normalized to the canonical shell. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
225e31be0b |
refactor(chrome): 21 hand-rolled card shells -> Card/card-shell, ratchet 120->99 (#340)
Every converted site was pixel-identical to card-shell already (bg-surface-base + rounded-xl + default 1px border — the v4 shim maps bare `border` to var(--border-default)), so this is pure dedup: divs become <Card>, Link elements take the card-shell utility directly. Sites with border-subtle/ strong/border-2 or rounded-lg are visually different and deliberately left for a later, looked-at pass. Baseline lowered 120 -> 99 in the same PR, per the ratchet's own rule. Gate: lint 0 errors, umlauts clean, ratchet 99/99, tsc clean, 7797 tests, build green. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
3c78deaecd |
chore: silence real warnings, retire deprecated utilities, ratchet chrome drift (#339)
- drop @types/uuid + @types/cookie (stub packages; both libs ship types) - experimental.middlewareClientMaxBodySize -> proxyClientMaxBodySize (Next 16 rename) - InstanceFormModal: hand-rolled fixed-inset overlay -> shared <Modal> (gains focus trap, escape, aria; loses nothing) - last two bg-opacity-* scrims -> bg-black/NN (deprecated utility, audit item) - NEW gate scripts/ci/card-shell-ratchet.sh in npm run verify: 120 hand-rolled card shells exist; the count may fall or hold, never rise. Mutation-tested (121 -> exit 1). Baseline lowering documented in CLAUDE.md audit section. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
934e114b80 |
fix(ci): post-deploy smoke called a redirect a failure, and a redirect ready (#312)
The deploy of
|
||
|
|
de244172ff |
fix(email): the relay says 250 and the mail goes nowhere (#311)
* fix(vote): give the "sign in to vote" error the door it names The vote-auth fix (#305) tells someone whose email belongs to an account to sign in, and then leaves them standing there. This repo's own rule is that every stated problem links to where it is fixed — a warning without a way out is a dead end. The reason it shipped without the link was that apiFetch flattens every failure to a bare { success, error } string. The only way for the UI to know WHICH failure it got was to match the German sentence, and branching on prose breaks the first time someone rewords or translates it. So the fix is one level down: give the envelope a machine-readable code. ERROR_CODES one SSOT for codes, next to ERROR_MESSAGES. Add one only when the interface must DO something different — the message is for the human, the code is for the UI. apiBadRequest optional third argument, omitted from the body when unset ApiResponse.code optional, so all ~100 existing callers are untouched apiFetch passes a string code through; ignores a non-string one rather than handing junk to the UI The vote page now renders "Anmelden" as a link to loginUrl beside that error, reusing the string already there for the success panel — no new i18n keys, so no locale can desync. Tests assert the passthrough and the omission, and I checked the passthrough test fails with the apiFetch change reverted (1 of 14) rather than assuming a green suite meant something. The route test now pins the code, using a mock that actually forwards the third argument — a mock that dropped it would have made the assertion vacuous. 5963 tests green across 440 suites; eslint and the umlaut linter clean. * fix(vote): the one live decision could not be voted on at all Found by opening the real share link at 390px while verifying #307, not by any test. The page drew "Deine Stimme" and then nothing. Submitting answered "Stimmdaten erforderlich". There was no ballot, and nothing on screen said why. `thumbs_up_down` has been in VOTING_METHODS all along, with a zod schema, a validator and a tally on the server — and no branch in either voting surface, and no case in useVoteState's switch. buildVoteData() fell through to `undefined`, which TypeScript allows because the switch had no default and the return type is `unknown`. So the absence compiled, rendered blank, and failed at the server. Production's only decision uses that method. Fixed on both surfaces — the public share-link page and the members' VotingPanel — with one component, and the choice labels in config beside the other methods' rather than typed into JSX. No default selection: a thumbs vote is a single deliberate tap, so pre-selecting "Dafür" would submit an opinion the voter never expressed. Two guards, because the compile-time one alone would not have caught this: useVoteState a `never` exhaustiveness default — a method with no case is now a build error rather than a silent undefined ballot-coverage.test.tsx renders EVERY entry in VOTING_METHODS and asserts the ballot contains something interactive. A missing render branch is absence, and absence is what the switch guard cannot see. It iterates the config, so it cannot drift from it. Checked the coverage test fails with the branch removed (thumbs_up_down only, 6 of 7 still passing) rather than trusting a green suite. 7747 tests green across 529 suites; eslint and the umlaut linter clean. * fix(email): the relay says 250 and the mail goes nowhere Sent a probe from the production host through the configured relay to a real mailbox. The SMTP conversation was flawless — EHLO, STARTTLS, AUTH, accepted — and the message never arrived. Not the inbox, not spam, not trash. The cause is the sender domain. EMAIL_FROM in prod is noreply@revampit.ch, which has no SPF record and no brevo._domainkey DKIM record. Brevo accepts mail from a domain it has not authenticated and then drops it, so every layer reports success and the inbox stays empty. Searching the recipient mailbox back through its whole history finds no application mail at all: every revamp-it.ch message in it is human mail from colleagues via the org's own server. evig's transactional email has never worked. scripts/test-email.ts could not have caught this. It mailed only itself, and it called a relay handoff "Email sent successfully!". So it is rebuilt to answer the question that matters: - takes the recipient as an argument instead of sending to EMAIL_FROM - resolves the sender domain's SPF, DKIM and DMARC before sending, and says plainly that an unauthenticated domain will vanish despite a 250 - refuses to describe acceptance as delivery The DKIM verdict is deliberately relay-aware. Selectors are chosen by the provider and cannot be enumerated from DNS, so a missing selector is only conclusive when we know which one to expect — Brevo documents brevo._domainkey. Against any other relay an unknown selector is reported as inconclusive, not as a failure. Checked both ways: google.com is flagged when sending through Brevo (true — it has no Brevo key) and is not flagged otherwise. Nothing here fixes delivery. That needs a sending domain that exists and is authenticated with the provider, which is a purchase and a DNS change, not a code change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: the canonical host moved, and the redirect to it must keep the method revampit.orangecat.ch now redirects to evig.orangecat.ch, so every doc that called the old host "where this codebase runs" was pointing at a redirect. It was added as `redir ... permanent`, which is 301, and 301 does not preserve the HTTP method — a POST arrives as a bodyless GET. Auth.js then answered InvalidProvider ("Callback for provider type (credentials) is not supported"), because a GET on a credentials callback is not a thing. Browser traffic never noticed: it lands on the canonical host and posts there. Only non-browser POST clients broke — the CI auth smoke, API callers, and any webhook still aimed at the old host. Fixed on the box by making it a 308; documented here so it is not reintroduced. Also records why auth-smoke and inventory-smoke deliberately point PLAYWRIGHT_BASE_URL at the OLD host: that is what exercises the redirect, and it is how this was caught. Repointing them at the canonical host would turn a real gate into a green one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
c27a404ae2 |
ci: call the central auto-merge sweep instead of carrying a copy (#310)
* ci: call the central auto-merge sweep instead of carrying a copy
auto-merge-sweep.sh was copied into 22 repos and drifted into EIGHT distinct
versions, 245 to 404 lines. Three of them independently grew different fixes for
real outages, and each fix reached only the repo that wrote it:
evig, revampit infra-failure detection + re-run. An Actions incident left
main "failure" with no failed job at all; 11 PRs stranded
for roughly 14 hours.
fleetcrown DEADLOCK naming — a red base with the repairing PR sitting in
the queue was indistinguishable from "nothing to merge".
the other 19 neither.
Nothing could carry a fix across, so every repo waited to hit each outage
itself. This repo now calls the canonical sweep in maonakamoto/dotfiles, and the
local copy is deleted.
The canonical is the union of the three, built on the variant ten repos were
already running rather than on the longest one — the 404-line variant is missing
the step-summary reporting the 296-line one has, so "take the biggest file"
would have silently deleted working behaviour. The merge was 106 insertions and
zero deletions: nothing can be lost by adopting it.
The triggers stay in this file because they genuinely are per-repo: workflow_run
must name the CI workflow exactly, and that name differs across the fleet.
Two details that are silent when wrong, both found by piloting rather than
reasoning:
rearm_workflows is SPACE-separated. The sweep word-splits it; a comma makes
one bogus token, every dispatch fails, and the only symptom is that nothing
deploys — while the sweep still exits 0 and reports a successful merge.
permissions are declared on the CALLER as well. A called workflow's token is
capped by what the caller grants, so relying on the callee's block alone can
hand it a read-only token; the sweep would then merge nothing while exiting 0,
which is indistinguishable from having nothing to merge.
Verified before this rollout: the canonical ran end to end in dotfiles' own CI,
and the reusable-workflow path ran end to end in the pilot repo (s-ink).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* test(ci): the sweep tests moved to dotfiles with the script they test
These two suites drove scripts/ci/auto-merge-sweep.sh directly, so deleting the
local copy of that script left them pointing at nothing — CI failed with
"Test Suites: 1 failed, 533 passed".
They were not dropped. This repo was the ONLY one in the fleet with tests for
the sweep, and centralising the code while discarding the only evidence it
behaves would have been the worst possible trade. They are ported to bash and
now run in maonakamoto/dotfiles CI against the canonical script
(scripts/ci/test-auto-merge-sweep.sh), where they cover every repo that calls
it rather than just this one.
Same six cases, same reasoning: re-run a cancelled or infra-failed base run,
never re-run a genuine failure, stop at the attempt cap, still reach the PR loop
when the base is green. They were also mutation-tested there — disabling the
re-run turns the two dependent cases red — because a suite that has only ever
passed is indistinguishable from one that asserts nothing.
Net effect: the coverage this repo wrote now defends twenty-two repos instead of
one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
c849d6c596 |
feat(ci): make a dependency advisory turn something red (#278)
Three CRITICAL auth advisories sat open against the live site today and nothing in CI was red. They surfaced only because `git push` happened to print GitHub's "found 10 vulnerabilities" banner, which is not monitoring. Cleared the two remaining runtime highs first, both instances of the same trap that hid the auth critical — a patched copy hoisted while a vulnerable one survives underneath: - postcss was declared ^8.5.10 in devDependencies AND in overrides, so it resolved to 8.5.15, below the 8.5.23 that patches the source-map path traversal. Raised both to ^8.5.26. - sharp: the root had a patched ^0.35.3, but next pinned ^0.34.5 and got its own nested vulnerable copy (libvips CVE-2026-33327 et al). Added the `"sharp": "$sharp"` override so the nested copy resolves to the root's. This removes 26 duplicate platform binaries from the lockfile. npm audit is now clean at every severity, dev included. The check itself, in scripts/ci/dependency-audit.sh, has two callers: - ci.yml `security` job — blocks a PR that INTRODUCES a critical. - security-audit.yml — scheduled daily, files/closes one issue for high+. The scheduled half is the one that matters: advisories appear with NO code change, so no push-triggered check has any reason to run. That is exactly how today's criticals stayed invisible. Critical blocks, high only reports. Auto-merge refuses a red base, so failing CI on every new advisory would hand a third party the power to jam the entire merge train on their release schedule. Verified: script unit-tested against stubbed audit output across critical / high-only / clean / malformed-JSON / empty-output / bad-threshold cases — including that malformed and empty output FAIL rather than read as a pass. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
0abca3ca29 |
fix(ci): merge via REST when gh's client-side precheck refuses (#286)
Diagnosis, now with the number that was missing before: the sweep logs its own
view at the merge site, and it reads
#278 direct merge refused (MERGEABLE/BLOCKED)
#282 direct merge refused (MERGEABLE/BLOCKED)
while a PAT reads MERGEABLE/CLEAN for the same two PRs at the same moment.
mergeStateStatus is computed per viewer, and `gh pr merge` refuses client-side
on BLOCKED. `--auto` goes through the identical precheck, so it was refused
too — that fallback never fired.
main has branch protection with every option disabled, no rulesets, no
CODEOWNERS, no required checks and no required reviews, so there is no rule
being enforced here. Meanwhile #224, #225 and #226 — all of which modify
.github/workflows/ — merged normally, so this is not the workflows scope.
The REST merge endpoint skips the precheck and enforces the branch's actual
protection instead. If GitHub does refuse, it returns non-2xx and the PR is
left for the next sweep exactly as before; nothing is forced past a real rule.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
0dd5619fe7 | fix(ci): a red base must not trap the PR that repairs it (#285) | ||
|
|
18bab73f63 |
fix(ci): fall back to native auto-merge when a direct merge is refused (#283)
Three consecutive sweeps read #278 and #282 as MERGEABLE/CLEAN, announced the merge, and were refused: X Pull request maonakamoto/evig#278 is not mergeable: the base branch policy prohibits the merge. There is no such policy. main has branch protection with every option disabled, no rulesets, no CODEOWNERS, no required checks and no required reviews. Throughout the same window the bot merged #225, #226, #279 and #280 without trouble — including #225/#226, which modify .github/workflows/, so this is not the token's workflows scope either. The refusal is gh's client-side precheck reading the mergeStateStatus that GITHUB_TOKEN sees, which is not the one a PAT sees — nothing this script can inspect its way around. So log both what we saw and delegate: native auto-merge is GitHub performing the merge itself, and does not go through that precheck. It is the escape hatch gh names in its own error message. Still one car per sweep — the fallback is followed by the same `break`, so at most one PR per sweep is handed over, and the green-base guard is unchanged. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
3988c47786 |
fix(ci): retry runs that failed before executing any of our code (#280)
* fix(ci): retry runs that failed before executing any of our code The sweep retries CANCELLED checks but deliberately leaves genuine failures alone. A GitHub Actions incident lands in the gap between those two: the run fails with conclusion=failure, so it is treated as a real verdict — but it never executed a line of this repo's code. Consequence: during an incident EVERY open PR is stranded permanently, and nobody is in the merge loop to notice. Today (2026-08-06, Actions major outage, webhooks throttled to ~15%) three jobs on PR #278 died with "Failed to resolve action download info. Error: Service Unavailable" and that PR cannot become green again without a human running `gh run rerun --failed`. The discriminator is precise: a job whose ONLY failed step is "Set up job" never got as far as running our code, so it produced no verdict about it. A real failure names a real step. Verified against live runs: PR #278 outage run -> [Set up job] -> infra PR #228 (TS 7) -> [Verify (lint + umlauts + typecheck + build)] -> real PR #265 (ESLint 10) -> [Verify (lint + umlauts + typecheck + build)] -> real nonexistent run -> no data -> refuses to guess Conservative by construction: retries only when EVERY failed job in the run failed at set-up. One real step failure anywhere and the PR is left alone. Capped at MAX_RUN_ATTEMPTS (default 3) — an incident can last hours, and an uncapped retry would re-run the same doomed run every sweep forever. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(ci): self-heal a base branch whose CI ended without a verdict The sweep already knew that a cancelled/infra-failed run is noise rather than a judgement — but only for PR checks. The base branch kept the original "refuse and exit" behaviour, which deadlocks: the only thing that produces a new CI run on main is a merge, and merges are exactly what the guard blocks. Observed here on 2026-08-07. An Actions incident left main's run `failure` with no failed job at all (Migration Drift cancelled, everything else green). Eleven PRs sat for ~14h while every sweep exited 0 and looked healthy. So: extract the "is this a verdict about the code?" test and apply it to the base run too. A genuine failure still blocks — that IS a verdict. Retries are capped by the run's own attempt counter, which is why this re-runs rather than dispatching fresh (a new dispatch resets to attempt 1 and could churn forever). Also drops `--failed` from the PR-side retry. A partial re-run flips SKIPPED jobs to CANCELLED, so the PR ends up non-green for a brand new reason and needs yet another retry — seen on #278 today. Tested by running the real script against a fake `gh` on PATH, so this covers shipped control flow rather than a re-description of it. Mutation-checked: disabling the self-heal turns 3 of the 6 tests red. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
a7a6fece92 |
fix(ci): drain the merge queue oldest-first, not newest-first (#275)
`gh pr list` returns newest-first, and the sweep merges the first eligible PR then stops. So the newest green PR wins every sweep, and an older one can wait indefinitely. Observed in maonakamoto/fleetcrown on 2026-08-06: two consecutive sweeps merged the two newest PRs while three older green ones sat untouched and were never even evaluated. With several agent sessions opening PRs continuously that is starvation — and it starves the worst candidate, since the longest-waiting PR is the one whose checks were proven against the most now-stale base. PR numbers increase monotonically with creation, so sorting ascending is FIFO. The ordering was never a decision, just whatever gh happened to return. Fixed upstream first (fleetcrown #182) and verified in production there: the sweep immediately after it landed correctly took the oldest open PR rather than the newest. This is that one-line change, applied to the fleet. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
5221d374aa |
fix(ci): main-red alarm was silent on the path that produces nearly every run (#277)
#272 added the alarm on `workflow_run`. That covers pushes to main — but
every merge in this repo is an auto-merge made with GITHUB_TOKEN, which
fires no push event. The sweep therefore re-arms ci.yml by dispatch, and
GitHub emits no `workflow_run` for a dispatched run. The alarm was blind on
the path producing almost every main CI run.
Proven within the hour: main went red on
|
||
|
|
91b8fec42c |
ci: green PRs merge and deploy themselves (#269)
* ci: add the auto-merge sweep policy * ci: green PRs merge and deploy themselves * ci: allow CI to be dispatched so auto-merge can re-arm it * ci: allow deploy to be dispatched so an automated merge still ships |
||
|
|
3ac9c4bac7 |
feat: /vision — the founding vision as a real route (#246)
* docs(evig): founding story SSOT, brand package, non-profit framing - docs/EVIG_STORY.md: canonical founding narrative (the 'access to intelligence is the inequality that matters' thesis) that About/hero/ decks/grants derive from. - public/brand/: organised brand package (SVGs + raster exports + manifest). - .claude/CLAUDE.md: reconcile non-profit framing (gemeinnütziger Verein in Gründung) with the standing honesty boundary (no tax-deductible receipts until registered + canton-recognised). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(vision): add /vision manifesto route (Obsidian & Ion Lime, DE+EN) The founding vision as a real, full-bleed public route — the surface the live site had nothing of (mission/thesis for donors + talent). Debuts evig's new obsidian+lime identity as a scoped, low-risk beachhead; the green app is untouched and the global retheme stays a separate decision. - Route src/app/[locale]/vision/{page,content}.tsx — static, own header/footer. - ConditionalMainLayout: locale-aware /vision opt-out from standard chrome. - globals.css: scoped .theme-vision tokens (obsidian/lime primitives + semantic overrides) + self-contained .v-* layout. Zero literal hex in TSX. - Fonts self-hosted (subset woff2, no CDN): Space Grotesk, Inter, Plex Mono. - i18n: DE (canonical) + EN vision namespace; other 6 locales fall back to DE and are recorded in the i18n baseline (intentional deferral until copy locks). - routes SSOT + sitemap wired. Verified: typecheck, lint (0 errors), test:i18n (16/16) all green; rendered /vision (de) + /en/vision at 1200px and 390px — fonts load, theme scopes, chrome opt-out works, no horizontal overflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(vision): real CTA destinations, footer discoverability, repo cleanup - CTAs no longer point at the non-existent hallo@evig.ch mailbox — route to real in-app pages instead: Support → /get-involved/partnerships, Build → /get-involved, products → /contact (added partnerships + contact to the ROUTES.public SSOT). - Discoverability: link /vision from the site footer navigation. - Cleanup: remove 11 orphaned 'ChatGPT Image …' scratch PNGs (8.4 MB) that were shipping unreferenced in public/images/logo/. - i18n: drop the now-unused mailto subject keys; add footer.vision label (DE+EN); baseline the deferred locales for the new keys. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
9ef3c02008 |
rebrand(evig): identity SSOT, i18n, README, logo assets [Layer A/1]
- org.ts: name/mission/founding → evig; positioning = affordable intelligence - KILL money-routing: blank revamp-it IBAN; add PAYMENT (BTC + OrangeCat, TODO) - blank infra-coupled fields evig lacks (phone, legacy site, external shops) - i18n: brand tokens → evig across all locales (values only, keys untouched) - README + logo assets → evig Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
da2655a276 |
chore(infra): remove Vercel references — everything is self-hosted now (#239)
Vercel is fully decommissioned; production runs self-hosted on the Hetzner
box (revampit.orangecat.ch) behind Caddy, deployed via deploy-selfhost.yml.
- Sentry configs: VERCEL_ENV/VERCEL_GIT_COMMIT_SHA → NODE_ENV +
NEXT_PUBLIC_BUILD_SHA (the self-host build SHA set by the deploy script).
- proxy.ts: drop dead '/_vercel' from BYPASS_INTL.
- prune-audit-log cron: drop x-vercel-cron auth branch, keep CRON_SECRET
(aligns with the other cron routes + run-cron.sh); wake-recurring-tasks
schedule comment reworded to the systemd-timer reality.
- Public web-design "technologies we use": Vercel → self-hosted Hetzner
(tsx url + hosting description in all 8 locales).
- Presentations: ki-nachhaltigkeit demo links revampit.vercel.app →
revampit.orangecat.ch; aoz-wohnen hosting slide → self-hosted Hetzner.
- Email template admin links: hardcoded revampit.vercel.app → ${ORG.website}.
- .env.example: Vercel Blob → S3 (Hetzner Object Storage) vars;
KIVVI_API_URL → kivvi.orangecat.ch.
- CI: drop dead NEXT_PUBLIC_VERCEL_ENV build env.
- Comments (auth/env/sanitize/instrumentation/tax-reports/hirn/kivvi/
inventory) reworded to self-hosted reality, rationale preserved.
Accurate historical/current docs (docs/**, README, archive) and the
immutable migration 033 comment left as-is.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|
|
7615dc8da0 |
feat(blog): 3-level audience access control (public/team/author)
Adds an `audience` axis to blog posts, orthogonal to the existing `visibility` (discoverability) column: - public — anyone (default; every existing post, via migration default) - team — logged-in staff only (session.user.isStaff) - author — the author (created_by) + super admins only SSOT: enum + labels + parser in src/config/blog.ts; one access helper (src/lib/blog-access.ts, canViewPost/filterViewable) reused at every read surface — index, post page + generateMetadata, RSS, sitemap, comments API. Admin editor gains a "Zugriff" select (config-driven) and the list shows a per-post access badge. Migration 138 is additive (ADD COLUMN ... DEFAULT 'public', no CHECK — app-validated per migration-110 policy). Verified: typecheck, lint, 83 blog tests (incl. new blog-access truth table), lint:umlauts — all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
ebc1de2774 |
feat(zeiterfassung): shareable Monatsrapport link for social workers
The approver has to get the monthly report to a referring social worker, who can't log in to the admin report page — and app email isn't reliably deliverable (unauthenticated sending domain). So deliver it the way the codebase already delivers deliverables: an unguessable public bearer link. - Migration 137 `report_shares` (token, user_id, month, revoked_at) — keyed by (user_id, month), since a running month may have no timecard row yet. - `report-shares.ts` service: ensure/lookup/revoke, mirroring the deliverables share_token pattern. - Extract the report body into a shared, presentational `<MonthlyReportSheet>` (+ neutral `<ReportPrintButton>`), reused by the admin page and the new public page — no behaviour change to the admin sheet. - Public `/r/[token]` route (view + print, never indexed, no auth); `/r/` added to proxy BYPASS_INTL. - `<ReportShareCard>` on the admin report page: create / copy / revoke the link. Same access rule as viewing the report (owner or timecard approver). Migration already applied + recorded on prod. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
de9db2f60d |
feat(zeiterfassung): Saldo ledger, monthly reminders, one-click submit — SMALL-Time retirement phase 1
The accounting layer the legacy SMALL-Time punch clock had and we lacked: - migration 136: employment_periods (effective-dated Pensum in weekly minutes, seeded from contract_hours), vacation_entitlements (per person-year + carryover «Übertrag F»), team_profiles opening balance («Übertrag T») + zeiterfassung_reminder_day - src/config/holidays.ts: Kanton-ZH public holidays SSOT (fixed + Easter-derived, deterministic — no yearly maintenance) - lib/team/saldo.ts: pure Zeitsaldo engine — saldo is DERIVED, never typed: opening + Σ(Ist − Soll). Soll from employment periods spread over scheduled weekdays; holidays reduce Soll (no manual Feiertag rows, double-count guard); paid absences fulfil Soll, unpaid don't. 10 tests incl. an exact reproduction of the legacy tool's −56h July example and a mid-year Pensum change - lib/services/saldo.ts + GET /api/timecards/saldo (own; ?user_id= for approvers) — Feriensaldo defaults to 20 days pro-rated by Pensum when HR hasn't set an entitlement (exactly the legacy 60% → 12 Tage rule) - SaldoStrip on /admin/zeiterfassung + compact variant on the team profile tab: Zeitsaldo, Feriensaldo, month Ist/Soll, plus a hint when the schedule template disagrees with the Pensum - monthly reminder: pick a day (ReminderSetting), daily cron /api/cron/timecard-reminders nudges in-app+mail if the month is not submitted — verified end-to-end (approved cards correctly skipped) - one-click «Füllen & einreichen» on an empty draft month (also the reminder's landing action) - all new UI strings in 8 locales Verified in the browser against live data: +27h36 saldo = 90h Ist vs 62h24 Soll-to-date at 24h/week, hand-checked. Phase 2 (tracked): vacation-flow unification, monthly close snapshot + PDF (payroll + social-worker report), HR proxy entry, opening-balance UI, SMALL-Time cutover. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e92df22be1 |
fix(protocols): chunked transcription for long recordings + one retry pipeline (#218)
The 2026-07-16 follow-up incident: after migration 134 unblocked the INSERT, a 63 MB meeting recording still failed with "Fehler bei der Audio-Verarbeitung". Root cause: Groq Whisper caps uploads at ~25 MB and the local faster-whisper fallback only exists in dev — so any recording longer than ~45 minutes could NEVER transcribe on prod, while the upload UI advertised 250 MB. On top of that, the detail-page retry used the legacy /process-audio endpoint, which collapsed the specific error into a generic message. Transcription (root fix): - src/lib/transcription/segment-audio.ts — ffmpeg transcodes big files to 16 kHz mono MP3 and splits them into 15-minute segments (~5 MB each) - transcribeAudio: <=24 MB goes to Groq directly; bigger files are segmented and transcribed chunk by chunk, text joined in playback order; local whisper stays as the dev fallback - selfhost-deploy: idempotently installs ffmpeg on the prod box - process-sources: an empty audio transcription only fails the request when audio was the sole source — typed notes / files still carry the meeting - unit tests for provider selection incl. the chunked path One pipeline (DRY): - Detail-page retry (draft "Inhalt liefern" card + review "Erneut verarbeiten") now posts to the SAME /api/protocols/[id]/process-sources the create page uses — audio and/or text, same specific error messages - Legacy /process and /process-audio routes and their tests deleted; /process-notes stays (direct JSON import without AI), /import-tasks stays - ProtocolDraftInput reworked: one card, audio + text together, "Mit KI strukturieren" instead of "Schritt 2 starten" jargon - Footer actions moved out of the notes-only block: a stuck draft can now be deleted instead of lingering forever Prod verification: - tests/e2e/prod-protocols-smoke.spec.ts + "Prod protocols smoke" workflow (workflow_dispatch): generates real German speech audio with espeak-ng, logs in as the staff E2E account, uploads on /admin/protocols/new, waits for transcription + AI structuring, asserts review state, deletes the protocol. Variants for the direct (<24 MB) and chunked (>24 MB) paths. Claude-Session: https://claude.ai/code/session_01QXEBWjhBB9JYsgLSX4jNES Co-authored-by: Georgy Butaev <georgy.butaev@revamp-it.ch> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
6dc60279e2 |
feat(intake): quality-control pipeline — verdicts, publish gates, buyer-facing test results, QR labels, mobile UX, Kivvi (#212)
Checklist pass/fail/n.a. verdicts with a failed pipeline state; QC publish gate on all three publish paths; buyer-visible test results + verified badge; QR device labels; Vier-Augen-Prinzip on final QA; mobile-first pipeline cards; Kivvi sync from both intake doors. E2E journey updated to the verdict API with a second seeded staff account for four-eyes sign-off. |
||
|
|
6bea23a407 |
feat(teams): team space — AI form assist, task/protocol connections, members-first UI (#216)
* feat(teams): invite members by email + seed Forschung & Entwicklung team Team onboarding gets a full email-invite flow, unified on the existing placeholder-claim mechanism (one path, no parallel invitation table): - Invite by name + email on the team page (super admin): registered staff are added directly and notified; unknown addresses get a placeholder account with the membership plus a claim link (14d, single-use) by email (POST /api/admin/teams/[id]/invitations) - Placeholder "Einladen" can now send the claim link by email (optional address field) instead of clipboard-only delivery - Claim page prefills the email field from the delivery address - Direct member-add notifies the person by email (self-join stays silent) - New templates teamClaimInvite / teamMemberAdded (Swiss German, escaped) - Migration 132 seeds the Forschung & Entwicklung team with Georgy as lead - Docs: EMAILS.md trigger table gains the Teams rows Tests: 18 new (templates + schemas); typecheck, lint, lint:umlauts clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * fix(ci): repair inherited E2E breakage — seed columns + moved admin route Both failures predate this branch (main's last five CI runs fail the same two jobs): - e2e-seed.ts still wrote technician_profiles.is_verified / verification_date, dropped in migration 122 (identity moved to user_profiles in 121). Seed now sets the verified flag on user_profiles, keeping the "verified technician" premise. - inventory-routes.ts pointed at /admin/repairer-applications — the one hardcoded path in the list, which drifted when the section moved. Now uses ROUTES.admin.hrApplications (config-driven like every other row). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * fix(db): recreate ensure_seller_profile() without dropped display_name Migration 122 dropped seller_profiles.display_name but the trigger function from 031 still inserted it, so the first listing insert of any user without a seller_profiles row errored — surfaced by the E2E seed, and a live bug for new P2P sellers. Migration 133 recreates the function inserting only user_id (identity lives on user_profiles since 121). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * fix(e2e): first() on assertions whose text legitimately renders twice Timecard submit ("Zur Prüfung gesendet" in status banner + summary line), tasks empty state, and blog body/excerpt all resolve to two elements, tripping Playwright strict mode — timecard failed every retry, the other two were flaky. Assert on .first(); either occurrence being visible is what the journeys actually verify. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * fix(timecards): race-safe draft creation + stale E2E heading assertion Two concurrent first-hits of GET /api/timecards for the same user+period both passed the existence check and raced the UNIQUE(user_id, period_start, period_end) insert — the loser 500'd ("Zeitkarte konnte nicht geladen werden"). Insert now uses ON CONFLICT DO NOTHING and serves the row the winner created. The timecard journey also asserted a "Zeitkarten" heading on /admin/zeiterfassung — that page's H1 is "Zeiterfassung" (the Zeitkarten approval queue moved to its own page). Assert the real heading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * feat(teams): AI form assist on team create/edit The team-config form (/admin/teams/new) was one of the few creation forms without the shared AIFormAssist bar. Standard two-step wiring: - FORM_AI_REGISTRY entry 'team-config' — describe the team in a sentence and name/purpose/mail_folders/meeting_cadence/accent are filled; accent options derive from the teams config SSOT, no invented mail addresses - AIFormAssist dropped into TeamFormClient (expanded on create, refine available on edit); AI-filled mail_folders array maps onto the form's newline-joined field, accent validated against the config enum - Accent labels hoisted from the component into TEAM_ACCENT_LABELS in src/config/teams.ts (SSOT — form select and AI prompt share one list) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * feat(teams): team space — tasks + protocols connected to the team page The team page becomes a working space by connecting existing systems instead of adding new ones (goals, KPIs, focus, coverage already live there): - Migration 134: optional team_id on tasks + meeting_protocols (ON DELETE SET NULL, indexed) — org-wide records stay untouched - Task form gains an optional Team select (create + edit); protocol form the same (options server-fed from listTeams) - "Neue Aufgabe" / "Neues Protokoll" on the team page preselect the team via ?team= (validated against real teams before prefill) - Team page shows two new panels: open tasks (due-first, assignee + priority) and recent protocols (status-badged), with empty states - New team-space service (SoC: queries only); panels are pure server components reusing config label/color SSOTs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN * fix(teams): members first, one add/invite element below the list The Mitglieder section led with two stacked forms before showing a single member — backwards for a page you mostly read. Now the member list comes first; below it sits ONE card: the staff picker row, and for super admins a fold-out «Noch nicht registriert? Per E-Mail einladen» containing the email invite (no second card, no chrome). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akm86ZwqhiSM2BfdKH96cN --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
ec5ce6babc |
fix(protocols): drop drifted enum CHECKs blocking audio protocols + calmer create form (#214)
Creating a protocol from an audio recording failed on prod: migration 027b used ADD COLUMN IF NOT EXISTS ... CHECK, which silently skips the CHECK when the column already exists — so the stale input_method value list (without 'audio') survived and rejected every valid audio insert. Migration 134 guarantees the input_method column exists and drops all CHECK constraints on meeting_protocols + protocol_action_links by catalog lookup. All of them are hand-synced enum lists already validated at the write boundary via zod schemas derived from src/config/protocols.ts — same policy as migration 110 (notifications). Verified by replaying both the fresh-from- zero and the drifted-prod state in a throwaway Postgres 16. Create form (/admin/protocols/new) noise reduction: - Open-source fallback tools (CaptureAlternatives) move out of the middle of the hero card to a collapsed disclosure at the page bottom — reference material, not part of the flow. - Hero hierarchy now matches usage: drop zone first, record button with its consent checkbox beside it, notes textarea last; the filler "oder / Datei hochladen ↓" spans are gone. - Submit is a plain action row instead of a third card; the format/char-count meta line only renders once there is text. Claude-Session: https://claude.ai/code/session_01QXEBWjhBB9JYsgLSX4jNES Co-authored-by: Georgy Butaev <georgy.butaev@revamp-it.ch> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |