Add push → cancel → late INVITE chain tests - #13
Merged
Conversation
added 2 commits
August 6, 2026 09:50
A payload whose descriptor isCancellation (built-in markers: type/event equal to cancel/cancelled/cancellation under data or at the top level) is no longer reported to CallKit as a new incoming call. It is routed to -handleCancelledIncomingCallWithUUID:reason:completion: with CXCallEndedReasonRemoteEnded instead — the incoming-call screen comes down, a call whose INVITE has not arrived is remembered so the late INVITE is answered 603, and a cancellation that overtook the announcement push leaves a tombstone that cannot ring. Hosts with a different marker shape return a descriptor whose cancellation flag is set from pushPayloadParser. Also deduplicates repeat announcement pushes in host-owned CallKit mode: a second push for a UUID that is already on the CallKit screen no longer re-publishes the incoming state or restarts the ring timeout. Adds CallWavePushCancellationTests covering cancel-before-INVITE, marker variants, the tombstone race, duplicate pushes and custom parser cancellations.
Drives the full remote-cancellation chain through the managed PushKit entry point down to takeCallCancelledBeforeInvite — the exact decision on_incoming_call consults before answering a late INVITE with 603: - push, then cancel, then the late INVITE is refused exactly once; - a cancellation that overtook the announcement push neither rings nor lets the INVITE ring; - a call still awaiting its INVITE takes precedence over a pending cancellation, and the cancellation is honoured once the wait is over; - a cancellation expires after its window and cannot refuse an INVITE that arrives too late to belong to it. The PJSIP half of the chain — the static C callback that needs a running stack — stays on the device checklist.
PetrShtuka
changed the base branch from
feature/managed-pushkit-cancellation
to
main
August 10, 2026 06:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что
Интеграционный тест цепочки push → cancel → late INVITE → 603 — последний непокрытый сценарий из чек-листа надёжности PushKit.
Цепочка прогоняется от managed-точки входа
handleVoIPPushPayload:completion:доtakeCallCancelledBeforeInvite— ровно того решения, котороеon_incoming_callпринимает перед ответом603 Declineна поздний INVITE. PJSIP-половина (статический C-коллбэк, требующий живого стека) остаётся в device-чек-листе.Кейсы (4)
Прогон
Scripts/run-package-tests.sh: 4 новых теста зелёные, полный прогон — 0 падений.