fix: intent-layers e2e + utterance.handled test, bump pins#446
Conversation
test_layers_advance_in_sequence_and_gate_intents and test_inactive_layer_intents_do_not_match fail identically on a clean origin/dev checkout with none of this PR's changes applied: the layer context token is never applied (ovos_workshop/decorators/layers.py), so gated intents never match. xfail them here to unblock this PR's CI; the underlying layers bug needs its own fix in a separate PR. Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
The automated inspectors have submitted their report. 🕵️♂️I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthScanning for any signs of 'orphaned' code limbs. 🦾 ✅ All required files present. Latest Version: ✅ ⚖️ License CheckEverything looks good on the legal front. ✅ ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔒 Security (pip-audit)Cybersecurity sweep: checking for vulnerabilities. 🕸️ ✅ No known vulnerabilities found (73 packages scanned). 🔨 Build TestsEnsuring no loose screws in the assembly. 🔩 ✅ All versions pass
🔍 LintProcessing complete! Details follow. 📬 ❌ ruff: issues found — see job log Your friendly neighborhood bot 🕷️ |
…xfails The hard CI failure on this branch was the stale test_on_event_end_is_intent_still_emits_utterance_handled: #442's _core_owns_utterance_handled() guard suppresses workshop's ovos.utterance.handled emission when ovos-core >= 2.3.0a1 (the orchestrator owns the PIPELINE-1 §9.5 end-marker on the matched path), which CI now installs. The #440 assertion is therefore stale. - test_base.py: replace the stale single test with two deterministic branches (both monkeypatch _core_owns_utterance_handled): * _defers_utterance_handled_to_core — modern core (>=2.3.0a1); workshop must NOT emit ovos.utterance.handled. * _emits_utterance_handled_legacy — absent/old core; workshop still emits (migration-window back-compat). - pyproject.toml: bump floors to the alphas carrying the singleton-registry SessionManager + §9.5 orchestrator ownership: ovos_bus_client >= 2.6.2a2, ovos-spec-tools >= 1.2.3a1, ovos-core >= 2.4.0a1 (test), ovos-adapt-parser >= 1.4.2a1 (test). The two intent-layers e2e xfails added by this PR stay: under the spec's 'every session folds' model (OVOS-CONTEXT-1 §4 / OVOS-SESSION-1), the legacy add_context/in-place context mutation is wiped by the next fold — the genuine fix is to migrate IntentLayers to session.intent_context via ovos.session.sync (§5.3), tracked separately.
4e95492 to
1d62e45
Compare
…s-utils floor The two intent-layers e2e tests xfailed in this PR are fixed upstream by OpenVoiceOS/ovos-utils#396: FakeBus.emit was folding the message session AFTER the bus handlers ran, using a pre-mutation emit-time snapshot, which wholesale-replaced the SessionManager singleton (Session.update_from is last-writer-wins) and wiped every in-place / synced session mutation the handlers made — notably handle_add_context injecting the layer token into sess.context. The #396 fix reorders FakeBus.emit to fold BEFORE handlers (matching MessageBusClient.on_message receive -> fold -> handle order) and drops the post-handler self-broadcast-back fold, so the legacy add_context -> sess.context frame mechanism survives under folding again. No workshop change is needed; the IntentLayers code is unchanged. - test_intent_layers_e2e.py: revert the xfail markers added in 2aee2bd; both tests pass once ovos-utils >= 0.13.3a2 lands. - pyproject.toml: bump ovos-utils floor to >= 0.13.3a2 (pending #396 release).
Genuine root-cause fixes for the failing tests on this branch.
intent-layers e2e (the two xfailed tests) — fixed upstream in OpenVoiceOS/ovos-utils#396
activate_layer()->set_context()->add_context->handle_add_contextinjects thelayer_<name>token into the default-sessionSessionManagersingleton'scontextin place. The token was then wiped before the next match:FakeBus.emitwas folding the message's session onto the singleton AFTER the bus handlers ran, using a pre-mutation emit-time snapshot —Session.update_fromis last-writer-wins per field (OVOS-SESSION-1 §2), so the post-handler fold wholesale-replaced the singleton'scontextwith a stale (token-less) snapshot. Gated intents never matched.#396 fixes the ordering:
FakeBus.emitnow folds before handlers (matchingMessageBusClient.on_messagereceive -> fold -> handle order) and drops the post-handler self-broadcast-back fold. The legacyadd_context->sess.contextframe mechanism then survives under folding — no workshop change needed (IntentLayersis unchanged). Spec-faithful (every session, default included, still folds — no owner-only guard; the earlier guard attempt #395 was correctly rejected) and backward compatible.This PR:
test_intent_layers_e2e.py: revert thexfailmarkers added in2aee2bd; both tests pass onceovos-utils >= 0.13.3a2(Release 8.0.3a1 #396 release) lands.pyproject.toml: bumpovos-utilsfloor to>= 0.13.3a2.utterance.handled test (the hard CI failure) — fixed here
test_on_event_end_is_intent_still_emits_utterance_handled(#440) asserted_on_event_end(is_intent=True)emitsovos.utterance.handled. #442's_core_owns_utterance_handled()guard suppresses that emission whenovos-core >= 2.3.0a1— the orchestrator owns the PIPELINE-1 §9.5 end-marker on the matched path. CI now installsovos-core==2.4.0a1, so the #440 assertion is stale. Replaced with two deterministic monkeypatched branches:test_on_event_end_intent_defers_utterance_handled_to_core— modern core; workshop must NOT emit it.test_on_event_end_intent_emits_utterance_handled_legacy— absent/old core; workshop still emits (migration-window back-compat).Pin floors (match CI)
ovos_bus_client >= 2.6.2a2(singleton-registrySessionManager),ovos-spec-tools >= 1.2.3a1,ovos-core >= 2.4.0a1(test, §9.5),ovos-adapt-parser >= 1.4.2a1(test),ovos-utils >= 0.13.3a2(pending #396 release).Sequencing
The two layer-e2e tests' CI stays red until OpenVoiceOS/ovos-utils#396 merges and releases
0.13.3a2. Merge #396 first, then this.Verified locally with the #396 fix installed: both
test_intent_layers_e2e.pytests pass and the three_on_event_endtests pass (releasedovos-adapt-parser, no bridge needed).🤖 Generated with Claude Code