fix: carry skill_id in message.context for padatious registration - #197
Draft
JarbasAl wants to merge 1 commit into
Draft
fix: carry skill_id in message.context for padatious registration#197JarbasAl wants to merge 1 commit into
JarbasAl wants to merge 1 commit into
Conversation
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>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I've combed through the code with a fine-tooth comb. 🔍I've aggregated the results of the automated checks for this PR below. 🔍 LintEnsuring the quality bar remains high. 📈 ❌ ruff: issues found — see job log 🔎 Type CheckProcessing complete! Details follow. 📬 ✅ mypy: no type errors found 🔨 Build TestsEverything is bolted down and ready to go. 🔩 ✅ All versions pass
Thanks for making OVOS better today! 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
runner/intent_pipeline.py's_register_templatesbuildspadatious:register_intentandpadatious:register_entitymessages withskill_idonly inmessage.data, never inmessage.context. OVOS-INTENT-4 §3.1 treatsmessage.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 toextra_buscarries the same context.Regression test
test_registration_carries_skill_id_in_contextbuilds a realPadatiousPipelineon aFakeBusthrough the runner's actual training path and asserts"play_song"is present inengine.registered_intentsafter 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 fulltests/test_intent_pipeline.pysuite passes (24/24).The test extra's
ovos-padatiousfloor is bumped to>=2.1.2a2so 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 intest_intent_bench.py,test_runner.py,test_sample_policy.pyandtest_sample_set_manifest.py, all withModuleNotFoundError: No module named 'pyarrow'—pyarrowis pinned in theaudioextra but nottest, so a.[test]-only venv lacks it. This is unrelated tointent_pipeline.pyand not touched by this change.