gap-fill: a typed slot is written by its alias, losing the type

Open
#683 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with tools/translate_locale.py at the per-option slot assertion, then inspect ovos_spec_tools.expand using the provided Python reproduction. Trace how typed slots are rendered and retained when locale lines are written. Done means typed reference spellings are preserved, unmatched slots are refused, and locale_gate.py slot_survival passes across the affected drafted locales.

Written by the indexing model from the issue text.

Description

Auto-generated by Claude Opus 5 for the localize lane, from task T-6290.

Observed

A locale the gap-fill route drafts writes a typed slot by its alias alone, so
the type is lost.

OpenVoiceOS/ovos-skill-alerts locale/en-US/intent/create_timer.intent line
1 declares {duration:duration}. The fa-IR file the route drafted carries
{duration}. The same loss on two more spellings of the same skill:
{date:time} became {time}, and {number:priority} became {priority}.

locale_gate.py slot_survival reads the result as "uses slot(s) en-US does not
declare", in 6 files of that one skill.

Measured on ovos-skill-alerts fa-IR, 184 files: 161 slots in 5 files written
untyped. Restored by hand in OpenVoiceOS/ovos-skill-alerts#376, keyed on the
alias, after which slot_survival passes.

Expected

The written line carries the reference spelling {name:alias}. A line whose
slot matches no reference declaration is refused, as a line that loses a slot
already is.

Reproduce

python3 -c "from ovos_spec_tools import expand; print(expand('(set|start) a timer for {duration:duration}'))"

The expansion renders the slot as {duration}. tools/translate_locale.py
then reads the slots of the EXPANDED option, keeps them verbatim through the
translator, and asserts the same set back. The assertion holds, because the
type was gone before the translator saw the line. Nothing in the route compares
the written line against the reference spelling.

Where

tools/translate_locale.py, the slot assertion around the per-option
translation, and ovos_spec_tools.expand which renders the alias.

Every locale the route has drafted from a reference with a typed slot carries
this, so the repair is a sweep, not one skill.

🤖 Generated with Claude Code

Dominant language
Python
Stars
8
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenVoiceOS/ovos-localize

All issues in OpenVoiceOS/ovos-localize

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.