fix: guard stale call session playback - #139
Conversation
|
Review/merge-manager classification: needs-fix before autonomous landing. The stale-session playback guard is good direction, but read-only review found a remaining stale |
|
Release-manager classification update: superseded by #150, which has now landed on This PR remains blocked because it protects stale playback calls but leaves related stale-session control/privacy gaps open:
#150 covered those broader control/DTMF boundaries and passed the release-manager gates before merge, so future work should build on current |
|
Review/merge-manager classification: needs-fix. I am not marking this ready or merging yet. The branch currently conflicts with Requested changes:
|
|
Release review: needs-fix. This draft is currently |
|
Release-captain classification: needs-fix. This PR is now |
|
Release lane update: needs-human. This change affects a sensitive security/privacy, production-deployment, modem/SIM, audio/hardware, or public realtime product boundary. It will not be autonomously merged under this lane. Please obtain an explicit Korgo decision on the intended policy/scope and, where applicable, rebase on current |
|
Release review: needs-fix. This PR is now |
|
Release review: needs-fix. GitHub currently reports this branch |
|
Release review classification: needs-fix. GitHub now reports this branch |
|
Release-lane classification: needs fix/revalidation before merge. This draft was not independently reviewed or integration-tested in this pass and its GitHub mergeability is stale/unknown after current-main advances. Please rebase or otherwise validate it against current |
|
Release classification: needs-fix for this release pass. The draft has not received a current exact-head review and prescribed local integration gate over the advancing |
|
Release review: needs-fix. GitHub reports this stale-playback PR |
Summary
CallSession.play,play_sequence, andplay_loopfail closed unless the exact session is still active.play_and_collecttests using a fake service that now models active-call ownership explicitly.Tests
git diff --checkPYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/test_call_service.py tests/test_call_session_play_and_collect.py -q→50 passed in 1.73sPYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/ -q→598 passed in 5.75sReview
Risks
CallSession.play_loop(..., cancel=None)now has a natural session-liveness cancel event instead of relying on the lower-level player's missing-cancelValueError; this aligns the session API with active-call ownership but is a small behavior change.