Skip to content

ci(i18n): fallar si el inventario de textos está desactualizado (#155) - #158

Merged
egdev6 merged 1 commit into
egdev6:mainfrom
danielgap:ci/i18n-inventory-check
Oct 21, 2026
Merged

egdev6 merged 1 commit into
egdev6:mainfrom
danielgap:ci/i18n-inventory-check

Conversation

@danielgap

@danielgap danielgap commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Related issue / Issue relacionada

Closes #155

ODD: no aplica (tarea type:chore abierta por el mantenedor tras #152). Acordada en #155 (comment) ("ahi va @danielgap"); el campo de asignación quedó en @egdev6.

Scope / Alcance

CI falla si docs/i18n-inventory.md no corresponde a los árboles actuales de src/ y src-tauri/src/.

Archivo Cambio
.github/workflows/ci.yml Paso node scripts/i18n-inventory.mjs --check justo después de npm test, en el job existente (Windows). Sin workflows nuevos.
CONTRIBUTING.md Comando en la tabla y convención: commitear el cambio, regenerar y commitear el documento.
scripts/i18n-inventory.mjs La cabecera apunta a CI y a CONTRIBUTING. Sin cambios de comportamiento.
scripts/i18n-inventory.test.mjs Test de contrato: ci.yml ejecuta --check después de npm ci.
docs/i18n-inventory.md Regenerado: en main estaba desactualizado desde #156.

Ojo con dos efectos para quien contribuya (documentados en CONTRIBUTING):

  • Cada fila lleva su número de línea, así que el check falla cuando cambia un texto y también cuando solo se desplazan líneas en esas carpetas. En la práctica, casi cualquier PR que toque src/ tiene que regenerar el inventario. El error muestra el comando exacto.
  • En PRs, CI hace checkout del merge con main. Si main cambió src/ mientras tanto, hay que actualizar la rama y regenerar de nuevo.

Fuera de alcance: cambios en el generador o en su heurística, workflows nuevos y cualquier parte de L2/L3 de #66. npm test sigue sin depender del estado del documento, como pedía la issue.

Orden con #159 (T2a de #66): las dos ramas regeneran el inventario. Si esta entra primero, actualizo #159 y lo regenero.

Coordination / Coordinación

  • Asignación y solapamientos revisados; acuerdo explícito del mantenedor enlazado arriba.

Contribuidor: @danielgap

Acceptance and validation / Aceptación y validación

  • Criterios cumplidos: paso --check en el job actual de CI y convención documentada (la issue pide ambas cosas).
  • Comprobaciones ejecutadas (Windows 10):
    • Test de contrato: falló antes de añadir el paso; ahora node --test scripts/i18n-inventory.test.mjs da 12/12.
    • node scripts/i18n-inventory.mjs --check: exit 1 sobre main antes de regenerar, exit 0 después.
    • npm test: vitest 603/603; scripts de Node 217/221.
    • Revisión automática independiente (lentes riesgo, legibilidad y fiabilidad): aprobada. Avisos no bloqueantes, como trabajo posterior:
      • el test de contrato busca strings con indexOf y no parsea el YAML;
      • cada desplazamiento de líneas genera diffs grandes en el inventario;
      • el efecto del merge ref descrito arriba.
  • Comprobaciones no ejecutadas: el paso en GitHub Actions, que se verá en los checks de esta PR. Los 4 fallos de Node son EPERM al crear symlinks en Windows (setup-signing, provision-tools), ajenos a este cambio.
  • Bloqueos pendientes: ninguno.

Run `node scripts/i18n-inventory.mjs --check` in the Windows CI job right
after the existing tests, so a pull request that changes or shifts text
in src/ or src-tauri/src/ must regenerate docs/i18n-inventory.md. The
convention is documented in CONTRIBUTING.md and the script header; a
contract test pins the step after `npm ci`. The inventory is regenerated
because main had drifted since egdev6#156.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@egdev6
egdev6 merged commit cd559db into egdev6:main Oct 21, 2026
5 checks passed
egdev6 added a commit to danielgap/quorb that referenced this pull request Oct 21, 2026
egdev6 added a commit that referenced this pull request Oct 21, 2026
* feat(i18n): give meters a stable id across the Rust/JS boundary (#66)

Meter labels are Spanish text that JS logic matched on: short ring labels,
alert dedupe and reset diffing, ring colors, history lookup and React
keys. Translating them would silently break all of that.

Add `Meter.id` (session, weekly, credits, model:<id>, ...) at every
provider construction site and switch that logic to the id. Labels stay
as today, so nothing visible changes. History samples now store the id
and still match legacy label samples until they age out; stored alert
memory keyed by label is honored so no alert repeats after upgrading.

* chore(i18n): regenerar cabecera del inventario tras el merge de main (#158)

---------

Co-authored-by: Quique <egdev6@gmail.com>
Co-authored-by: egdev6 <egdev6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(i18n): detectar inventario de textos desactualizado con --check en CI

3 participants