Skip to content

refactor: [SDK-5538] add SdkOperation names for init-gated entry points - #2800

Draft
abdulraqeeb33 wants to merge 1 commit into
feat/never-crashfrom
never-crash/1-sdk-operation
Draft

abdulraqeeb33 wants to merge 1 commit into
feat/never-crashfrom
never-crash/1-sdk-operation

Conversation

@abdulraqeeb33

@abdulraqeeb33 abdulraqeeb33 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Stack (base feat/never-crash, merged to main as one unit; split out of #2793):

  1. refactor: [SDK-5538] add SdkOperation names for init-gated entry points #2800 SdkOperation names (this PR)
  2. feat: [SDK-5538] remote kill switch with a placeholder OneSignalImpV2 #2801 Kill switch with a placeholder OneSignalImpV2
  3. feat: [SDK-5538] deferred managers that stand in before init #2802 Deferred managers
  4. fix: [SDK-5538] never crash on invalid init or calls before init #2803 Never-crash init

Description

One Line Summary

Add SdkOperation, the names of the public entry points that wait for or require init, so logs name the call the app made.

Details

Motivation

Part of SDK-5538: never crash the app on an invalid init or calls before init. The never-crash path logs which call was ignored; this gives those logs one source of names instead of string literals.

Scope

  • New SdkOperation enum and an isMissing(value, operation, parameter) overload in InputGuard.
  • Nothing uses them yet; PRs 3 and 4 do. No behavior change.

Testing

Unit testing

InputGuardTests covers the new overload. core, location, in-app-messages, notifications, spotless, detekt and apiCheck pass.

Manual testing

Not needed, no behavior change.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

SdkOperation names each public entry point that waits for or requires
init, so logs name the call the app made. Adds an isMissing overload
that takes an operation and parameter name. Nothing uses it yet; the
never-crash init path in this stack does.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

Diff 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

  • InputGuard.kt: 1/1 touched executable lines (100.0%) (7 touched lines in diff)
  • SdkOperation.kt: 23/23 touched executable lines (100.0%) (29 touched lines in diff)

Overall (aggregate gate)

24/24 touched executable lines covered (100.0% — requires ≥ 80%)

📥 View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant