tighten backend regression coverage

Add targeted tests for rejection paths, settlement overrides, and key analytics flows, and align localization/research docs with the shipped contract.
This commit is contained in:
2026-04-09 19:14:40 +02:00
parent 781e15d317
commit 02278ddac7
5 changed files with 552 additions and 25 deletions
+38
View File
@@ -0,0 +1,38 @@
# Research Export Path
## Goal
Export study data without adding JSONB or ad hoc blobs.
## Source Tables
- `sessions`
- `experiment_assignments`
- `bet_intents`
- `settlements`
- `analytics_events`
- `analytics_event_attributes`
## Recommended Export Shape
- `session_id`
- `user_id`
- `experiment_variant`
- `locale_code`
- `event_name`
- `occurred_at`
- `attribute_key`
- `attribute_value`
## Export Flow
1. Join relational tables into a flat study dataset.
2. Filter by session, date range, or experiment variant.
3. Write CSV for quick review or Parquet for downstream analysis.
4. Keep the export job read-only and repeatable.
## Notes
- Use the server clock for ordering and latency calculations.
- Prefer one row per analytics event with child attribute expansion.
- Keep locale and variant fields in every export.