Skip to content

fix: MiniCroft boots a lean default pipeline instead of every installed matcher - #157

Merged
JarbasAl merged 1 commit into
devfrom
fix/minicroft-lean-default-pipeline
Sep 3, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/minicroft-lean-default-pipeline

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Sep 3, 2026

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Sonnet 5 via Claude Code — NOT human-reviewed. Verify before acting.

CI installs ovos-core[plugins] so Adapt/Padatious are AVAILABLE (correct — see gh-automations#99), but that surfaced a separate problem in MiniCroft: IntentService.handle_reload_pipelines instantiates every installed opm.pipeline plugin regardless of intents.pipeline — that config only orders/selects among matchers already loaded, it never gates which plugins get constructed. With roughly fourteen pipeline plugins installed (m2v, m2v-prototype, persona, OCP x2, common_query, ...), MiniCroft ended up eagerly booting all of them every time, even though it only ever set intents.pipeline to a much shorter list. One of those plugins, ovos-m2v-pipeline, does a synchronous sleep(3) inside its intent-sync handler; combined with several heavy skill test suites in the fleet, this routinely pushed MiniCroft's 60s READY cap and made setUpClass error out.

The fix is intents.blacklisted_pipelines, not intents.pipeline: that is the config IntentService actually checks before constructing a plugin. MiniCroft now defaults to a new LEAN_DEFAULT_PIPELINE — Stop, Converse, Adapt, Padatious, Padacioso and Fallback, high and medium confidence tiers — which is the matcher set the ovoscope test suite itself ever asserts against (grepping test/unittests/*.py turns up no reference to the -low tier or to common_query; Stop is kept unconditionally because skills assert stop behavior fleet-wide). Before IntentService is constructed, MiniCroft now computes and sets intents.blacklisted_pipelines to every installed pipeline plugin the chosen pipeline doesn't cover, and restores it in stop().

Two escape hatches keep this additive rather than restrictive. A heavyweight suite that needs one extra matcher (say, m2v) can pass extra_pipelines=M2V_PIPELINE instead of restating the whole lean list, and default_pipeline= remains a full override when a test wants total control (e.g. Adapt-only, or the wider DEFAULT_TEST_PIPELINE). To make sure a lean config can never quietly mask a real problem, get_minicroft() now raises RuntimeError naming any pipeline id that failed to load — whether it's simply not installed or errored during construction — instead of proceeding with fewer matchers than the test expects.

Fail-before: reverting only ovoscope/__init__.py while keeping the new tests produces a collection ImportError (LEAN_DEFAULT_PIPELINE is undefined) for the new TestMiniCroftLeanBootDefault class in test_minicroft.py and for the new test_lean_boot_e2e.py; both pass once the fix is restored. A manual boot-time comparison in the same environment showed roughly 8.3s for the old "no blacklist, all plugins load" path against a real registered intent versus roughly 1.5–3.2s for the lean-default path with the same skill — the gap grows with every additional heavy plugin installed, which is exactly what pushed the fleet past the 60s cap.

The full test/unittests suite passes 548, with 9 pre-existing failures from a missing optional ovos-dinkum-listener dependency and 119 skips — identical to the failure set on dev before this change, confirmed by running the same subset against dev directly. docs/minicroft.md and docs/usage-guide.md document the lean default and both override mechanisms.

Base note: dev at the time of this branch includes #154 (skills-trained quiet window wait), which this change leaves untouched. PR #156 (bumping the ovos-core floor for padatious's move from [lgpl] to [plugins]) is still open, not merged, so this branch targets the current [lgpl,plugins] floor.

…ed matcher

CI installs ovos-core[plugins] so Adapt/Padatious are AVAILABLE, but
IntentService's handle_reload_pipelines instantiates every installed
opm.pipeline plugin regardless of intents.pipeline — that config only
orders/selects among already-loaded matchers, it never gates which
plugins get constructed in the first place. With ~14 pipeline plugins
installed (m2v, m2v-prototype, persona, OCP x2, common_query, ...),
MiniCroft ended up eagerly instantiating all of them on every boot; one
of them (ovos-m2v-pipeline) does a synchronous sleep(3) on intent-sync
events, which combined with several heavy skill suites pushed boots past
MiniCroft's 60s READY cap and made setUpClass ERROR out fleet-wide.

MiniCroft now defaults to LEAN_DEFAULT_PIPELINE (Stop, Converse, Adapt,
Padatious, Padacioso, Fallback — high/medium tiers, the matcher families
the ovoscope suite itself asserts against) and, before IntentService is
constructed, sets intents.blacklisted_pipelines to every installed
plugin the chosen pipeline doesn't need — the mechanism that actually
stops a plugin from loading. A heavy suite can add one matcher back via
the new extra_pipelines= kwarg without restating the whole lean list;
default_pipeline= remains a full override. get_minicroft() now also
raises RuntimeError naming any configured pipeline id that failed to
load, so a lean config can never silently mask a missing/broken matcher.

Fail-before: reverting only ovoscope/__init__.py while keeping the new
tests produces a collection ImportError (LEAN_DEFAULT_PIPELINE undefined)
for test_minicroft.py's new TestMiniCroftLeanBootDefault class and for
test_lean_boot_e2e.py; both pass once the fix is restored. Full
test/unittests suite: 548 passed, 9 pre-existing failures (missing
optional ovos-dinkum-listener dep, unchanged from dev), 119 skipped —
identical failure set on dev before this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 Sep 3, 2026

Copy link
Copy Markdown

At your service! I've gathered all the check results for you. 🫡

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

🏷️ Release Preview

I've checked the 'Platform Support' matrix. 💻

Current: 1.6.16a1Next: 1.6.17a1

Signal Value
Label (none)
PR title fix: MiniCroft boots a lean default pipeline instead of every installed matcher
Bump build

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 1.6.17a1

Channel Status Note Current Constraint
Stable Not in channel -
Testing Too new (must be <1.0.0) ovoscope>=0.7.2,<1.0.0
Alpha Compatible ovoscope>=1.6.15a1

🔒 Security (pip-audit)

Looking for any weak links in the supply chain. ⛓️

✅ No known vulnerabilities found (121 packages scanned).

🔍 Lint

Checking if we've met all our check criteria. ✅

ruff: issues found — see job log

⚖️ License Check

Legal eagle here! Checking those licenses. ⚖️

✅ No license violations found.

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

📊 Coverage

The coverage detectives have finished their sweep. 🕵️‍♀️

⚠️ 60.0% total coverage

Files below 80% coverage (15 files)
File Coverage Missing lines
ovoscope/simple_listener.py 0.0% 63
ovoscope/tts_intelligibility.py 0.0% 200
ovoscope/version.py 0.0% 5
ovoscope/classic_listener.py 18.2% 117
ovoscope/intent_cases.py 22.3% 153
ovoscope/pytest_plugin.py 47.0% 210
ovoscope/cli.py 47.8% 132
ovoscope/ocp.py 47.9% 61
ovoscope/e2e.py 53.5% 66
ovoscope/media.py 56.7% 101
ovoscope/listener.py 57.1% 127
ovoscope/voice_loop.py 59.0% 119
ovoscope/audio.py 63.4% 126
ovoscope/__init__.py 65.8% 371
ovoscope/media_provider.py 67.6% 23

Full report: download the coverage-report artifact.

🔨 Build Tests

Everything is bolted down and ready to go. 🔩

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Processing completed in 0.0001 bot-seconds ⚡

@JarbasAl
JarbasAl marked this pull request as ready for review September 3, 2026 15:51
@JarbasAl
JarbasAl merged commit d57c14c into dev Sep 3, 2026
14 checks passed
@JarbasAl
JarbasAl deleted the fix/minicroft-lean-default-pipeline branch September 3, 2026 15:52
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