Files
CatoandClaude Fable 5.1 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 21a6b2477, then re-added unsuffixed in e920eb231). Both names are
recorded in production's schema_migrations — backfilled by
083_backfill_schema_migrations.sql, which lists all four filenames — so
neither file can be deleted without a restore-from-backup audit reading it
as a vanished migration.

The bodies are gone; each file keeps a comment with the history. Applied
as a no-op, so the MIGRATION_SUPERSEDED skip list in migration-order.sh
(which existed only because 005's unguarded CREATE TRIGGERs aborted a
second application) is no longer needed and is removed from all three
runners' comments. The deploy script was not run; evidence is read from
the migration files and the runner sources only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* chore(scripts): delete the Strapi-era blog and docker setup scripts

scripts/setup-blog.sh and scripts/start-blog.sh were byte-identical copies
of tools/development/setup-blog.sh and start-blog.sh; all four drove a
Strapi blog that no longer exists (the blog is DB-backed, no compose file
has a Strapi service, and .gitignore's /strapi entry pointed at nothing).
tools/development/docker-setup.sh was the wrapper around the same stack.
Nothing in package.json, CI or the docs invoked any of them; the one
prose mention in docs/guides/system-integration.md now says so.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* fix(i18n): baseline states each missing key once, not once per locale

scripts/baselines/i18n-missing.json listed the same ~90 keys under each of
six locales — six near-identical blocks that jscpd flagged as the repo's
largest clone group. The generator now writes one entry per key naming
the locales it is missing from; the audit converts back to the per-locale
view it compares against, so its regression semantics are unchanged
(0 new, 0 fixed on regeneration).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* refactor(security): one rate limiter over limitkit, lockout kept apart

Two hand-rolled limiters served ~20 routes each: an lru-cache counter in
lib/security/rate-limit.ts and a bare-Map window in lib/auth/rate-limiter.ts.
Both are replaced by the fleet's limitkit (SHARED.md); evig keeps only its
limit VALUES and the call shapes routes were written against, so no route
changed beyond its import. The auth file's account-lockout half — a
per-account, DB-backed state, not rate limiting — lives on as
lib/auth/lockout.ts. AUTH_CONFIG.rateLimit moves next to the other limits
as AUTH_RATE_LIMITS; lru-cache is dropped.

Behaviour that changed underneath, deliberately: sliding windows instead
of a TTL that restarted on every hit, refusals no longer count (a hammered
key recovers when the attacker stops), the client IP is the last
X-Forwarded-For hop (the one Caddy wrote), and the store is bounded. The
login limit was "5 per 15 min then a 30-min block"; limitkit does not
model a punitive block, so it is 5 per sliding 30 minutes — the same
steady-state admission.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

* chore(lint): no-console in src/, and a useMounted hook for the SSR mount flag

App code logs through src/lib/logger.ts, the one console sink. ESLint now
enforces no-console (warn/error allowed) across src/, with the logger and
tests carved out; scripts/ are CLIs whose stdout is their output and stay
uncovered.

Four components each carried a useState(false)+useEffect(setMounted(true))
pair with a react-hooks/set-state-in-effect exception. They share one
useMounted() built on useSyncExternalStore, which needs no effect and no
exception.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 22:42:11 -07:00

97 lines
6.1 KiB
JSON

{
"description": "Known missing translation keys, one entry per key naming the locales it is missing from. The audit fails only on regressions beyond this baseline.",
"defaultLocale": "de",
"locales": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"missing": {
"footer.vision": ["fr", "it", "es", "ja", "ko", "ru"],
"profile.backToMarketplace": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.badgeStaff": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.badgeTechnician": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.errorLoading": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.loading": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.memberSince": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.noOfferingsDescription": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.noOfferingsTitle": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.notFound": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.perHour": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.publicProfile": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.reviewFor": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.reviewsReceived": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.reviewsWritten": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.statListings": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.statPosts": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.statRating": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.statServices": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.statWorkshops": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.tabContent": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.tabListings": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.tabServices": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.tabWorkshops": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.verified": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"profile.viewTechnicianProfile": ["fr", "en", "it", "es", "ja", "ko", "ru"],
"vision.afford.close": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.intro": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w1.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w1.k": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w1.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w2.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w2.k": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w2.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w3.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w3.k": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.afford.w3.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.badge.legal": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.badge.region": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.build.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.build.cta": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.build.k": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.build.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.commercial": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.support.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.support.cta": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.support.k": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.support.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.close.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.intro": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p1.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p1.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p2.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p2.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p3.body": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.p3.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.diff.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.footer.legal": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.future.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.future.p1": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.future.p2": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.future.pull": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.future.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.hero.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.hero.lede": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.hero.tag": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.hero.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.meta.description": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.meta.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.origin.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.origin.p1": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.origin.p2": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.origin.quote": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.research.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.research.p1": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.research.p2": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.research.pull": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.research.title": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.ai": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.eyebrow": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.p1": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.p2": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.pull": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.robot": ["fr", "it", "es", "ja", "ko", "ru"],
"vision.thesis.title": ["fr", "it", "es", "ja", "ko", "ru"]
}
}