Skip to content

fix: drop unhashable Session from lru_cache key (ovos-bus-client 2.x compat) - #60

Merged
JarbasAl merged 2 commits into
devfrom
fix/bus-client-2x-unhashable-session
Jun 27, 2026
Merged

fix: drop unhashable Session from lru_cache key (ovos-bus-client 2.x compat)#60
JarbasAl merged 2 commits into
devfrom
fix/bus-client-2x-unhashable-session

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

ovos-bus-client 2.x makes Session unhashable (Session.__hash__ is None), so passing it as an @lru_cache argument to _calc_padacioso_intent raised TypeError: unhashable type: 'Session' on every match attempt — padacioso silently matched nothing under bus-client 2.x.

Fix: pass the two blacklist sets the matcher actually reads as frozensets (hashable) instead of the whole Session. Restores caching + matching under bus-client 2.x.

Found by live integration testing in the OVOS spec-compliance harness (the Session change ships in ovos-bus-client#234). Also handles blacklisted_* being None (optional SESSION-1 field) via or [].

🤖 Generated with Claude Code

ovos-bus-client 2.x makes Session unhashable (Session.__hash__ is None),
so passing it as an lru_cache argument to _calc_padacioso_intent raised
TypeError: unhashable type: 'Session' on every match attempt. Pass the two
blacklist sets the matcher actually reads as frozensets (hashable) instead
of the whole Session, restoring caching and matching under bus-client 2.x.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

More reviews will be available in 51 minutes and 38 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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 credits.

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 886fd81a-c10b-4115-8087-10a6f4448179

📥 Commits

Reviewing files that changed from the base of the PR and between 8d85875 and 557eba4.

📒 Files selected for processing (1)
  • padacioso/opm.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bus-client-2x-unhashable-session

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 Jun 27, 2026
@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

Scanning complete. No anomalies detected in the process. 🌌

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

📋 Repo Health

Scanning for any signs of 'copy-paste' obesity. 🍕

✅ All required files present.

Latest Version: 2.0.0a1

padacioso/version.py — Version file
README.md — README
LICENSE.md — License file (consider renaming to LICENSE)
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
padacioso/version.py has valid version block markers

⚖️ License Check

Checking the paperwork! Everything seems in order. 📂

✅ No license violations found.

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

🏷️ Release Preview

Here's what the next release might look like! 🚀

Current: 2.0.0a1Next: 2.0.1a1

Signal Value
Label fix
PR title fix: drop unhashable Session from lru_cache key (ovos-bus-client 2.x compat)
Bump build

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 2.0.1a1

Channel Status Note Current Constraint
Stable Not in channel -
Testing Not in channel -
Alpha Not in channel -

🔌 Plugin Detection

I've verified the plugin's 'load time' is lightning fast. ⚡

⚠️ Plugin Status: WARNINGS (2)

Plugin Info:

  • Name: padacioso
  • Description: dead simple intent parser

OPM Detection:

Plugin Type Wheel Editable
pipeline

Entry Point Validation:

Entry Point Type Import Interface
ovos-padacioso-pipeline-plugin pipeline ✅ 23ms

⊘ No settingsmeta.json
requires-python >=3.8 — running Python 3.11

Issues:

  • ⚠️ No settingsmeta.json found
  • ⚠️ No settingsmeta.json found

🔌 Skill Tests (ovoscope)

Evaluating the overall polish of the skill's interaction. ✨

9/9 passed

TestDetach — 2/2
TestEntityExtraction — 1/1
TestRegisteredIntentMatch — 4/4
TestSessionBlacklist — 2/2

🚌 Bus Coverage

A bird's eye view of the message bus landscape. 🦅

⚠️ Bus coverage report unavailable — check the job log.

📊 Coverage

Measuring the breadth of our automated checks. 📏

⚠️ 73.7% total coverage

Per-file coverage (3 files)
File Coverage Missing lines
padacioso/version.py 0.0% 5
padacioso/opm.py 66.5% 57
padacioso/__init__.py 79.3% 59

Full report: download the coverage-report artifact.

🔍 Lint

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

ruff: issues found — see job log

🔨 Build Tests

The build pipeline has finished its work. 🏁

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Beep boop. See you in the next PR! 👋

JarbasAl added a commit to OpenVoiceOS/ovos-test-harness that referenced this pull request Jun 27, 2026
…ersonal fork)

OpenVoiceOS/padacioso#60 replaces the JarbasAl fork stopgap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
_calc_padacioso_intent is @lru_cache-keyed on the intent_container object,
which is mutated in place by register/detach. After detaching an intent the
cache returned the stale pre-detach match (no complete_intent_failure emitted),
breaking the detach e2e tests. Clear the cache whenever a container is mutated.
@JarbasAl
JarbasAl merged commit b8c1600 into dev Jun 27, 2026
16 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