Skip to content

Commit 3ddeddc

Browse files
committed
chore: drop ticket-id refs from comments and test names
Strip "SDK-4388" / "SDK-4474" prefixes from comments and test descriptions in RefreshUserOperationExecutor and its test class. The descriptive context that followed the ticket id already explains the why; the ticket id itself is noise for future maintainers and is preserved in git history / commit messages.
1 parent af41140 commit 3ddeddc

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal/operations/impl/executors/RefreshUserOperationExecutor.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ internal class RefreshUserOperationExecutor(
102102
propertiesModel.timezone = TimeUtils.getTimeZoneId()
103103

104104
// Retrieve the push subscription ID from the backend configuration model store. Used
105-
// both for re-attaching the locally-cached push model below and for the SDK-4474
105+
// both for re-attaching the locally-cached push model below and for the push
106106
// self-heal divergence check inside the loop.
107107
val pushSubscriptionIdFromConfig = _configModelStore.model.pushSubscriptionId
108108

@@ -136,10 +136,9 @@ internal class RefreshUserOperationExecutor(
136136
if (subscriptionModel.type != SubscriptionType.PUSH) {
137137
subscriptionModels.add(subscriptionModel)
138138
} else if (subscription.id == pushSubscriptionIdFromConfig && pushSelfHealOperation == null) {
139-
// SDK-4474 self-heal for SDK-4388 victims. The buggy
140-
// SubscriptionOperationExecutor in older SDK builds dispatched the merged
141-
// create-subscription + update-subscription(SUBSCRIBED) batch as a POST
142-
// /subscriptions carrying the already-existing server-side id; the server
139+
// Self-heal for users stuck at "Never Subscribed". Older SDK builds dispatched
140+
// the merged create-subscription + update-subscription(SUBSCRIBED) batch as a
141+
// POST /subscriptions carrying the already-existing server-side id; the server
143142
// responded 200 {} (no-op) and the local op queue was emptied, leaving the
144143
// server stuck at enabled:false / notification_types:0. Once that user
145144
// upgrades to a fixed SDK build, nothing in the queue triggers the fix path.
@@ -200,9 +199,9 @@ internal class RefreshUserOperationExecutor(
200199
}
201200

202201
/**
203-
* SDK-4474 self-heal builder. Returns an [UpdateSubscriptionOperation] iff the cached
204-
* push subscription model resolves to enabled-and-opted-in but the server response
205-
* recorded the same id as disabled. Returns null otherwise (no divergence — no-op).
202+
* Push self-heal builder. Returns an [UpdateSubscriptionOperation] iff the cached push
203+
* subscription model resolves to enabled-and-opted-in but the server response recorded
204+
* the same id as disabled. Returns null otherwise (no divergence — no-op).
206205
*
207206
* Caller has already verified that [serverSubscription.id] matches the cached
208207
* `pushSubscriptionId`, so this method only inspects the local model + server flags.
@@ -226,7 +225,7 @@ internal class RefreshUserOperationExecutor(
226225
"RefreshUserOperationExecutor: push subscription $pushSubscriptionId diverged from server " +
227226
"(server enabled=${serverSubscription.enabled} notificationTypes=${serverSubscription.notificationTypes}; " +
228227
"local opted-in and SUBSCRIBED). Enqueuing follow-up update-subscription op to re-assert local " +
229-
"truth via PATCH /subscriptions/{id}. See SDK-4388 / SDK-4474.",
228+
"truth via PATCH /subscriptions/{id}.",
230229
)
231230
UpdateSubscriptionOperation(
232231
op.appId,

OneSignalSDK/onesignal/core/src/test/java/com/onesignal/user/internal/operations/RefreshUserOperationExecutorTests.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RefreshUserOperationExecutorTests : FunSpec({
6464
mapOf(IdentityConstants.ONESIGNAL_ID to remoteOneSignalId, "aliasLabel1" to "aliasValue1"),
6565
PropertiesObject(country = remoteCountry, language = remoteLanguage, timezoneId = remoteTimeZone, tags = remoteTags),
6666
listOf(
67-
// notificationTypes = 1 keeps server-side view healthy so the SDK-4474
67+
// notificationTypes = 1 keeps server-side view healthy so the push
6868
// self-heal divergence check is a no-op for this happy-path test.
6969
SubscriptionObject(existingSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, notificationTypes = 1, token = "on-backend-push-token"),
7070
SubscriptionObject(remoteSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, notificationTypes = 1, token = "pushToken2"),
@@ -326,10 +326,11 @@ class RefreshUserOperationExecutorTests : FunSpec({
326326
}
327327
}
328328

329-
// SDK-4474 self-heal divergence detection. Verifies that when the device-cached push
329+
// Push self-heal divergence detection. Verifies that when the device-cached push
330330
// subscription resolves to enabled-and-opted-in but the GET /users response returns the
331-
// same subscription as disabled (the SDK-4388 stuck state), RefreshUserOperationExecutor
332-
// emits a follow-up UpdateSubscriptionOperation to re-assert local truth via PATCH.
331+
// same subscription as disabled (the "Never Subscribed" stuck state),
332+
// RefreshUserOperationExecutor emits a follow-up UpdateSubscriptionOperation to re-assert
333+
// local truth via PATCH.
333334
fun buildSelfHealHarness(
334335
serverPushEnabled: Boolean,
335336
serverNotificationTypes: Int?,
@@ -396,8 +397,8 @@ class RefreshUserOperationExecutorTests : FunSpec({
396397
return Triple(executor, cachedPushSubscriptionModel, mockUserBackendService)
397398
}
398399

399-
test("SDK-4474 self-heal: enqueues follow-up update-subscription op when server is stuck-disabled but local is enabled") {
400-
// Given: server view says push is disabled (the SDK-4388 stuck state), local view says enabled
400+
test("push self-heal: enqueues follow-up update-subscription op when server is stuck-disabled but local is enabled") {
401+
// Given: server view says push is disabled (the stuck state), local view says enabled
401402
val (executor, _, _) =
402403
buildSelfHealHarness(
403404
serverPushEnabled = false,
@@ -434,7 +435,7 @@ class RefreshUserOperationExecutorTests : FunSpec({
434435
}
435436
}
436437

437-
test("SDK-4474 self-heal: does NOT enqueue follow-up op when server matches local (healthy push subscription)") {
438+
test("push self-heal: does NOT enqueue follow-up op when server matches local (healthy push subscription)") {
438439
// Given: server already enabled and notificationTypes=1, local also enabled
439440
val (executor, _, _) =
440441
buildSelfHealHarness(
@@ -453,7 +454,7 @@ class RefreshUserOperationExecutorTests : FunSpec({
453454
response.operations shouldBe null
454455
}
455456

456-
test("SDK-4474 self-heal: does NOT enqueue follow-up op when local is opted out (UNSUBSCRIBE is intentional)") {
457+
test("push self-heal: does NOT enqueue follow-up op when local is opted out (UNSUBSCRIBE is intentional)") {
457458
// Given: server is disabled, but so is local (user explicitly opted out)
458459
val (executor, _, _) =
459460
buildSelfHealHarness(
@@ -472,7 +473,7 @@ class RefreshUserOperationExecutorTests : FunSpec({
472473
response.operations shouldBe null
473474
}
474475

475-
test("SDK-4474 self-heal: does NOT enqueue follow-up op when local has NO_PERMISSION (OS-level disable is real)") {
476+
test("push self-heal: does NOT enqueue follow-up op when local has NO_PERMISSION (OS-level disable is real)") {
476477
// Given: server disabled, local also has no notification permission
477478
val (executor, _, _) =
478479
buildSelfHealHarness(

0 commit comments

Comments
 (0)