spike: context.utterance_id — lifecycle identifier + converse round guard (PIPELINE-1 §9.1.1) - #859
Conversation
Spike. The orchestrator names each utterance lifecycle once, at entry, with an opaque uuid4 in context.utterance_id. Message.reply/forward deep-copy context, so every derived Message carries it for free. The transformer chain replaces message.context wholesale, so the entry value is re-asserted after it runs (same value, not an overwrite). One consumer ships: the converse ping-pong round guard discards a pong whose utterance_id does not match the open round (CONVERSE-1 §4.2). This closes the late-answer-wins-wrong-round bug, where a slow skill's answer to round N-1 lands inside round N's window and decides it. The guard stands down when the round has no utterance_id, so callers that never entered through the orchestrator behave as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe change adds UUID-based utterance lifecycle tracking and preserves identifiers across transformations. Converse response collection now matches pong responses to the active utterance identifier while retaining legacy behavior for rounds without identifiers. Tests cover identifier propagation and stale-response filtering. ChangesUtterance lifecycle and converse correlation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Elementary, my dear contributor! The checks are finished. 🕵️♂️I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthScanning for any signs of code rot or decay. 🍄 ✅ All required files present. Latest Version: ✅ 🔒 Security (pip-audit)Ensuring our security logs are being captured. 🪵 ✅ No known vulnerabilities found (113 packages scanned). 🔎 Type CheckI've distilled the results into this summary. 🧪 ❌ mypy: 272 error(s) found
Errors (showing first 10/272)📚 DocsHere's the report you've been waiting for. 📁 ✅ All required documentation files present. ✅ 🏷️ Release PreviewChecking if we've included all the important changes. 📋 Current:
🚀 Release Channel Compatibility Predicted next version:
📊 CoveragePeeking behind the curtain of your test suite. 🎭 Files below 80% coverage (9 files)
Full report: download the 🔌 Plugin DetectionEvaluating the overall quality of the plugin's implementation. ✨ ❌ Plugin Status: ERRORS (1) Plugin Info:
OPM Detection:
Entry Point Validation:
⊘ No Issues:
🔨 Build TestsI've laid the bricks for your new logic. 🧱 ✅ All versions pass
🔌 Skill Tests (ovoscope)Testing the skill's 'offline' capabilities (if any). 🔌 ✅ 4/40 passed ❌ **TestAdaptIntent** — 0/4
❌ **TestCancelIntentMidSentence** — 0/1
❌ **TestConverse** — 0/1
❌ **TestCountSkills** — 0/4
❌ **TestDeactivate** — 2/3
❌ **TestFallback** — 0/1
❌ **TestGlobalStopVocWithActiveSkill** — 0/1
❌ **TestGlobalStopVocabulary** — 0/2
❌ **TestIntentPipelineRouting** — 0/4
❌ **TestLangDisambiguation** — 0/4
❌ **TestLegacyIntentIdBackCompat** — 0/2
❌ **TestNoSkills** — 0/2
❌ **TestPadatiousIntent** — 0/4
❌ **TestStopNoSkills** — 0/3
❌ **TestStopServiceNotASkill** — 0/1
❌ **TestStopSkillCanHandleFalse** — 0/1
🚌 Bus CoverageMeasuring the reach of our bus handlers. 📏 🔴 Coverage Summary
📊 Per-Skill Breakdown
🔍 Detailed Message Type Breakdown
|
…p ping/pong (PIPELINE-1 §9.1.1) Applies the same round-correlation guard added to converse_service's handle_ack in #859 to the remaining poll rounds: fallback_service's ovos.skills.fallback.pong collector and stop_service's skill.stop.pong collector now discard pongs whose utterance_id or session mismatches the open round, standing down when the round carries no utterance_id (V0 back-compat). This closes the same late-answer-wins-wrong-round class of bug for fallback and stop, mirroring converse's fix. Note: common_query.py's phrase-string correlation (also flagged in the originating task) does not live in ovos-core -- that logic is in the separate ovos-common-query-pipeline-plugin repo and is out of scope here; left untouched. > 🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) via Claude Code — NOT human-reviewed. Verify before acting. Verified: new tests exercise the actual FallbackService/StopService ping-pong collectors against a FakeBus; red-before confirmed by reverting the source guard (test files kept) and re-running the new test classes, which failed exactly as expected; green after reapplying. Full unit suite (350 tests) passes on top of the fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…p ping/pong (PIPELINE-1 §9.1.1) (#862) Applies the same round-correlation guard added to converse_service's handle_ack in #859 to the remaining poll rounds: fallback_service's ovos.skills.fallback.pong collector and stop_service's skill.stop.pong collector now discard pongs whose utterance_id or session mismatches the open round, standing down when the round carries no utterance_id (V0 back-compat). This closes the same late-answer-wins-wrong-round class of bug for fallback and stop, mirroring converse's fix. Note: common_query.py's phrase-string correlation (also flagged in the originating task) does not live in ovos-core -- that logic is in the separate ovos-common-query-pipeline-plugin repo and is out of scope here; left untouched. > 🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) via Claude Code — NOT human-reviewed. Verify before acting. Verified: new tests exercise the actual FallbackService/StopService ping-pong collectors against a FakeBus; red-before confirmed by reverting the source guard (test files kept) and re-running the new test classes, which failed exactly as expected; green after reapplying. Full unit suite (350 tests) passes on top of the fix. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Gives every utterance a lifecycle id, stamped once when the utterance enters the pipeline. It rides along in the message context through replies and forwards, so anything downstream can tell which utterance an event belongs to.
First consumer: the converse poll. Answers from a previous round (same session, older utterance) used to be able to sneak into the current round; now they're matched on session + utterance id and stale ones are dropped. Messages without the id behave exactly as before, so old clients lose nothing.
Unit suite green with new tests covering the stale-answer case and the no-id fallback.