fix: MiniCroft boots a lean default pipeline instead of every installed matcher - #157
Conversation
…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>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
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 PreviewI've checked the 'Platform Support' matrix. 💻 Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
🔒 Security (pip-audit)Looking for any weak links in the supply chain. ⛓️ ✅ No known vulnerabilities found (121 packages scanned). 🔍 LintChecking if we've met all our check criteria. ✅ ❌ ruff: issues found — see job log ⚖️ License CheckLegal eagle here! Checking those licenses. ⚖️ ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 📊 CoverageThe coverage detectives have finished their sweep. 🕵️♀️ Files below 80% coverage (15 files)
Full report: download the 🔨 Build TestsEverything is bolted down and ready to go. 🔩 ✅ All versions pass
Processing completed in 0.0001 bot-seconds ⚡ |
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_pipelinesinstantiates every installedopm.pipelineplugin regardless ofintents.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 setintents.pipelineto a much shorter list. One of those plugins,ovos-m2v-pipeline, does a synchronoussleep(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 madesetUpClasserror out.The fix is
intents.blacklisted_pipelines, notintents.pipeline: that is the config IntentService actually checks before constructing a plugin. MiniCroft now defaults to a newLEAN_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 (greppingtest/unittests/*.pyturns up no reference to the-lowtier or tocommon_query; Stop is kept unconditionally because skills assert stop behavior fleet-wide). BeforeIntentServiceis constructed, MiniCroft now computes and setsintents.blacklisted_pipelinesto every installed pipeline plugin the chosen pipeline doesn't cover, and restores it instop().Two escape hatches keep this additive rather than restrictive. A heavyweight suite that needs one extra matcher (say, m2v) can pass
extra_pipelines=M2V_PIPELINEinstead of restating the whole lean list, anddefault_pipeline=remains a full override when a test wants total control (e.g. Adapt-only, or the widerDEFAULT_TEST_PIPELINE). To make sure a lean config can never quietly mask a real problem,get_minicroft()now raisesRuntimeErrornaming 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__.pywhile keeping the new tests produces a collectionImportError(LEAN_DEFAULT_PIPELINEis undefined) for the newTestMiniCroftLeanBootDefaultclass intest_minicroft.pyand for the newtest_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/unittestssuite passes 548, with 9 pre-existing failures from a missing optionalovos-dinkum-listenerdependency and 119 skips — identical to the failure set ondevbefore this change, confirmed by running the same subset againstdevdirectly.docs/minicroft.mdanddocs/usage-guide.mddocument the lean default and both override mechanisms.Base note:
devat the time of this branch includes #154 (skills-trained quiet window wait), which this change leaves untouched. PR #156 (bumping theovos-corefloor for padatious's move from[lgpl]to[plugins]) is still open, not merged, so this branch targets the current[lgpl,plugins]floor.