Register Live Activity push-to-start error code 40182, add LiveActivity push stats#349
Merged
Merged
Conversation
cdda81e to
e6166de
Compare
Member
|
@JoaoDiasAbly we recently updated how error codes are maintained in this repo, so if these new codes are still needed, they need to be registered by creating a Markdown file in the errors/codes directory. |
e6166de to
77083de
Compare
lmars
reviewed
Jul 10, 2026
| identifier: apns_token_authentication_required | ||
| title: APNs token authentication required | ||
| summary: A location or live-activity notification was not sent because these require the app's APNs credentials to use token-based authentication, but the app is not configured that way. | ||
| summary: A location notification was not sent because location notifications require the app's APNs credentials to use token-based authentication, but the app is not configured that way. |
Member
There was a problem hiding this comment.
If this one is now just about location push, I think we should make the two errors a bit more symmetrical, so here:
apns_token_authentication_required_for_location
"APNs token authentication required for location notification"
and below:
apns_token_authentication_required_push_to_start
"APNs token authentication required for push-to-start Live Activities notification"
Push-to-start of a Live Activity requires the app's APNs credentials to use token-based authentication; ably/realtime#8527 rejects non-compliant apps at request time with 40182 (AIT-804, AIT-989) rather than reusing the location-specific 40180. Adds errors/codes/40182.md per the registry process introduced in #348, scopes 40180 back to location notifications only (realtime#8527 moves the live-activity case onto 40182), and regenerates protocol/errors.json. Per review, the pair is named symmetrically: apns_token_authentication_required_for_location and apns_token_authentication_required_for_push_to_start, with titles to match. 103008, which this branch previously registered by hand, already landed in #348's registry, so it no longer appears here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two additive fields for LiveActivity observability (AIT-990), added to
both the app and account stats schemas:
- push.apnsBroadcasts: APNs Live Activity broadcasts issued. Each
broadcast is a single request to Apple that Apple fans out to every
device subscribed to the broadcast channel (no per-device
visibility), so it counts issuance, not deliveries, and includes
the final broadcast sent by an end request.
- push.notifications.{delivered,refused.retriable,refused.final,
skipped,all}.apnsLiveActivity: per-outcome delivery counters
mirroring the apnsLocation wording and placement. Emitted by the
realtime push-worker's apnsLiveActivity stats block
(ably/realtime#8527), which counts the expected
no-push-to-start-token drops as skips.
No versions.json bump, following 50412f0 ("Add missing objects stats").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
77083de to
c7b8c01
Compare
lmars
approved these changes
Jul 10, 2026
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.
Summary
ably-common side of LiveActivity production readiness (ADR-157, follow-up): registers the one LiveActivity error code still missing from the error registry, and adds the customer stats for Live Activity broadcasts and per-outcome notification delivery. Unblocks ably/realtime#8527, which bumps its ably-common submodule once this merges.
Restructured after #348 ("Error code documentation registry"): codes are now registered as
errors/codes/<code>.mdfiles andprotocol/errors.jsonis generated from them. Of the six codes this PR originally set out to add, #344 had already registered 103004–103007 and #348 registered 103008 — leaving only 40182.Error code
errors/codes/40182.md(new) —apns_token_authentication_required_for_push_to_start. Push-to-start of a Live Activity requires the app's APNs credentials to use token-based authentication. realtime#8527 rejects non-compliant apps with 40182 at/startrequest time and uses it for the push-worker transport skip (both previously fell under location's 40180).errors/codes/40180.md— scoped back to location notifications only, since realtime#8527 moves the live-activity case onto 40182: summary narrowed, and identifier/title renamed toapns_token_authentication_required_for_location/ "APNs token authentication required for location notification" so the pair reads symmetrically (per review). There's a brief window between the two merges where production still emits 40180 for live-activity skips; realtime#8527 closes it.protocol/errors.json— regenerated vianpm run generate:errors(not hand-edited).Stats schema
Adds
push.apnsBroadcaststojson-schemas/src/app-stats.jsonandjson-schemas/src/account-stats.json, alongsidepush.directPublishes. Each broadcast is a single request to Apple that Apple fans out to every subscribed device (Ably has no per-device visibility), so the counter tracks issuance, not deliveries, and includes the final broadcast sent by an end request.Also adds the ten per-outcome entries
push.notifications.{delivered,refused.retriable,refused.final,skipped,all}.apnsLiveActivityto both schemas, mirroring theapnsLocationwording and placement. These are emitted by the push-worker'sapnsLiveActivitystats block in ably/realtime#8527, which counts the expected no-push-to-start-token drops as skips.Additive fields only — no
versions.jsonbump, following 50412f0 ("Add missing objects stats").Related
🤖 Generated with Claude Code