Skip to content

refactor: Optimización del pipeline CI y tooling local para fase de transición#171

Merged
trbureiyan merged 5 commits into
devfrom
workflow/quality-assurance-pipeline
Apr 8, 2026
Merged

refactor: Optimización del pipeline CI y tooling local para fase de transición#171
trbureiyan merged 5 commits into
devfrom
workflow/quality-assurance-pipeline

Conversation

@trbureiyan
Copy link
Copy Markdown
Owner

@trbureiyan trbureiyan commented Apr 8, 2026

Descripción:

Se implementa la estrategia de estabilidad continua diseñada para mitigar fallos durante la refactorización parcial y normalizacion de DevurityWeb. Adapta la infraestructura de revisión a la inestabilidad actual del backend mientras mantiene un tipado estricto.

Cambios principales:

  • GitHub Actions (ci.yml): Se aislaron temporalmente los servicios de PostgreSQL y los pasos de migración/seeding de la base de datos para evitar bloqueos innecesarios. Se estableció npx tsc --noEmit como la barrera principal para detectar desincronizaciones entre cliente y servidor.
  • CodeRabbit (.coderabbit.yaml): Se integró el esquema oficial de revisión v2. El asistente opera ahora bajo el perfil chill, generando únicamente resúmenes de alto nivel funcionales, desactivando comentarios invasivos por línea y con directrices explícitas para mantener un tono técnico (cero emojis).
  • Prevención Local (Husky): Se configuraron hooks locales con lint-staged. Las subidas de código ahora requieren superar el linter en la fase de pre-commit y el type-check de TypeScript en la fase de pre-push ("fail fast").

Note

Los servicios y tests de la base de datos en el CI se mantienen comentados. Deberán ser re-habilitados una vez el equipo de backend y QA (@Arekkazu @Manuel-Yasno ) normalice las secuencias, defina el plan de pruebas y consolide la estabilidad de Prisma.

- ci.yml: comentar servicio postgres y steps de BD; agregar tsc --noEmit
- .coderabbit.yaml: perfil chill, auto-review en main y dev, sin tests ni inline comments
- .husky/pre-commit: lint-staged en archivos .ts/.tsx staged
- .husky/pre-push: tsc --noEmit como barrera de tipos
- package.json: agregar prepare script, lint-staged config, husky@9.1.7 y lint-staged@16.4.0 (versiones exactas)
Introduce secciones para el estilo de comunicación, tono y formato: prohíbe emojis, recomienda usar bloques de alerta de GitHub y mantiene un lenguaje técnico y profesional.
Se añaden configuraciones para revisión automatizada avanzada: instrucciones de notas de versión en español, control de walkthrough (resumen de alto nivel, diagramas, archivos cambiados), activación de IA (in_progress_fortune, enable_prompt_for_ai_agents), detección de slop y nuevas métricas de revisión (estimar esfuerzo, issues/PRs relacionados y reviewers sugeridos).
@trbureiyan trbureiyan added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file chore Cambios de mantenimiento, dependencias, config y limpieza de código sin afectar funcionalidad ci Cambios en CI/CD, GitHub Actions, automatización de build y deploy testing Configuración de test runners, cobertura, tests unitarios e integración labels Apr 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devurity-web Ready Ready Preview, Comment Apr 8, 2026 7:59pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Se añaden configuraciones de revisión automática (.coderabbit.yaml), hooks de Git (pre-commit y pre-push), ajustes en CI para omitir Postgres y ejecutar TypeScript check, integración de lint-staged/Husky en package.json y plantillas/documentación nuevas (.github/pull_request_template.md, AGENTS.md).

Changes

