flowchart TB
R1["Dash callback issues request"]:::auth
R2["TenantContext injection
query cannot compile without it"]:::auth
R3["Query builder reads pre-aggregated ClickHouse view"]:::auth
D{"Is this the caller's own
rostered scope?"}:::decide
Yes["Yes: exempt from Threshold Suppression"]:::filter
No["No: apply Threshold Suppression"]:::filter
Comp["Complementary Suppression check"]:::filter
Audit["Privacy Audit Write to lrs.audit"]:::filter
Resp["Response returned to Dash callback
cached by (report_id, tenant, params, data_version)"]:::auth
R1 --> R2 --> R3 --> D
D -->|Yes| Yes
D -->|No| No
Yes --> Comp
No --> Comp
Comp --> Audit --> Resp
classDef auth fill:#8b9bb0,stroke:#5f6e82,color:#fff,font-size:13px
classDef decide fill:#e9a23b,stroke:#b8791f,color:#222,font-size:13px
classDef filter fill:#2a9d8f,stroke:#1f7a6f,color:#fff,font-size:13px
linkStyle default stroke:#999,stroke-width:2px