You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/scripts/hooks/pre-push

21 lines
894 B

feat(gate): fase B de P0 — la puerta existe y sabe fallar El hallazgo mayor confirmado de la auditoría 2026-08-26: ~16 validadores y 429 ficheros de test que nada ejecutaba (sin CI en ninguna rama de la historia, hooks .sample, eidos-lint sin script npm). Esta fase los cablea: - `check:gate` (scripts/check-gate.ts): svelte-check con política — src/ debe cero; web/ se mide contra el ledger menguante scripts/check-debt.ts (34 ficheros, 71 errores congelados; sólo puede bajar, la disciplina de theming-census-debt). Guard anti-vacío: sin marcador COMPLETED o con conteo que no cuadra, falla — un gate que no inspeccionó nada no pasa. - `eidos:lint` deja de ser invocación cruda (exit 1 real en invalid/dead). - `gate`: check:gate → validadores rápidos → vitest al final. `lint` queda deliberadamente FUERA: hay ~2.300 ficheros de deuda de formato preexistente (nunca se formateó el repo entero; el one-shot pendiente es `npm run format` en árbol quieto y re-añadirlo — documentado en el hook). - scripts/hooks/pre-push: la fuente del hook, SIN armar. Se armó en caliente, bloqueó el push legítimo del eje theming (secuencia mal: verde primero, puerta después) y se desarmó — de paso la puerta demostró que sabe fallar, que era el requisito de verificación de la fase. - .prettierrc endOfLine:auto — neutraliza la clase CRLF/autocrlf de Windows (~350 falsos rojos), sin cambiar formato real. Verificación: check:gate exit 0 sobre HEAD (71 dentro del ledger, src/ a cero tras 9d6533cb7 del eje navigation-menu) · sondeo individual del resto de miembros del gate: verdes salvo los adjudicados en fase A. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 month ago
#!/bin/sh
# P0 fase B (audit 2026-08-26): the gate runs before anything leaves the
# machine. Fast static checks first, the vitest suite last; the
# browser-dependent validators (morfo:check, perm:check, smoke, layer:check)
# stay manual — they need a dev server.
#
# NOT ARMED until fase A is green: arm with
# cp scripts/hooks/pre-push .git/hooks/pre-push
# `lint` is deliberately NOT in the gate yet: the tree carries ~2,300 files
# of pre-existing format debt (never formatted repo-wide; no CI ever ran it).
# The pending one-shot is: `npm run format` as its own commit on a quiet
# tree, then add `npm run lint &&` back to the `gate` script.
#
# Skipping this hook (--no-verify) is forbidden by CLAUDE.md except when the
# user explicitly asks.
echo "pre-push: running npm run gate (fast checks + tests)..."
npm run gate || {
echo "pre-push: gate FAILED — push rejected."
exit 1
}

Powered by TurnKey Linux.