Appearance
Identifiers
The platform's identifier conventions. Identity keys are never used as display text; display names are snapshots.
| Identifier | Format | Owner / source | Purpose |
|---|---|---|---|
discord_id | Discord snowflake (numeric string) | Discord OAuth / bot | Canonical identity for agents, punishment issuers/targets, actors (events.actor_id), profile snapshots |
report_id | Free text, ≤64 chars [A-Za-z0-9_\-:.#] (e.g. DPS-CASE-01234, UUIDs) | Bot at creation | Reports primary key |
punishment_id | AA0AA0 (2 letters, 1 digit, 2 letters, 1 digit) | Generated transactionally in rpc_punishment_create (collision-retried) | Punishments primary key; client never supplies it |
agent_id | Bot-generated (DPS-AG-##### family via /generate/agent) | Bot after training | DPS-internal agent identifier; secondary lookup key (audit by_name resolution, db_resolve_agent_name) |
security_id | Bot-generated | Bot (Phase 2+) | Onboarding record |
agreement_id | AGM-##### (/generate/agreement) | Bot | Onboarding record |
clearance_id | CL-### (/generate/clearance) | Bot | Onboarding record |
join code | SC-###X# (/generate/join) | Bot | Onboarding |
investigation id | INV-##### (/generate/investigation) | Bot | Generated codes (stored on Discord side) |
session_id | UUID (gen_random_uuid()) | Database | Training sessions + Realtime channel topics (training:session:<uuid>) |
scenario_id | bigint identity | Database | Training scenarios / session scenario instances |
action_id / queue id | bigint identity | Database | pending_actions, discipline_queue rows |
correlation_id | secrets.token_hex(8) per admin request | API (_admin_identity) | Ties UI request → audit row → canonical event |
client_id | Client-generated per training action | Trainee frontend | Idempotency key ((session_id, client_id) unique index) |
roblox_id | Positive integer | ER:LC | Player lookups (/erlc/player/<id>) |
Display-name resolution
assigned_agenton reports may beName (userid), a bare name, anagent_id, or a Discord ID; matching against the session agent is exact only (never prefix/substring).- Serializers scrub known identifiers out of display text (
_scrub_user_ids); resolved names are computed server-side and cached per request. by_namein the audit log resolvestimeline.byagainstagents.discord_id,agents.agent_id, oragents.name(first match).