feat(hydra-gates): gate 117 reads PHP and schema strings as missing, not only as unused - #782
Open
rubenvdlinde wants to merge 1 commit into
Open
rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
…not only as unused Every vendored check-l10n.js in the fleet computed `missing` from src/ t() calls alone. PHP and schema JSON, where they were read at all, only cleared an "unused" warning. So no app could see a server-side or schema string that had reached no catalogue. Thirteen distinct versions of that script exist across fifteen repositories, and all thirteen share the defect. This promotes one copy into hydra-gates and widens it: SRC, PHP, MANIFEST and SCHEMA all feed missing. Warning only at launch. Fourteen of twenty-one repos carry inherited findings and openregister alone carries 1,273, so a blocking gate would redden most of the fleet on merge. The runner passes --warn-only and calls _warn, never _fail. Acceptance suite included. Its control asserts that the planted tree reads clean at the incumbent's src-only scope, so the promoted checker is proven to find what the copies could not.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The defect
Every app vendored its own
check-l10n.js. All of them computedmissingthe same way:usedKeyscame from walkingsrc/fort()calls. PHP and schema JSON, where the better copies read them at all, only cleared an "unused" warning. A->t('Approve')with no key inen.jsoncould suppress a warning and could never raise one. No app in the fleet could see a server-side or schema string that had reached no catalogue at all.The drift, measured
Fetched every copy across the 21 core apps at
developmenton 2026-09-19.scripts/andtests/l10n/)missingreads onlysrc/The largest cluster is five identical copies at 7047 bytes (buildiq, decidiq, filinq, hermiq, shillinq). opencatalogi's is the most advanced at 16447 bytes, and even it reads PHP only as a suppressor.
check-l10n-parity.jsis a different check and is left alone.What this ships
hydra-gates/scripts/check-l10n.js, one shared checker reading four sources, each finding tagged with the source that produced it:SRCsrc/**/*.{vue,js,ts},t()andn()PHPlib/,templates/,appinfo/,->t()and->n()MANIFESTsrc/manifest.jsonandsrc/manifest.d/*.jsonSCHEMAlib/Settings/**/*.json, register and schematitleanddescriptionOne deliberate exception: a PHP array value under a rendered field name clears an unused warning but never raises a missing one. Treating those as missing added 63 findings on opencatalogi and the sample was mostly MCP tool descriptions that no person reads. A
->t()call is an unambiguous claim that a string is user facing. An array key is not.Gate 117
l10n-source-coverage, full tree, placed outside any_FAILEDguard.Warning first
Fourteen of twenty-one repos carry inherited findings. openregister alone carries 1,273. All 21 set
enable-hydra-gates: trueand resolve this file at@main, so a blocking launch reddens most of the fleet the minute it merges. The runner passes--warn-onlyand calls_warn, never_fail. Promotion to blocking is two deliberate edits in the gate block, and the l10n debt sweep owns that call.What I verified
scripts/lib/test_gate117_l10n_source_coverage.sh, auto discovered byrun-helper-suites.sh. Five cases, all green.plantedfixture hides one PHP string and one schema title, and leavessrc/and the manifest covered. Run at the incumbent's--source=SRC,MANIFESTscope it reports 0 missing. Run at the full scope it reports 2. The suite asserts both, so the promoted checker is proven to find what the copies could not.lib/Settings/*.jsongives exit 9 with no terminal marker, and the block reports SKIPPED wiring.development@4af8e55a: 368 missing fromen.json, being SCHEMA 319 and PHP 49, and 0 from SRC. The src leg agreeing with the incumbent is the point. The new findings come from the new sources, not from a stricter reading of the old one.bash -nandshellcheck -S errorclean onrun-hydra-gates.sh.Migration
hydra-gates/MIGRATION-check-l10n.md, linked from the README. It covers running the shared checker, comparing counts against the vendored copy, the reason bearingl10n/.l10n-source-ignore.json, and deleting the local copy. No app is changed in this pass.Inherited findings
None introduced. The fleet counts this gate surfaces are pre-existing debt and belong to the l10n sweep, which is why the gate warns.
Base
main. The ten most recent pull requests on this repository all targetmain, and this repository has nodevelopmentbranch.🤖 Generated with Claude Code