[GH-ISSUE #838] Deleting a translated Memory Nag string passes every check, so lost translations ship silently #440

Closed
opened 2026-10-20 17:27:34 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/838

Originally assigned to: @SpicyMarinara on GitHub.

Nothing in the repository notices when a translated Memory Nag interface string is deleted. A pull request can remove one German string, or every German string, and all of the localization checks still pass, so translated text can disappear from the shipped package with a green run.

How to reproduce (try it yourself)

  1. Check out Marinara-Agents at staging 60c8ef0e and confirm git status --short prints nothing.
  2. Open packages/memory-nag/src/engine/packages/client/src/features/memory-nag/locales/de.json and delete the entry for "memoryNag.error.interface". Any key that also exists in en.json works.
  3. Run the three localization checks, reading the exit code of each one directly:
    • node scripts/validate-package-locales.mjs
    • node scripts/validate-package-locale-keys.mjs
    • node scripts/validate-catalog.mjs
  4. Now go further. Replace the whole contents of de.json with just its _meta block, deleting all 71 German strings, and run the same three commands again.
  5. Restore the files with git checkout -- packages/memory-nag/src/engine/packages/client/src/features/memory-nag/locales and confirm git status --short is empty again.

What you'll see: every command exits 0 in both cases. validate-package-locales.mjs prints Memory Nag UI locales valid: 12 catalogs. whether German has 71 strings, 70 strings, or none at all. These are the same commands CI runs at .github/workflows/pull-request-checks.yml lines 61 to 69, so a pull request that drops shipped translations goes green. At runtime the missing strings fall back to English, so the loss is invisible in the interface too: it reads as mixed language copy, never as raw key names.

What should happen: removing a string that a translated catalog already shipped should fail the localization check and name the locale and the key, the same way a new untranslatable key would.

Where it is

At Agents 60c8ef0e, in scripts/validate-package-locales.mjs, the Memory Nag loop:

  • Line 288: if (keys.some((key) => !memoryNagEnglishKeys.includes(key))) { checks only that the translation carries no key English lacks.
  • Lines 291 to 292: the per key loop iterates the translation's own keys, so a key that is absent is never visited.
  • Line 304: console.log(\Memory Nag UI locales valid: ${memoryNagUiLocaleFiles.length} catalogs.`)` reports a file count and nothing else.

The Noodle lane at lines 196 to 211 has the same one way shape, so it has the same blind spot, but its summary at line 248 does print per locale counts (en=1286, de=13, ko=912, pl=13).

Runtime fallback: packages/memory-nag/src/engine/packages/client/src/features/memory-nag/localization.tsx:65, interpolate(catalog[key] ?? catalogs.en[key] ?? key, values).

What's happening

The Memory Nag check is a subset test: it asks whether the translation's keys are all present in English. Deleting a key from a translation makes that set smaller, and a smaller set is still a subset, so the test cannot fail. An empty catalog is the smallest subset of all, which is why wiping a whole language is also silent. Only a deletion from the canonical en.json is still caught, because that leaves the eleven translated catalogs holding keys English no longer has.

The built packages/memory-nag/client.js embeds these strings and the manifest hashes cover the bundle rather than the locale sources, so a source drop is invisible before a rebuild and ships as English fallback after one.

Suggested fix

Commit a baseline of per locale key counts for the package owned interface catalogs, and fail the check when a count falls below its baseline. Raising or lowering a baseline then has to be a deliberate edit in the same pull request that changes the strings. Have the Memory Nag summary line print the counts the way the Noodle line already does (Memory Nag UI locales valid: en=78, de=71, ...) so a reviewer can see the shape at a glance, and apply the same guard to the Noodle lane, which has the identical hole. Full parity between English and every translation is deliberately not the ask here: issue #513 allows community catalogs to stay partial while translations are reviewed, and the Noodle lane already ships very partial catalogs on purpose. The goal is only that what has already shipped cannot vanish quietly.

Context

The Memory Nag check was parity based until PR #776 (merged, commit cac88152), which added the scan range feature and relaxed those two lines to a one way subset test so the untranslated new keys would not break CI. The original feature request behind these catalogs is #513. Engine PR #6137 is Engine only and does not touch this area: git log 49a9c10c..HEAD -- scripts/validate-package-locales.mjs packages/memory-nag CONTRIBUTING.md in this repository is empty, and the relaxed predicate is byte identical at 60c8ef0e. CONTRIBUTING.md lines 172 to 174 do not settle the question either way; the completeness sentence there is about package metadata catalogs, and its "Long-Term Memory" example is a different package. No open issue or pull request covers this.

Found by an AI-assisted sweep and re-verified against Agents 60c8ef0e on 2026-09-13. Please verify before fixing.

Originally created by @kolacheee on GitHub (Sep 13, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/838 Originally assigned to: @SpicyMarinara on GitHub. Nothing in the repository notices when a translated Memory Nag interface string is deleted. A pull request can remove one German string, or every German string, and all of the localization checks still pass, so translated text can disappear from the shipped package with a green run. ## How to reproduce (try it yourself) 1. Check out Marinara-Agents at staging `60c8ef0e` and confirm `git status --short` prints nothing. 2. Open `packages/memory-nag/src/engine/packages/client/src/features/memory-nag/locales/de.json` and delete the entry for `"memoryNag.error.interface"`. Any key that also exists in `en.json` works. 3. Run the three localization checks, reading the exit code of each one directly: - `node scripts/validate-package-locales.mjs` - `node scripts/validate-package-locale-keys.mjs` - `node scripts/validate-catalog.mjs` 4. Now go further. Replace the whole contents of `de.json` with just its `_meta` block, deleting all 71 German strings, and run the same three commands again. 5. Restore the files with `git checkout -- packages/memory-nag/src/engine/packages/client/src/features/memory-nag/locales` and confirm `git status --short` is empty again. **What you'll see:** every command exits 0 in both cases. `validate-package-locales.mjs` prints `Memory Nag UI locales valid: 12 catalogs.` whether German has 71 strings, 70 strings, or none at all. These are the same commands CI runs at `.github/workflows/pull-request-checks.yml` lines 61 to 69, so a pull request that drops shipped translations goes green. At runtime the missing strings fall back to English, so the loss is invisible in the interface too: it reads as mixed language copy, never as raw key names. **What should happen:** removing a string that a translated catalog already shipped should fail the localization check and name the locale and the key, the same way a new untranslatable key would. ## Where it is At Agents `60c8ef0e`, in `scripts/validate-package-locales.mjs`, the Memory Nag loop: - Line 288: `if (keys.some((key) => !memoryNagEnglishKeys.includes(key))) {` checks only that the translation carries no key English lacks. - Lines 291 to 292: the per key loop iterates the translation's own `keys`, so a key that is absent is never visited. - Line 304: `console.log(\`Memory Nag UI locales valid: ${memoryNagUiLocaleFiles.length} catalogs.\`)` reports a file count and nothing else. The Noodle lane at lines 196 to 211 has the same one way shape, so it has the same blind spot, but its summary at line 248 does print per locale counts (`en=1286, de=13, ko=912, pl=13`). Runtime fallback: `packages/memory-nag/src/engine/packages/client/src/features/memory-nag/localization.tsx:65`, `interpolate(catalog[key] ?? catalogs.en[key] ?? key, values)`. ## What's happening The Memory Nag check is a subset test: it asks whether the translation's keys are all present in English. Deleting a key from a translation makes that set smaller, and a smaller set is still a subset, so the test cannot fail. An empty catalog is the smallest subset of all, which is why wiping a whole language is also silent. Only a deletion from the canonical `en.json` is still caught, because that leaves the eleven translated catalogs holding keys English no longer has. The built `packages/memory-nag/client.js` embeds these strings and the manifest hashes cover the bundle rather than the locale sources, so a source drop is invisible before a rebuild and ships as English fallback after one. ## Suggested fix Commit a baseline of per locale key counts for the package owned interface catalogs, and fail the check when a count falls below its baseline. Raising or lowering a baseline then has to be a deliberate edit in the same pull request that changes the strings. Have the Memory Nag summary line print the counts the way the Noodle line already does (`Memory Nag UI locales valid: en=78, de=71, ...`) so a reviewer can see the shape at a glance, and apply the same guard to the Noodle lane, which has the identical hole. Full parity between English and every translation is deliberately not the ask here: issue #513 allows community catalogs to stay partial while translations are reviewed, and the Noodle lane already ships very partial catalogs on purpose. The goal is only that what has already shipped cannot vanish quietly. ## Context The Memory Nag check was parity based until PR #776 (merged, commit `cac88152`), which added the scan range feature and relaxed those two lines to a one way subset test so the untranslated new keys would not break CI. The original feature request behind these catalogs is #513. Engine PR #6137 is Engine only and does not touch this area: `git log 49a9c10c..HEAD -- scripts/validate-package-locales.mjs packages/memory-nag CONTRIBUTING.md` in this repository is empty, and the relaxed predicate is byte identical at `60c8ef0e`. `CONTRIBUTING.md` lines 172 to 174 do not settle the question either way; the completeness sentence there is about package metadata catalogs, and its "Long-Term Memory" example is a different package. No open issue or pull request covers this. Found by an AI-assisted sweep and re-verified against Agents 60c8ef0e on 2026-09-13. Please verify before fixing.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 13, 2026):

SpicyMarinara/Codex is verifying and addressing this in the active release sweep #836. The check will preserve partial community translations while detecting removal of translations that have already shipped.

<!-- gh-comment-id:5653283370 --> @SpicyMarinara commented on GitHub (Sep 13, 2026): SpicyMarinara/Codex is verifying and addressing this in the active release sweep #836. The check will preserve partial community translations while detecting removal of translations that have already shipped.
Sign in to join this conversation.
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
Pasta-Devs/Marinara-Agents#440
No description provided.