1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Drift test for the `sv:{ppnum_id}` shared cache contract.
//!
//! Asserts that `sv_cache_key()` and `SV_CACHE_TTL` still produce the
//! values documented in `0context/STANDARDS_SHARED_CACHE.md §3.1` (the
//! cross-service contract). If anyone changes the constant value or
//! the key shape function without updating the standards doc — and
//! propagating the change through the PAS writer + PCS reader + SDK
//! reader — this test fails on the very next CI run, surfacing the
//! drift before it reaches production.
//!
//! See also `STANDARDS_AUTH_PPOPPO.md §17.7` (wiring status table) and
//! `STANDARDS_SHARED_CACHE.md §7` (Standards Sync Triggers row for
//! `SV_CACHE_KEY_PREFIX` / `SV_CACHE_TTL` value changes).
use Duration;
use ;
/// Key shape `sv:{ppnum_id}` is a cross-service contract — PAS writer
/// and PCS / SDK readers all build the key by calling this function,
/// so they cannot drift on the prefix or separator. The expected
/// shape is documented in STANDARDS_SHARED_CACHE §3.1 ("Key shape"
/// row).
/// TTL is documented as 60 s in STANDARDS_SHARED_CACHE §3.1 ("TTL"
/// row) and §4 (TTL guidance — auth decisions). Any change here
/// shifts the post-break-glass staleness upper bound for SDK
/// consumers and must propagate to the standards doc + the §6.9
/// Cross-system effect timing table in STANDARDS_AUTH_PPOPPO.