Repository navigation
test: [SDK-5538] guard stand-ins and the public API against drift - #2828
Draft
abdulraqeeb33 wants to merge 1 commit into
Draft
abdulraqeeb33 wants to merge 1 commit into
abdulraqeeb33 wants to merge 1 commit into
Conversation
This was referenced Nov 2, 2026
Contributor
📊 Diff Coverage ReportDiff Coverage Report (Changed Lines Only)Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff). Changed Files Coverage✅ No main-source changes to gateNo Kotlin/Java changes in the diff. |
DeferredManagersCoverageTests: every member of the six manager interfaces must be declared on its stand-in, not inherited from a default body. Every add...Listener/Observer and every var must have a replay case, and each case must queue before init and reach the real manager on replay. OneSignalImpV2ApiSweepTests: every IOneSignal member, and every member of the managers handed out before init, is called reflectively with dummy args and must not throw or hang past 5s. Members that need a non-null Context are skipped, since they would start a real init. Co-authored-by: Cursor <cursoragent@cursor.com>
abdulraqeeb33
force-pushed
the
never-crash/5-api-coverage-tests
branch
from
November 2, 2026 17:46
c7b0773 to
7d39a53
Compare
8 of 18 tasks
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.
Stack (base
feat/never-crash, merged tomainas one unit; split out of #2793):Description
One Line Summary
Tests that fail when a new public method is added without deciding how it behaves before init.
Details
Motivation
Part of SDK-5538. The compiler already forces every new abstract interface method into its stand-in, but not a method with a default body, not whether a new listener is queued before init, and not whether a new
IOneSignalmethod checks the init gate. These tests cover those gaps.Scope
Test-only, two files (215 lines):
DeferredManagersCoverageTestsadd...Listener,add...Observerand settable property must be listed in the replay table. A new one fails until someone decides whether it queues before init.OneSignalImpV2ApiSweepTestsIOneSignalmember, called before init with dummy arguments, must not throw or hang past 5 seconds.User,pushSubscription,Notifications,InAppMessages,Location,Session).Not covered
Contextare skipped, since they would start a real init. The nullable-context variants are swept.IDebugManageris a real object before init; only thedebuggetter is called.Testing
Unit testing
Each test was checked against a deliberate breakage, and all went red naming it: a new default-body method on
ISessionManager, a new default-body listener onIInAppMessagesManager,isSharedno longer queued, a stand-in method that throws,logout()throwing before init, and a suspend getter that hangs. core, location, in-app-messages, notifications, spotless, detekt and apiCheck pass.Manual testing
Not needed, test-only.
Affected code checklist
Checklist
Overview
Testing
Final pass