Cohort / File(s) Summary
Configuración de CodeRabbit
.coderabbit.yaml
Nueva configuración para CodeRabbit: idioma es-ES, perfil chill, auto-revisión para main/dev, exclusiones de drafts y palabras clave, desactiva request-changes línea a línea, habilita resúmenes de alto nivel y detección de slop; ajusta herramientas y reporting.
Flujo de CI/CD
.github/workflows/ci.yml
Se comentan/retiran servicios y pasos de PostgreSQL y migraciones/seed; se introduce paso TypeScript check (npx tsc --noEmit) y se mantienen lint y build de Next.js.
Hooks Git
.husky/pre-commit, .husky/pre-push
Añadidos hooks: pre-commit ejecuta npx lint-staged; pre-push ejecuta npx tsc --noEmit.
Dependencias y Scripts
package.json
Agrega prepare script para Husky, añade husky@9.1.7 y lint-staged@16.4.0, y configuración lint-staged para ejecutar eslint --max-warnings=0 en *.{ts,tsx}.
Documentación / Plantillas
AGENTS.md, .github/pull_request_template.md
AGENTS.md incorpora sección "Communication, Tone & Formatting" (restricciones sobre emojis y formato de mensajes). Añade plantilla de PR en español con versión completa y abreviada.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed El título es específico y directamente relacionado con los cambios principales: optimización del pipeline CI (desactivación de PostgreSQL, adición de type-checking) y configuración del tooling local (Husky, lint-staged, CodeRabbit). Resume la esencia de la refactorización.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch workflow/quality-assurance-pipeline

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

57-58: Considerar usar instalación determinística con lockfile.

El workflow usa npm ci, pero según las directrices del proyecto se recomienda pnpm install --frozen-lockfile para instalaciones determinísticas.

Cambio sugerido
      - name: Install dependencies
-       run: npm ci
+       run: pnpm install --frozen-lockfile

Nota: Esto requiere agregar un paso previo para instalar pnpm:

      - name: Setup pnpm
        uses: pnpm/action-setup@v4
        with:
          version: 10

Based on learnings: "Use deterministic installs: prefer pnpm install --frozen-lockfile"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 57 - 58, La acción de CI usa el paso
"Install dependencies" que ejecuta `npm ci`; cámbialo a una instalación
determinística usando PNPM: añade antes un paso "Setup pnpm" que use
`pnpm/action-setup@v4` (especificando la versión, p. ej. 10) y reemplaza el
comando `npm ci` en el paso "Install dependencies" por `pnpm install
--frozen-lockfile` para respetar el lockfile del repositorio.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 57-58: La acción de CI usa el paso "Install dependencies" que
ejecuta `npm ci`; cámbialo a una instalación determinística usando PNPM: añade
antes un paso "Setup pnpm" que use `pnpm/action-setup@v4` (especificando la
versión, p. ej. 10) y reemplaza el comando `npm ci` en el paso "Install
dependencies" por `pnpm install --frozen-lockfile` para respetar el lockfile del
repositorio.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 89d296d9-6d95-49e0-81cf-c8c0bb581441

📥 Commits

Reviewing files that changed from the base of the PR and between 0060d5a and 7231cd9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .coderabbit.yaml
  • .github/workflows/ci.yml
  • .husky/pre-commit
  • .husky/pre-push
  • AGENTS.md
  • package.json

Se añade .github/pull_request_template.md con plantilla detallada (versión completa y abreviada) para guiar descripciones, criterios de aceptación y pruebas.
Añade la directriz de seguir una estructura limpia.
@Arekkazu
Copy link
Copy Markdown
Collaborator

Arekkazu commented Apr 8, 2026

No apruebo las asignaciones debido a que no han sido cometnadas anteriormente

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/pull_request_template.md:
- Line 14: Añade una línea en blanco antes y otra después de cada tabla que
genera MD058 en el archivo (por ejemplo la tabla que comienza con la fila "|
Campo | Detalle |") para cumplir con markdownlint; localiza cada instancia de
tablas similares en el mismo archivo (las que empiezan en las líneas indicadas
por el comentario) y asegura que haya exactamente una línea en blanco por encima
y otra por debajo de cada bloque de tabla.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3184d753-532c-48d4-9ba2-6790e08cb6ab

📥 Commits

Reviewing files that changed from the base of the PR and between 7231cd9 and a9bc26a.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • .github/pull_request_template.md
✅ Files skipped from review due to trivial changes (1)
  • .coderabbit.yaml

Comment thread .github/pull_request_template.md
@trbureiyan trbureiyan merged commit 500ee69 into dev Apr 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Cambios de mantenimiento, dependencias, config y limpieza de código sin afectar funcionalidad ci Cambios en CI/CD, GitHub Actions, automatización de build y deploy dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation testing Configuración de test runners, cobertura, tests unitarios e integración

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants