Skip to content

fix: release dedup guards in MessageBusClient.remove_all_listeners - #394

Merged
JarbasAl merged 1 commit into
devfrom
fix/sync-remove-all-listeners-guards
Oct 21, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/sync-remove-all-listeners-guards

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Sonnet 5.5 (claude-sonnet-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

Governing clause (OVOS PIPELINE-1 appendix/divergences.md:238): "A transitional deployment MAY subscribe to both names during migration."

MessageBusClient.remove_all_listeners(event_name) removed the emitter listeners but left _dedup_registrations, the per-handler mirror guard and the intent-pair guard in memory. A live probe left one of each after the call. AsyncMessageBusClient.remove_all_listeners already releases them.

The sync method now forgets the dedup entry of each wrapper registered on the removed topic, with the existing _forget_dedup_entry helper. That helper also releases the pair guard with its last registration. No wire change. The async remove_all_listeners(None) behaviour is not touched.

The new test file uses a real ovos-messagebus. It registers a handler on both spellings of a migrated topic and on an intent pair, removes all listeners on each, and asserts that the maps are empty. It then registers fresh handlers and asserts one call per emit. Further tests check that removing one spelling keeps the other registered, that a bound method of a removed handler's owner is garbage collected, and that 50 on and remove cycles on an intent topic leave no pair guard. All five fail on dev and pass with the fix. Full suite: 1268 passed.

The change adds an entry to docs/prerelease-quirks.md.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94df438d-390f-4f3f-b30a-3d392bc33295
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Checking the status... all automated tasks are done! ✅

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

📋 Repo Health

Evaluating the repository's overall condition. 📋

✅ All required files present.

Latest Version: 2.11.28a1

✅ ovos_bus_client/version.py — Version file
✅ README.md — README
✅ LICENSE — License file
✅ pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
✅ CHANGELOG.md — Changelog
✅ ovos_bus_client/version.py has valid version block markers

🏷️ Release Preview

I've checked the 'Performance Improvements' metrics. 📈

Current: 2.11.28a1 → Next: 2.11.29a1

Signal Value
Label fix
PR title fix: release dedup guards in MessageBusClient.remove_all_listeners
Bump build

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 2.11.29a1

Channel Status Note Current Constraint
Stable ❌ Too new (must be <1.4.0) ovos-bus-client>=1.3.4,<1.4.0
Testing ❌ Too new (must be <2.0.0) ovos-bus-client>=1.3.7,<2.0.0
Alpha ✅ Compatible ovos-bus-client>=2.11.26a1

🔍 Lint

I've finished the heavy lifting on this check. 🏋️‍♂️

❌ ruff: issues found in 105 file(s) — see job log
✅ actionlint: 10 workflow file(s), no finding

🔒 Security (pip-audit)

Scanning for any potential SQL injection points. 💉

✅ No known vulnerabilities found (52 packages scanned).

⚖️ License Check

Scanning for any hidden proprietary blobs. 🌑

✅ No license violations found.

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

📊 Coverage

Checking the integrity of our test cases. 💎

✅ 92.3% total coverage (threshold: 65.0%)

Files below 80% coverage (1 file)
File Coverage Missing lines
ovos_bus_client/client/__init__.py 42.9% 4

Full report: download the coverage-report artifact.

🔨 Build Tests

Checking the structural resonance of the codebase. 🔊

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 1262 passed, 6 skipped, 21 warnings, 181 subtests passed in 91.44s (0:01:31)
3.11 ✅ ✅ ✅ 1262 passed, 6 skipped, 21 warnings, 181 subtests passed in 89.07s (0:01:29)
3.12 ✅ ✅ ✅ 1262 passed, 6 skipped, 21 warnings, 181 subtests passed in 86.91s (0:01:26)
3.13 ✅ ✅ ✅ 1262 passed, 6 skipped, 21 warnings, 181 subtests passed in 91.00s (0:01:30)
3.14 ✅ ✅ ✅ 1262 passed, 6 skipped, 21 warnings, 181 subtests passed in 91.48s (0:01:31)

The bits and bytes are looking good today. 💾

@github-actions github-actions Bot added the fix label Oct 21, 2026
remove_all_listeners() dropped the emitter listeners but left the
handler registrations, the per-handler mirror guard and the intent-pair
guard in memory. remove() and the once() cleanup already release them,
and AsyncMessageBusClient.remove_all_listeners does the same.

The sync method now forgets the dedup entry of every wrapper registered
on the removed topic through _forget_dedup_entry, which also releases
the pair guard when its last registration goes.

Before the fix the three new tests fail on the non-empty
_dedup_registrations map; after it they pass (full suite 1266 passed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@JarbasAl
JarbasAl force-pushed the fix/sync-remove-all-listeners-guards branch from b873fa4 to 466b64f Compare October 21, 2026 00:46
@github-actions github-actions Bot added fix and removed fix labels Oct 21, 2026
@JarbasAl
JarbasAl marked this pull request as ready for review October 21, 2026 00:51
@JarbasAl
JarbasAl merged commit a4895f2 into dev Oct 21, 2026
20 checks passed
@JarbasAl
JarbasAl deleted the fix/sync-remove-all-listeners-guards branch October 21, 2026 10:15
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.

2 participants