refactor: drop dead skill/intent blacklist assignment - #18
Conversation
get_client() set client.skill_blacklist and client.intent_blacklist on the connection. HiveMindClientConnection has no such fields — the dataclass just accepted the ad-hoc attributes — and nothing ever read them. Blacklist enforcement moved to OVOSAgentPolicy (HiveMind-core#85), which resolves the DB row through client.resolve_user(db) and reads user.skill_blacklist there. These assignments are vestigial from before that change, and read as though the transport applies an ACL when it does not. The two tests asserting the attributes were pinning the dead behaviour. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Another day, another set of automated checks. Let's see! 🌅I've aggregated the results of the automated checks for this PR below. 🔍 LintA quick update on the progress of your PR checks. 📈 ❌ ruff: issues found — see job log 📋 Repo HealthScanning for any signs of 'merge conflict' stress. 😫 ✅ All required files present. Latest Version: ✅ 📊 CoverageIs the code wearing its test-suit? Let's see. 👔 ✅ 98.4% total coverage Per-file coverage (2 files)
Full report: download the 🔒 Security (pip-audit)I've audited the packages. Safety first! 🦺 ✅ No known vulnerabilities found (79 packages scanned). 🏷️ Release PreviewA detailed preview of the next release cycle. 🎬 Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
⚖️ License CheckI'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. System.exit(0); // With love from OVOS 🖥️ |
get_client()sets two attributes nothing reads:HiveMindClientConnectionhas noskill_blacklistorintent_blacklistfield — the dataclass simply accepts the ad-hoc attributes. Grepping the ecosystem, nothing reads them back.Enforcement moved to
OVOSAgentPolicyinhivemind-ovos-agent-plugin(HiveMind-core#85). It resolves the DB row viaclient.resolve_user(db)and readsuser.skill_blacklist/user.intent_blacklistfrom there —policy.py:187-188. The connection attributes were never part of that path.They are harmless, but they read as though the transport is applying an ACL, which it is not. That is worth deleting precisely because a future reader would trust it.
test_skill_blacklist_none_defaults_to_emptyandtest_intent_blacklist_none_defaults_to_emptyasserted the dead attributes, so they go too, along with the now-unused_make_userkwargs.Identical assignments exist in hivemind-websocket-protocol and hivemind-mqtt-protocol; companion PRs remove them there.
Suite: 47 passed (was 49, minus the two removed tests).
Note
Touches the same function as #17. Merge either order — the hunks are adjacent but distinct — though #17 is the one carrying a real fix.
🤖 Generated with Claude Code