testing/cross_backend/token_lifetime.ts view source
(options: TokenLifetimeCrossTestOptions): void import {describe_token_lifetime_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/token_lifetime.js'; options
returns
void Cross-backend parity suite for the API token lifetime axis of
account_token_create — the round-trip that keeps a one-sided landing
impossible.
The action-manifest parity gate captures {method, side_effects, auth} and
no param schemas, while the TS spine validates params against a Zod
strictObject and the Rust spine hand-parses with params.get(...). So a
spine that silently ignored the lifetime field would answer the same mint
request with a 200 and an eternal token — same method, same status,
nothing red anywhere. The forcing function has to observe the *stored*
state: mint with a TTL, then read expires_at back off the wire.
account_token_create with
{kind:'ttl', days} returns a non-null expires_at (create output *and*
account_token_list), landing within a generous window around
now + days. A spine that dropped the field returns null and fails.{kind:'eternal'} yields
expires_at: null on both reads.lifetime is required; a mint
without it must 400 invalid_params on both spines. This is the direct
pin on the silently-ignoring-unknown-shapes hazard.days: 0 400s identically, so the
two hand-rolled bounds checks can't drift.$lib-free by contract (relative specifiers only), like the sibling
cross-backend suites. Runs both legs — in-process (gro test) and
cross-process — through the shared {setup_test} protocol.
2 declarations
testing/cross_backend/token_lifetime.ts view source
(options: TokenLifetimeCrossTestOptions): void import {describe_token_lifetime_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/token_lifetime.js'; optionsvoid testing/cross_backend/token_lifetime.ts view source
TokenLifetimeCrossTestOptions import type {TokenLifetimeCrossTestOptions} from '@fuzdev/fuz_app/testing/cross_backend/token_lifetime.js'; Options for the token-lifetime parity suite. Ungated — the mint + list pair
is on every spine's standard surface, so there is no capability flag (the
sibling of identity_parity.ts rather than the cell suites).
setup_testPer-test fixture-producing function (fresh keeper + db per call).
type SetupTest
rpc_path?RPC endpoint path the methods are mounted on. Default /api/rpc.
type string