Skip to content

fix: carry skill_id in message.context for padatious registration - #197

Draft
JarbasAl wants to merge 1 commit into
devfrom
fix/padatious-register-context-arena-fixer-mk1
Draft

fix: carry skill_id in message.context for padatious registration#197
JarbasAl wants to merge 1 commit into
devfrom
fix/padatious-register-context-arena-fixer-mk1

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Sep 8, 2026

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) — NOT human-reviewed. Verify before acting.

runner/intent_pipeline.py's _register_templates builds padatious:register_intent and padatious:register_entity messages with skill_id only in message.data, never in message.context. OVOS-INTENT-4 §3.1 treats message.context['skill_id'] as the authoritative attribution, and ovos-padatious 2.1.2a2 enforces it: it rejects (with a warning log) any registration message missing that context key, the same as adapt and m2v already do. In practice this silently drops every intent the arena registers against a current padatious install.

The fix constructs both messages with context={"skill_id": "arena"} so the mirrored copy sent to extra_bus carries the same context.

Regression test test_registration_carries_skill_id_in_context builds a real PadatiousPipeline on a FakeBus through the runner's actual training path and asserts "play_song" is present in engine.registered_intents after training — the engine's own acceptance state, not an inspection of the outgoing message. Verified fail-before: with the source fix reverted and the test kept, the real ovos-padatious 2.1.2a2 install rejects the registration and the assertion fails (assert 'play_song' in []); restoring the fix makes it pass. The full tests/test_intent_pipeline.py suite passes (24/24).

The test extra's ovos-padatious floor is bumped to >=2.1.2a2 so CI exercises the real rejection path instead of an older, more permissive release.

A full tests/ run on this branch also fails 22 pre-existing tests in test_intent_bench.py, test_runner.py, test_sample_policy.py and test_sample_set_manifest.py, all with ModuleNotFoundError: No module named 'pyarrow'pyarrow is pinned in the audio extra but not test, so a .[test]-only venv lacks it. This is unrelated to intent_pipeline.py and not touched by this change.

runner/intent_pipeline.py's _register_templates built
padatious:register_intent and padatious:register_entity messages with
skill_id only in message.data. OVOS-INTENT-4 §3.1 requires
message.context['skill_id'] as the authoritative attribution; adapt and
m2v already key on it. ovos-padatious 2.1.2a2 enforces this and rejects
(with a WARNING log) registrations that omit it, silently discarding
the arena's benchmark intents.

Fix constructs both messages with context={"skill_id": "arena"} so the
same Message object mirrors correctly onto extra_bus too.

Fail-before: reverting the source fix while keeping the new regression
test (test_registration_carries_skill_id_in_context, which builds a
real PadatiousPipeline on a FakeBus and asserts "play_song" in
engine.registered_intents) makes the assertion fail against a real
ovos-padatious 2.1.2a2 install ("assert 'play_song' in []"); restoring
the fix makes it pass. Full tests/test_intent_pipeline.py suite: 24
passed. Bumped the test extra's ovos-padatious floor to >=2.1.2a2 so CI
exercises the real rejection path.

> 🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) — NOT human-reviewed. Verify before acting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 8, 2026

Copy link
Copy Markdown

I've combed through the code with a fine-tooth comb. 🔍

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

🔍 Lint

Ensuring the quality bar remains high. 📈

ruff: issues found — see job log

🔎 Type Check

Processing complete! Details follow. 📬

mypy: no type errors found

🔨 Build Tests

Everything is bolted down and ready to go. 🔩

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Thanks for making OVOS better today! 🙌

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant