Skip to content

fix: the legacy register_vocab names the registering skill - #622

Merged
JarbasAl merged 1 commit into
devfrom
fix/legacy-vocab-producer-identity
Sep 16, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/legacy-vocab-producer-identity

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Sep 9, 2026

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Opus 5 (claude-opus-5) via Claude Code — NOT human-reviewed. Verify before acting.

A skill that registers a keyword while handling another component's message shipped that component as the owner of its vocabulary, while the intent referencing that vocabulary went out attributed correctly. One registration, two owners.

The split

register_keyword dual-emits: the spec ovos.intent.register.keyword and the legacy register_vocab. It stamps a forwarded copy with its own skill_id for the spec side, then hands that copy to emit_legacy_register_intent.

emit_legacy_register_vocab did not receive it. It dug the ambient message itself and stamped only when the context had none:

msg = dig_for_message() or Message("")
if "skill_id" not in msg.context:
    msg.context["skill_id"] = self.skill_id

The adapt engine reads the legacy producer from the context, so when the dug message belonged to someone else the vocabulary was indexed under that component and the intent under the registering skill. The fix passes the stamped copy in, matching the sibling.

Why this is the stable vintage, not the alpha

Nothing bridges a legacy producer onto the INTENT-4 registration topics — that rename is an N→1 consolidation and ovos-spec-tools excludes it from the migration map. The spec side is therefore reached only by spec-adopting producers, which stamp unconditionally and cannot disagree with themselves.

The legacy register_vocab path has no such protection: it is what every deployed adapt consumer reads, on the pins that ship.

Verification

Three tests, and they are not all the same kind:

Test Before After
test_legacy_vocab_is_attributed_to_the_registering_skill fails passes
test_legacy_and_spec_agree_on_the_producer fails passes
test_the_dug_message_is_not_mutated passes passes

The third is a pin, not a regression test: the old code only wrote into the dug message when the context had no skill_id, so the foreign message in this fixture was never mutated. It holds the property the new code makes unconditional.

Full unit suite in a clean venv: 721 passed, 22 subtests, no new warning under -W default.

Not in this change

Three sites in the same class keep the conditional stamp — register_adapt_regex, set_context and remove_context. set_context and remove_context already stamp a forward correctly on their keyed path, and #605 is open across both, so they are left to it rather than conflicted here.

emit_legacy_register_vocab dug the ambient message and stamped the
producer only when the context had none, so a skill registering while
handling another component's message shipped that component as the owner
of its vocabulary while the intent referencing it went out attributed
correctly. It now takes the caller's stamped copy, as its
register_intent sibling already does.
@github-actions github-actions Bot added the fix label Sep 9, 2026
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d8c76873-f49e-49e1-ae4e-c397adf08b14


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Hey! I've got some fresh data on your pull request. 📈

I've aggregated the results of the automated checks for this PR below.

📋 Repo Health

Ensuring the repo is staying active (aka commit frequency). 🏃‍♂️

✅ All required files present.

Latest Version: 9.7.4a1

ovos_workshop/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_workshop/version.py has valid version block markers

🔒 Security (pip-audit)

I've scanned the dependencies for any hidden surprises. 🔍

✅ No known vulnerabilities found (72 packages scanned).

📡 Channel Compat — stable

I've got some results for you! 📝

🚧 Channel unresolvable with this checkout — the repo's dependency floors exceed what the channel pins (fleet finding; see the install log).

Constraints: https://raw.githubusercontent.com/OpenVoiceOS/OpenVoiceOS/main/constraints-stable.txt
Resolved stack: channel-compat-stable artifact (constraints + pip freeze).

📡 Channel Compat — testing

Checking if everything is still on track. 🛤️

🚧 Channel unresolvable with this checkout — the repo's dependency floors exceed what the channel pins (fleet finding; see the install log).

Constraints: https://raw.githubusercontent.com/OpenVoiceOS/OpenVoiceOS/main/constraints-testing.txt
Resolved stack: channel-compat-testing artifact (constraints + pip freeze).

🔨 Build Tests

Verifying the structural soundness of your build. 🏗️

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Keeping the bits in line, one repo at a time. 🔣

@JarbasAl
JarbasAl marked this pull request as ready for review September 16, 2026 17:24
@JarbasAl
JarbasAl merged commit 6bd6ba8 into dev Sep 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant