Skip to content

fix: intent-layers e2e + utterance.handled test, bump pins#446

Merged
JarbasAl merged 3 commits into
devfrom
fix/xfail-intent-layers-e2e
Jul 2, 2026
Merged

fix: intent-layers e2e + utterance.handled test, bump pins#446
JarbasAl merged 3 commits into
devfrom
fix/xfail-intent-layers-e2e

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jul 1, 2026

Copy link
Copy Markdown
Member

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_context injects the layer_<name> token into the default-session SessionManager singleton's context in place. The token was then wiped before the next match: FakeBus.emit was folding the message's session onto the singleton AFTER the bus handlers ran, using a pre-mutation emit-time snapshotSession.update_from is last-writer-wins per field (OVOS-SESSION-1 §2), so the post-handler fold wholesale-replaced the singleton's context with a stale (token-less) snapshot. Gated intents never matched.

#396 fixes the ordering: FakeBus.emit now folds before handlers (matching MessageBusClient.on_message receive -> fold -> handle order) and drops the post-handler self-broadcast-back fold. The legacy add_context -> sess.context frame mechanism then survives under folding — no workshop change needed (IntentLayers is 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 the xfail markers added in 2aee2bd; both tests pass once ovos-utils >= 0.13.3a2 (Release 8.0.3a1 #396 release) lands.
  • pyproject.toml: bump ovos-utils floor 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) emits ovos.utterance.handled. #442's _core_owns_utterance_handled() guard suppresses that emission when ovos-core >= 2.3.0a1 — the orchestrator owns the PIPELINE-1 §9.5 end-marker on the matched path. CI now installs ovos-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-registry SessionManager), 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.py tests pass and the three _on_event_end tests pass (released ovos-adapt-parser, no bridge needed).

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@JarbasAl, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 50bc38fe-de5b-4508-82f3-e5f1ccdb18f7

📥 Commits

Reviewing files that changed from the base of the PR and between 3166395 and 8f26e45.

📒 Files selected for processing (2)
  • pyproject.toml
  • test/unittests/skills/test_base.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/xfail-intent-layers-e2e

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 Jul 1, 2026

Copy link
Copy Markdown
Contributor

The automated inspectors have submitted their report. 🕵️‍♂️

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

📋 Repo Health

Scanning for any signs of 'orphaned' code limbs. 🦾

✅ All required files present.

Latest Version: 9.0.2a1

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

⚖️ License Check

Everything 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 Tests

Ensuring no loose screws in the assembly. 🔩

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

🔍 Lint

Processing complete! Details follow. 📬

ruff: issues found — see job log


Your friendly neighborhood bot 🕷️

@JarbasAl JarbasAl changed the title test: xfail broken intent-layers e2e tests fix: un-xfail intent-layers e2e + harden utterance.handled test, bump pins Jul 1, 2026
@github-actions github-actions Bot added the fix label Jul 1, 2026
…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.
@JarbasAl JarbasAl force-pushed the fix/xfail-intent-layers-e2e branch from 4e95492 to 1d62e45 Compare July 1, 2026 18:20
@JarbasAl JarbasAl changed the title fix: un-xfail intent-layers e2e + harden utterance.handled test, bump pins test: xfail intent-layers e2e + harden utterance.handled test, bump pins Jul 1, 2026
…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).
@JarbasAl JarbasAl changed the title test: xfail intent-layers e2e + harden utterance.handled test, bump pins fix: intent-layers e2e + utterance.handled test, bump pins Jul 1, 2026
@github-actions github-actions Bot added fix and removed fix labels Jul 1, 2026
@JarbasAl JarbasAl closed this Jul 2, 2026
@JarbasAl JarbasAl reopened this Jul 2, 2026
@JarbasAl JarbasAl marked this pull request as ready for review July 2, 2026 16:44
@JarbasAl JarbasAl merged commit f5fa236 into dev Jul 2, 2026
12 of 22 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