feat(notifications): mint JWT pool for native fetcher; log API response
- Mint BACKGROUND_JWT_POOL_SIZE (90 + 10) distinct background JWTs with unique jti; pass jwtTokens from nativeFetcherConfig into configureNativeFetcher. - Android TimeSafariNativeFetcher: overload configure with jwtTokenPool; select bearer via epoch day mod pool size; fall back to primary jwtToken. - Log truncated plansLastUpdatedBetween response at DEBUG for prefetch debugging.
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
/**
|
||||
* JWT lifetime for native New Activity background prefetch (`configureNativeFetcher`).
|
||||
* Phase A: single long-lived token minted in TS; see doc/plan-background-jwt-pool-and-expiry.md.
|
||||
* Confirm max `exp` with Endorser before raising.
|
||||
* See doc/plan-background-jwt-pool-and-expiry.md. Confirm max `exp` with Endorser before raising.
|
||||
*/
|
||||
export const BACKGROUND_JWT_EXPIRY_DAYS = 90;
|
||||
|
||||
export const BACKGROUND_JWT_EXPIRY_SECONDS =
|
||||
BACKGROUND_JWT_EXPIRY_DAYS * 24 * 60 * 60;
|
||||
|
||||
/** Headroom for retries / tests; pool size should be ≥ expiryDays + buffer. */
|
||||
export const BACKGROUND_JWT_POOL_BUFFER = 10;
|
||||
|
||||
/** Distinct JWT strings minted per configure (duplicate-JWT / daily slot). */
|
||||
export const BACKGROUND_JWT_POOL_SIZE =
|
||||
BACKGROUND_JWT_EXPIRY_DAYS + BACKGROUND_JWT_POOL_BUFFER;
|
||||
|
||||
Reference in New Issue
Block a user