Realistic mock data for Hydrolyze swimmer testing

Writing Search related

The principle (verbatim, per signal-detector contract)

User's exact direction (2026-06-16):

"I think we need to add more realistic more historical mock data to

the swimmers in the database so that I can test the application

more thoroughly. think about how we are going to do this."

Why this matters

The pairing engine has edge cases that need real-shaped data to surface. The current 8 mock swimmers × 4 PBs × 6 recorded_times exercise 2 of 11 test scenarios. The other 9 are blind spots:

Edge caseWhy it mattersWhat data triggers it
Cold startPredictor with no historySwimmer with PBs but no recorded_times
Improvement curveEMA vs median at different time scalesTimes getting faster over months
Taper weekPB right after a rest weekSudden 5% drop in last week
PlateauStable times±50ms variance over 6 months
Injury gapStale historyNo recorded_times in 30+ days
Stroke varietyWrong-stroke match (5-way match should fail)PBs in Backstroke, session is Free
Distance varietyWrong-distance match50m PBs but session is 200m
Intensity mismatchTier 3 fallbackOnly race PBs but session is moderate
Close finishesWave allocator separates similar PBs16 swimmers all near 30s for 50 Free
High varianceLow confidence → "needs review"Routine ±500ms off PB
Multi-intensity PBsv1.13 5-way match winsSeparate PBs at max/threshold/moderate/easy

The data shape

Swimmers: 8 → 16. A real swim team has 12-20 swimmers. 16 gives the wave allocator 2 full waves of 8 — the actual use case.

Per-swimmer history: 6 months, deterministic.

2025-12-15 ───────────────────────── 2026-06-15
│
├─ Phase 1: base building (Dec-Mar) — steady improvement
│  variance ±200ms, weekly improvement of ~50ms
├─ Phase 2: build (Mar-May) — higher intensity, plateau
│  variance ±300ms, weekly improvement slows to ~10ms
├─ Phase 3: taper (May-Jun) — 1 rest week, then PB at end
│  variance drops to ±80ms, 1-2% faster than Phase 2 avg

This gives the engine:

Per-swimmer PBs: the v1.13 architecture's full expression.

StrokeDistanceMaxThresholdModerateEasy
Free50
Free100
Back50
Breast50
Fly50
IM100

24 PBs per swimmer × 16 swimmers = 384 PBs (vs 32 today).

Plus 3 edge-case swimmers:

Per-session structure.

A session has a workout (named template), which has sets, which have (stroke, distance, intensity, gear). The 16 swimmers are in the session, the engine pairs them, recorded_times are written.

Workout: "Tuesday threshold 50s"
  Set 1: 4x50 Free @ T4  ← pairing engine on this set
  Set 2: 4x100 Free @ T2
  Set 3: 4x50 Back @ T3
  ...

For each session, recorded_times reflect real-feeling variance around each swimmer's PB at that set's intensity.

How to generate it

A Python script (deterministic, seeded RNG so reproducible) that:

  1. Define 16 swimmers with deterministic PBs (current 8 + 8 new,

varied across strokes and ages)

  1. Generate 6-month history per swimmer:
  1. Generate PBs by taking min recorded_time per (swimmer, stroke, distance, intensity, gear) bucket, multiplied by the appropriate intensity factor
  2. Insert workouts + sessions containing these sets, in chronological order
  3. Mark the 2 most recent sessions as "active" so user can test "now"

Script location: ~/Documents/VS Code/Hydrolyze 2/scripts/seed_realistic_mock_data.py

Runtime: < 5 minutes.

Output: ~500 PBs + ~2000 recorded_times + ~50 sessions + ~20 workouts.

What this enables (user-facing test scenarios)

Open design questions

  1. How many swimmers? 8 / 12 / 16 / 20. Recommendation: 16

(2 full waves — exercises the real wave allocator case).

  1. How many months of history? 3 / 6 / 12. Recommendation: 6

(one full training cycle — base + build + taper).

  1. Keep existing 8 swimmers as-is, or re-seed with full history?

Recommendation: re-seed the existing 8 (so PBs the user has already seen evolve into a realistic curve), add 8 new.

  1. Deterministic data? Recommendation: yes, seeded RNG (so

a test session can be reproduced; matches a "this is what nathan's team looks like on 2026-06-16" snapshot).

  1. Reset recorded_times and re-pair existing sessions? The user's

existing test sessions (v1.12, v1.13.1, v1.14) have recorded_times from the engine. Recommendation: leave alone (part of test history); new seed only adds historical recorded_times BEFORE the existing sessions.

Related concepts

that drives the multi-intensity PB matrix

v1.14 RPE direction that motivates multi-intensity PBs

direction (test infrastructure, not product)

Published and managed by TARS, an AI co-author built on Nathan's gbrain.