fix: engine add is last-write-wins, never raises on re-registration - #81
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
The automated pipeline has reached its destination. 🏁I've aggregated the results of the automated checks for this PR below. 🔍 LintHere's the report you've been waiting for. 📁 ❌ ruff: issues found — see job log 🔨 Build TestsThe build bots have finished their assembly. 🤖 ✅ All versions pass
📊 CoverageMeasuring the density of our automated validation. 🧮 Per-file coverage (3 files)
Full report: download the 🏷️ Release PreviewA sneak peek at the future of OpenVoiceOS. 🔮 Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
🔒 Security (pip-audit)Scanning for any potential denial-of-service vectors. 🚫 ✅ No known vulnerabilities found (49 packages scanned). 🚌 Bus CoverageLet's see which bus messages were actually fired during the tests! 🚌 Your loyal script, at your command 🫡 |
The re-registration crash survived the handler-level replace fix: live boot on the current alpha stack still raised "Attempted to re-register existing intent" from the strict engine guard. The tracebacks show why — wire registrations run on thread-pooled bus handlers, and the dual-emit's two frames race: both pass the handler's check-then-remove-then-add sequence, and the loser hits the engine's raise. The callers cannot serialize this; the sighting on a memory-starved live deployment (storms of these errors during slow skill loading) is the same race with a wider window.
The engine's
add_intent/add_entityare now last-write-wins: an existing name is replaced, never raised on — the OVOS-INTENT-4 §8.1 semantics the wire handlers already implement, pushed down to where the race actually resolves. The two old test pins asserting the raise pinned the defect itself and are rewritten to pin replacement; a new concurrency test hammers registration from eight threads. Suite: 66 passed, 1 skipped.