[3] Add lefthook support #4

Merged
hobbypunk merged 5 commits from chore/3_lefthook into main 2026-09-25 13:40:28 +00:00
Owner
No description provided.
🔧 (base_app.iml): remove IDE-specific Ruby on Rails module configuration
All checks were successful
CI / scan_ruby (push) Successful in 33s
CI / lint (push) Successful in 35s
CI / test (push) Successful in 45s
CI / system-test (push) Successful in 51s
45d64d142a
⬆️ (gems): update Ruby gem dependencies to latest compatible versions

⬆️ (ruby): update Ruby gem dependencies to latest compatible versions

🔧 (project): update module version from 3 to 4 in RModuleSettingsStorage

🔧 (base_app.iml): update module configuration to point to secrets directory instead of solid_cache config

🔧: remove RubyCoverageRunConfigurationExtension and vcs.xml from IDEA config
🌐 (locales): reorder and restructure German locale files for better organization and consistency

🌐 (errors.de.yml): reorder password validation error messages for consistency

🌐 (locales): reorder and restructure German translations for improved consistency and readability

🌐 (locales): reorder and restructure German locale files for better organization and consistency

🔧 (schema/db): update database schema with stricter constraints and add lefthook config

✨ (lefthook/mise): add lefthook git hooks and mise configuration

- `mise.toml`: lefthook 2.1.14 ergänzt – bewusst mise-native statt als Gem (Go-Binary, kein Bundler-Boot in den Hooks, mise.toml bleibt Single Source of Truth für Tools)
- `Gemfile`: i18n-tasks, active_record_doctor (ohne `require: false` – der Railtie registriert die Rake-Tasks) und database_consistency in der development-Gruppe ergänzt
- `lefthook.yml`: Neu angelegt (adaptiert aus der Arbeits-Vorlage) – pre-commit parallel mit bundle check, active_record_doctor, database_consistency, RuboCop-Autocorrect mit `stage_fixed` und i18n normalize+health; pre-push mit Branch-Validierung; post-checkout/merge/rewrite mit mise+bundle+bun-Sync; prepare-commit-msg hängt `.opencode-changes.md`-Einträge und Co-Authored-By an die Commit-Message
- Branch-Validierungsscript (in `.lefthook/pre-push/`): setzt die Branch-Namenskonvention aus der AGENTS.md durch (`<label>/<issue-nummer>_<snake>`), Ausnahmen für main/develop/renovate/dependabot
- `bin/setup`: `lefthook install` ergänzt
- `config/i18n-tasks.yml`: Neu angelegt – `app` als relative_root (Phlex leitet t(".key")-Scopes aus Klassennamen ab, das Leading-Segment ist Teil des Pfades), Mailer-Templates von der Suche ausgeschlossen, `ignore_unused`-Strategie für dynamisch erzeugte Key-Familien (Flashable, Actionable, human_attribute_*, Validators, JS, MJML-Mailer); health läuft sauber durch
- `config/locales/*.de.yml`: Alle Dateien von `i18n-tasks normalize` sortiert/neu strukturiert; außerdem fehlenden Key `views.admin.edit.social_media.description` ergänzt (Admin-Seite rief ihn mit `default: ""` auf) und toten Key `views.settings.profile.edit.social_media.title` entfernt (Titel kommt dynamisch via human_attribute_name)
- `config/locales/helpers.de.yml`: Fehlenden Key `ransack.all: Alle` ergänzt (Admin-User-Filter nutzt ihn)
- `app/models/user.rb`: `dependent: :delete_all` für sessions, identities, passkeys und events (Modelle haben laut active_record_doctor keine Callbacks); visits bleibt `:destroy`, da Ahoy::Visit Callbacks hat
- `db/migrate/20260925120000_harden_user_references.rb` und `db/schema.rb`: Von den neuen Hooks gefundene Schema-Lücken geschlossen – NOT NULL auf user_identities.provider/uid und users.username (inkl. `limit: 30` passend zum Length-Validator), redundanter Einzel-Index auf user_identities.user_id entfernt (vom Composite abgedeckt), Foreign Keys für sessions/user_identities/user_passkeys mit `on_delete: :cascade` passend zu `dependent: :delete_all`, und ein eindeutiger Expression-Index `lower(username)` ergänzt, damit die case-insensitive Username-Uniqueness auch auf DB-Ebene garantiert ist (der plain Index bleibt für direkte Lookups erhalten)
- `.database_consistency.yml`: `MissingUniqueIndexChecker`-Ignore für `User lower(username)` entfernt – seit der Expression-Index existiert, besteht der Checker ohne Ausnahme
- `.active_record_doctor.rb` und `.database_consistency.yml`: Neu angelegt – Multi-DB-Modelle (Solid Cache/Queue/Cable) für die Inspektion über die Primary-Connection ausgeschlossen, UUID-bedingte False Positives und gem-eigene Tabellen (ahoy) dokumentiert ignoriert; beide Tools laufen mit Exit 0
Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@users.noreply.github.com>
Merge branch 'main' into chore/3_lefthook
All checks were successful
CI / scan_ruby (pull_request) Successful in 1m29s
CI / lint (pull_request) Successful in 1m32s
CI / system-test (pull_request) Successful in 1m56s
CI / test (pull_request) Successful in 1m58s
255deaeb7a
Merge branch 'main' into chore/3_lefthook
All checks were successful
CI / lint (pull_request) Successful in 58s
CI / scan_ruby (pull_request) Successful in 1m0s
CI / system-test (pull_request) Successful in 1m9s
CI / test (pull_request) Successful in 1m10s
12a19e970f
hobbypunk deleted branch chore/3_lefthook 2026-09-25 13:40:28 +00:00
hobbypunk referenced this pull request from a commit 2026-09-25 13:40:29 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hobbypunk/rails-base_app!4
No description provided.