Skip to content

fix: replay intent registrations when matchers lose compiled state#467

Closed
JarbasAl wants to merge 1 commit into
devfrom
fix/reregister-intents-on-reconnect
Closed

fix: replay intent registrations when matchers lose compiled state#467
JarbasAl wants to merge 1 commit into
devfrom
fix/reregister-intents-on-reconnect

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Closes the resilience gap where intent matching is permanently lost once the pipeline matchers drop their compiled state while skills keep running.

The problem

Registration broadcasts (register_vocab, register_intent, padatious:*, fallback registration) are load-time announcements (OVOS-INTENT-4 §10) — the bus has no catch-up channel. A matcher (re)constructed after a skill loaded has missed them and matches nothing: every utterance ends in ovos.intent.unmatched until the skill process is restarted. This happens when the intent service reloads its pipeline plugins (intent.service.pipelines.reload rebuilds every plugin with empty engines) or restarts in a separate process, and can follow a messagebus restart.

The fix

  • IntentServiceInterface records vocabulary/entity registration payloads alongside the already-recorded intents and exposes reregister_all(), which replays every registration currently in effect. Re-registration is implicit replacement (OVOS-INTENT-4 §8.1) so the replay is always safe; adapt intents are detached first because legacy consumers append parsers instead of replacing. Detached intents stay detached.
  • OVOSSkill replays on two triggers:
    • intent.service.pipelines.loaded — the orchestrator's announcement that pipeline plugins were (re)loaded (emitted by the companion ovos-core change);
    • the bus client's open event after a websocket drop, so a messagebus restart can never leave matchers without this skill's registrations.
  • FallbackSkill additionally re-emits its fallback registration, which lives in the fallback matcher's memory just like intents do.

Tests

test/unittests/test_reregister_intents.py: replay fidelity (replayed payloads identical to originals), detach-before-replay for adapt intents, detached intents skipped, skill_id context propagation, both skill-level triggers, and fallback re-registration.

Companion PR: ovos-core emits intent.service.pipelines.loaded after (re)loading pipeline plugins and adds a real-messagebus end2end regression test that restarts the messagebus process.

🤖 Generated with Claude Code

Registration broadcasts are load-time announcements (OVOS-INTENT-4 §10):
an intent matcher (re)constructed after a skill loaded has missed them and
matches nothing until they are replayed, e.g. after the intent service
reloads its pipeline plugins or restarts while the skill process keeps
running.

IntentServiceInterface now records vocabulary/entity registration payloads
and exposes reregister_all(), replaying every registration currently in
effect (re-registration is implicit replacement per OVOS-INTENT-4 §8.1;
adapt intents are detached first because legacy consumers append parsers
instead of replacing). OVOSSkill replays on the intent service's
intent.service.pipelines.loaded announcement and on the bus client's open
event after a websocket drop; FallbackSkill additionally re-emits its
fallback registration.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd2915cf-370f-4953-b384-074111e89ebc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reregister-intents-on-reconnect

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 added the fix label Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

A new update is available for your PR checks! 📥

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

📋 Repo Health

Checking the repo's mental health (aka developer happiness). 😊

✅ All required files present.

Latest Version: 9.2.0a1

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

🔍 Lint

The results are in the bag! 🎒

ruff: issues found — see job log

🔒 Security (pip-audit)

I've checked the security of our build pipeline. 🏗️

✅ No known vulnerabilities found (73 packages scanned).

⚖️ License Check

I've checked the license history of this repo. 📜

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔨 Build Tests

Ensuring all components are in alignment. 📏

Python Build Install Tests
3.10 ⚠️
3.11 ⚠️
3.12 ⚠️
3.13 ⚠️
3.14 ⚠️

❌ 3.10: Install OK, tests failed
❌ 3.11: Install OK, tests failed
❌ 3.12: Install OK, tests failed
❌ 3.13: Install OK, tests failed
❌ 3.14: Install OK, tests failed
Check job logs for details.


Final report submitted. Over and out. 📻

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