Skip to content

Commit 0d185cf

Browse files
JarbasAlclaude
andcommitted
test: account for §9.2 matched + §8.1 start in activate/fallback e2e
The converse-deactivate (test_activate) and fallback (test_fallback) ovoscope scenarios each gain two captured messages now that the orchestrator emits ovos.intent.matched (§9.2) and ovos.intent.handler. start (§8.1) natively before every dispatch — previously the spec trio existed only as uncounted bridge-mirrors of workshop's legacy emit. Verified on a real minicroft: the two extra messages per scenario are exactly ovos.intent.matched + ovos.intent.handler.start (the reserved-name converse:skill / fallback .request dispatches carry no mycroft.skill.handler.* done-signal, so their §8 terminal resolves via the §8.3 timeout after the end-marker, not captured). No spec-topic double-emit: ovos.intent.matched, ovos.intent.handler.start and ovos.utterance.handled each appear exactly once per utterance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 810ecbf commit 0d185cf

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

test/end2end/test_activate.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
SPEC_UTTERANCE = SpecMessage.UTTERANCE.value # ovos.utterance.handle
1414
LEGACY_UTTERANCE = migration_counterpart(SPEC_UTTERANCE) # recognizer_loop:utterance
1515
UTTERANCE_HANDLED = SpecMessage.UTTERANCE_HANDLED.value # ovos.utterance.handled
16+
# PIPELINE-1 orchestrator-emitted matched-path messages: §9.2 ovos.intent.matched
17+
# (before dispatch) and §8.1 ovos.intent.handler.start. The converse:skill
18+
# dispatch is a reserved-name dispatch with no mycroft.skill.handler.* done-signal,
19+
# so its §8 terminal resolves via the §8.3 timeout (after the end-marker, not
20+
# captured here).
21+
INTENT_MATCHED = SpecMessage.INTENT_MATCHED.value # ovos.intent.matched (§9.2)
22+
HANDLER_START = SpecMessage.INTENT_HANDLER_START.value # ovos.intent.handler.start (§8.1)
1623

1724
# The two namespace paths the utterance-injecting scenario is run on.
1825
# key -> (modernize, emit_legacy, utterance_topic)
@@ -199,6 +206,16 @@ def _run_deactivate_inside_converse(self, namespace):
199206
Message(f"{self.skill_id}.activate",
200207
data={},
201208
context={"skill_id": self.skill_id}),
209+
# PIPELINE-1 §9.2: matched notification precedes the dispatch
210+
Message(INTENT_MATCHED,
211+
data={"skill_id": self.skill_id,
212+
"intent_name": "converse:skill"},
213+
context={"skill_id": self.skill_id}),
214+
# PIPELINE-1 §8.1: orchestrator start immediately before the dispatch
215+
Message(HANDLER_START,
216+
data={"skill_id": self.skill_id,
217+
"intent_name": "skill"},
218+
context={"skill_id": self.skill_id}),
202219
Message("converse:skill",
203220
data={"utterances": ["deactivate skill from within converse"], "lang": session.lang,
204221
"skill_id": self.skill_id},

test/end2end/test_fallback.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
LEGACY_UTTERANCE = migration_counterpart(SPEC_UTTERANCE)
2424
SPEC_SPEAK = SpecMessage.SPEAK.value
2525
UTTERANCE_HANDLED = SpecMessage.UTTERANCE_HANDLED.value
26+
# PIPELINE-1 orchestrator-emitted matched-path messages: §9.2 ovos.intent.matched
27+
# (before dispatch) and §8.1 ovos.intent.handler.start. The fallback pipeline's
28+
# dispatch carries no mycroft.skill.handler.* done-signal, so its §8 terminal
29+
# resolves via the §8.3 timeout (after the end-marker, not captured here).
30+
INTENT_MATCHED = SpecMessage.INTENT_MATCHED.value
31+
HANDLER_START = SpecMessage.INTENT_HANDLER_START.value
2632

2733
# key -> (modernize, emit_legacy, utterance_topic)
2834
NAMESPACE_PATHS = {
@@ -73,6 +79,15 @@ def _run_fallback_match(self, namespace: str) -> None:
7379
Message("ovos.skills.fallback.ping",
7480
{"utterances": ["hello world"], "lang": session.lang, "range": [90, 101]}),
7581
Message("ovos.skills.fallback.pong", {"skill_id": self.skill_id, "can_handle": True}),
82+
# PIPELINE-1 §9.2: matched notification precedes the dispatch. The
83+
# fallback match_type is the .request topic; it bears no ':' so
84+
# skill_id/intent_name resolve to that topic.
85+
Message(INTENT_MATCHED,
86+
data={"intent_name": f"ovos.skills.fallback.{self.skill_id}.request",
87+
"utterance": "hello world", "lang": session.lang}),
88+
# PIPELINE-1 §8.1: orchestrator start immediately before the dispatch
89+
Message(HANDLER_START,
90+
data={"intent_name": f"ovos.skills.fallback.{self.skill_id}.request"}),
7691
Message(f"ovos.skills.fallback.{self.skill_id}.request",
7792
{"utterances": ["hello world"], "lang": session.lang, "range": [90, 101], "skill_id": self.skill_id}),
7893
Message(f"ovos.skills.fallback.{self.skill_id}.start", {}),

0 commit comments

Comments
 (0)