Skip to content

RFC-0045 MCP: re-translating a repeater by item paths is refused, but get_translation_source still offers paths and not the whole list #218

Closed

Description

@Madraka

This came up in the final check of #216 (RFC-0045 step 5). Verification was split 1/2, below the merge gate. It cannot happen today, because the reference and repeater types stay refused until step 7. Fix it before step 7.

What happens. After round 3 of #216, save_translation refuses item paths with translation_shape_mismatch ("send the whole list") once the translation holds its own list for a localized repeater. That is always the case after the first save by paths. get_translation_source still has two gaps:

  • It lists that repeater's item paths (agenda/0/topic, …).
  • It does not return the source's whole list, in source order and with the non-text sub-values. translationSourceFields strips fields from source.

An agent following list_stale_translations → get_translation_source → save_translation is therefore refused, and the tools do not hand it what the error asks for. The translation_shape_mismatch hint in field-hints.ts and the TRANSLATED_FIELDS and tool descriptions still describe the earlier rule.

Docs mismatch. The round-3 changeset and the "Amended in 5" bullet say any whole list of another length is refused. The check in baseList runs only when item paths come in the same call; a whole list sent alone is stored as sent. Either qualify the docs, which is probably right because a whole list is the translation's own, or enforce the check.

Fix.

  1. When the existing translation holds its own list for a localized repeater, get_translation_source returns the source's whole list for that key instead of item paths, and says it must be sent back whole.
  2. Update the hint and the descriptions.
  3. Qualify the docs.
  4. Add a test for the stale → re-translate flow.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions