My citation check ignored every new ride
Every number CadensIQ states comes with a ride: [id date]. A check reads the answer and flags any id that no tool returned. For the first two eval runs it could not see the newest rides.
The rule is simple. The model never does the arithmetic, so every figure it states comes from a tool, and it cites the ride behind it. The check is what stands between that rule and an invented ride. It pulls every id out of the answer, pulls every id out of what the tools returned, and flags the ones that never came back.
A pattern written too early
A Garmin activity id is eleven digits. When I wrote the pattern, every id in the export started with a 1, so the pattern did too. Then the export reached rides whose ids start with a 2.
| Ride id | What the check did |
|---|---|
12345678901 (any older ride; an example id) | found it, checked it |
2xxxxxxxxxx (any newer ride) | never saw it |
\b(1\d{10})\bHow I found it
Not with a test. The How it works page shows one real answer next to the tool calls behind it. Reading it, I saw ids starting with a 2 that the pattern could not match. The same pattern draws the clickable links, so those ids were not links either.
Why the eval stayed green
Run 2 scored 36 of 36. A check that skips a case and a check that passes it look the same from outside: no failures. Runs 1 and 2 never verified a citation to a ride whose id starts with a 2, and nothing would have told me.
The fix was one character class, [1-9]. Run 4 had the newest rides in it and checked them: 36 of 36, none unverified.
The same bug, a second time
An audit of the load figures found it again in another shape. Athletes who upload plain FIT files (Strava, TrainingPeaks workout files) have no Garmin ids. Their rides are numbered by start time in Unix seconds, which is ten digits, and the pattern wanted eleven.
It lived in three places: the check, the code that strips citations from a message to an athlete, and the script that turns ids in an answer into links. All three take ten or eleven digits now. A test builds a ten-digit athlete and checks that its citation verifies.
What a pass means
That the id showed up in a tool result. It does not mean the ride says what the answer says. For that, every figure comes from a tool and every id is a link, so you can click through and look.
A check that has never failed has not been shown to work.