Skip to content

Render typed session alerts for Firebase Cloud Messaging - #359

Merged
n0rpan merged 2 commits into
mainfrom
mobile/fcm-session-alert-payload
Dec 3, 2026
Merged

n0rpan merged 2 commits into
mainfrom
mobile/fcm-session-alert-payload

Conversation

@n0rpan

@n0rpan n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Part of #95. Add FCM rendering for finished, failed, and goal alerts. The adapter requires a canonical session reference and exact pairing hint before fetching a provider token. The payload uses fixed copy and carries only the kind, reference suffix, and hint. Existing approval payloads keep their exact bytes.

Based on 51a337a. All 198 relay tests passed, including expiry, invalid input, device targeting, and three session payloads. The durable HTTP route and dispatcher still send approvals. No production alert delivery is enabled by this change.

Validate explicit finished, failed and goal_reached session requests: a
known kind, a canonical s1_-prefixed 32-byte base64url event reference and
a required canonical pairing hint. Render the stateless APNs worker's
fixed copy with data exactly {kind, session_ref: suffix, pairing_hint}.

The session path reuses the approval delivery path for expiry, size,
fid/token targeting, click_action and proxy: DENY, and carries no
approval field. The legacy approval payload and results stay unchanged;
the dispatcher and HTTP surfaces are untouched.

Tests: node --test mobile-push-relay/test/*.test.js (199 pass). New
fcm-session.test.js covers all three kinds, approval byte parity, the exact
session data, validation before access token or transport, expiry, size,
fid targeting and provider answer classification.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T11:33:14.032310Z 6c8a11e PR opened
🔒 Security Review ✅ Completed 2026-12-03T11:34:23.110500Z 6c8a11e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@n0rpan

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

/queue 6c8a11e

@n0rpan

n0rpan commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

In line to merge. Commit 6c8a11e is reviewed with nothing blocking; it has entered the merge queue.

@n0rpan
n0rpan added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit e7278e5 Dec 3, 2026
23 checks passed
@n0rpan
n0rpan deleted the mobile/fcm-session-alert-payload branch December 3, 2026 13:53
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