Timestamp app-server notifications at emission (#32905)

## What changed

- Add an optional `emittedAtMs` field to server notification envelopes and expose the envelope in the generated JSON and TypeScript schemas.
- Populate the Unix timestamp when app-server emits a notification, before transport routing, so every connection in a fan-out receives the same value.
- Keep the field optional for clients decoding notifications from older app-server versions.

## Testing

- Verify notification serialization includes `emittedAtMs`.
- Verify targeted fan-out reuses one timestamp across connections.

GitOrigin-RevId: b379cb11e8e91c558bcd3d46ce459311a6e81e54
This commit is contained in:
Owen Lin authored and copyberry committed 2026-07-14 00:38:04 +00:00
1 parent 7f3eb8a223
commit c39520f3d1
22 files changed
+400 -171

No files matched your search

+2 -1
View File
@@ -667,7 +667,8 @@ async fn start_uninitialized(args: InProcessStartArgs) -> IoResult<InProcessClie
.await;
}
}
OutgoingMessage::AppServerNotification(notification) => {
OutgoingMessage::AppServerNotification(envelope) => {
let notification = envelope.notification;
if server_notification_requires_delivery(&notification) {
if event_tx
.send(InProcessServerEvent::ServerNotification(notification))