Cross-backend parity suite for role-gated participation conferral — the
success paths. The imperative escape hatch beneath the declarative
conformance_participation_cases.ts: the multi-step flows that need a real
recipient account (so a static conformance row can't express them) — an
admin assigns the participant app-role, and an admin offers it through the
consent flow and the recipient accepts.
Proves the two conferral *write* paths agree on both spines (TS spine binary
+ Rust testing_spine_stub):
- immediate assign —
role_grant_assign of the admin-grantable
participant role lands a grant and returns {ok, role_grant_id};
re-assigning the active grant is idempotent (same id). - consent flow —
role_grant_offer_create of participant (admin-only)
→ the recipient role_grant_offer_accepts → a role_grant lands. - offer replay — re-accepting an accepted offer whose grant still
stands answers
200 with the same role_grant_id and writes no audit
row; once the grant is revoked, the replay is refused invalid_request
with reason role_grant_offer_terminal (never the revoked grant's id). - no self-offer, in either case — an admin offering to its own
account is refused
invalid_params with reason
role_grant_offer_self_target, whether the id is sent lowercase or
uppercase: both spines canonicalize the id before comparing it with the
grantor's account. - scoped assign —
role_grant_assign of participant with a paired
scope_kind + scope_id lands a scoped grant carrying both, read back
through admin_account_list, distinct from the global grant.
The single-request gate/denial matrix (grantability refusal, admin-only
conferral, dispatcher admin gate, auth) lives in the declarative table
(conformance_participation_cases.ts) — keep new single-request assertions
there; this suite is only for flows the table cannot carry.
The participant role is registered admin-grantable on both spines
(spine_roles / the Rust stub's RoleRegistry), so the suite is ungated;
every spine mounts the standard RPC surface it drives.
The role is the role option, participant by default: a backend without
it passes another admin-grantable role (ROLE_ADMIN for one with only the
builtins, which skips the scoped case — builtins are global-only).