Delay Repay Automation

Automating GWR Delay Repay claims by driving a real Firefox on an on-demand AWS host over VNC, so a slow/interactive web task can be run (and watched) reliably. Working dir: /home/john/delayrepay (README there for tool-level detail). Built over the 2026-08-27 and 2026-08-28 sessions.

Goal: fire one command, it provisions a browser host, drives the claim, and stays viewable from any workstation — with at most one approval and surviving the operator being away 10+ minutes (several claims a month expected, incl. the delayed return leg).

Claim status: see delayrepay/claims for the current state (reference, status, award) of every claim submitted — the single source of truth, kept in sync with GWR's own Claim History page. Notes below keep only ticket/journey evidence, not ongoing status.

Latest browser host — 2026-09-15: maitake (i-02f5a709874764f11, eu-central-1) is TERMINATED at John's request; no longer needed. See EC2 Host Registry for lifecycle status.

Documentation

See also provisioning, toolkit, viewer-setup (+ runnable), lessons. Related: ansible/aws-browser-host, delay-repay-vnc-howto, and the active 26 Aug GWR claim being used during development.

Data sources

WTT Train Timetable — scheduled train times (Network Rail Working Timetable) in the owntracks DB, queryable via the pg_query MCP tool and joinable to GPS locations for scheduled-vs-actual delay calculation. Covers GWML Paddington <-> Bristol Parkway / Swansea / Carmarthen, both directions (down from Paddington and up into Paddington). Examples: the 27 Aug 19:18 Paddington->Bristol Parkway is 1B31 (SX), booked Bristol Parkway 20:27; a Bristol Parkway->Paddington claim joins the up train's booked BRISTOL PARKWAY dep and LONDON PADDINGTON arr (e.g. 1L01 05:52 -> 07:16). Not yet loaded: other destinations/routes.

Architecture at a glance

Ticket evidence: photos of tickets/receipts for a claim are kept on the WebDAV server under reclaim/ (e.g. reclaim/IMG_1484.jpeg for the 27 Aug return leg) — this is the standard location, check there first when a claim needs ticket details.

Quick start

Status (2026-09-02) — first claim submitted end-to-end ✅

The RETURN leg (27 Aug, Paddington → Bristol Parkway, ticket 11694, £48.00, evidence reclaim/IMG_1484.jpeg) was researched from GPS + the ticket, then later submitted — see delayrepay/claims for its outcome and delayrepay/lessons for the process (keyboard date-picker nav, 'Manually enter your journey' path).

Handover for the historical Flexi delay scan: Historical Flexi Delay Scan — 7 Sep 2026.

TODO — 9 Sep 2026 outbound leg (Bristol Parkway → Paddington): run the claim. Findings so far, from GPS + WTT: train 1L04 (SX), booked Bristol Parkway dep 06:59, booked Paddington arr 08:16 (working time). GPS shows dwell at Bristol Parkway ~06:50–07:15/17 (already running late at departure), then movement through Swindon/Reading, with the last fix at 08:38:28 only 326 m from Paddington (signal lost there, likely underground/into the station) — actual arrival estimated ~08:37–08:38. Delay ≈ 20–21 min, i.e. GWR's 15–29 min band (same band as the successful 26 Aug claim, ref GWR-1210-786-241). Not yet confirmed against the public timetable (WTT times run ~0.5–1 min tighter) and ticket details (type/price/reference) not yet gathered from the image — ticket images are on the WebDAV server under reclaim/ (same location as the 27 Aug return-leg evidence, reclaim/IMG_1484.jpeg). To run: fill in claim.conf on kelp and ./run_claim.sh (see Quick start above) — this has to be run from kelp itself, not from a chat session's sandboxed tool access.

2026-09-09: outbound leg claim submitted — Bristol Parkway → London Paddington (06:59→08:16, train 1L04), delay 15–29 min; Advance Single, Paper, ticket no 63678, £99.00. Driven end-to-end on a fresh host (chanterelle) after porcini's browser profile got tangled from reuse; reCAPTCHA escalated the scripted Submit to an interactive challenge, so John solved it by hand (see delayrepay/lessons ‘Session 2026-09-09’). See delayrepay/claims for the claim's current status.

version 8  ·  updated 2026-09-15  ·  tags delayrepay, gwr, vnc, ocr, aws, stunnel, automation, project