Handover — Historical Flexi Delay Scan

John wants to know how many Bristol Parkway ↔ London journeys made while using an old Trainline Flexi Season were delayed enough for GWR Delay Repay, because he was poor at claiming manually and wants the automation to catch this in future.

Goal

Reconstruct historical Flexi travel days from OwnTracks GPS history, match each rail journey to the correct Network Rail WTT service, calculate actual vs booked arrival, and count qualifying Delay Repay cases by band: 15–29, 30–59, 60–119, and 120+ minutes. Where possible, estimate the compensation that would have been due under Flexi Season rules.

Important Route Caveat

Some Bristol Parkway ↔ London journeys were diverted via Bath. Do not assume every trace used the direct Bristol Parkway–Swindon–Reading route. Use the GPS path to recognise Bath-routed journeys and match them to the appropriate WTT schedule rather than treating the longer route as delay.

Relevant Notes to Read First

Known Ticket Facts

Suggested Analysis Method

Missing Input

The exact validity dates of the old Flexi were not found in the public or private Notes indexes during this session. If the database scan finds a compact cluster of regular London journeys it may suggest the 28-day window, but ideally recover the Trainline purchase/validity details from email or Trainline records and use those as authority.

Connector Failure Seen in This Session

The Misc connector advertised pg_query successfully via tool discovery, but invoking pg_query caused the runtime to disable or lose the Misc tool before the SQL was actually sent. This appears session-specific rather than a SQL/database failure. John believes the connector itself has now been fixed, so a fresh chat should retry discovery and execution.

The harmless first query attempted was: SELECT min(to_timestamp(tst) AT TIME ZONE 'Europe/London') AS first_fix, max(to_timestamp(tst) AT TIME ZONE 'Europe/London') AS last_fix, count(*) AS n FROM locations;

First Action in New Session

Discover Misc.pg_query and immediately run a simple SELECT against locations to confirm execution works. Then proceed with the GPS/WTT scan rather than re-investigating connector setup.

version 1  ·  created 2026-09-07  ·  updated 2026-09-07  ·  tags delayrepay, handover, flexi, gps, wtt