Find the car when the two databases call it different things, and stop waiting on a map server - #7
Merged
Conversation
…p waiting on a map server Two things the live deployment showed that the local one could not. vPIC decodes a VIN to "Outback". The EPA lists "Outback AWD" and "Outback AWD Turbo" for the same year, so an exact match found nothing and a 2019 Outback came back with no mpg, no engine and no fuel type. When the exact name misses, ask the EPA what it calls that make's models that year and take the closest: ours-plus-a-qualifier first, then ours-minus-one, then the loose match, then nothing rather than the wrong car. The answer says which name it matched on. And a cold Overpass mirror turned a three-second profile into a forty-nine second one. Inside a profile the map now gets nine seconds and two mirrors, because the other five sections are already answered and nobody should wait on repair-shop names to be told their airbag is recalled. Overpass is told the same budget as its own server-side timeout, so it stops working on an answer no one is waiting for. /mechanics on its own is still patient, and either way the tile is cached for a week: one caller waits, nobody after them does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012BzJdwiBGU9hmMGE5fBxjA
ralyodio
force-pushed
the
worktree-automotive-and-ai-incidents
branch
from
September 6, 2026 08:22
798f3e2 to
f30ce56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things the live deployment showed that the local one could not.
The two databases do not call a car the same thing
vPIC decodes a VIN to
Outback. The EPA listsOutback AWDandOutback AWD Turbofor the same year. The exact-match lookup therefore found nothing, and a real request came back with no mpg, no engine and no fuel type:When the exact name misses, ask the EPA what it calls that make's models that year and take the closest, in this order: ours-plus-a-qualifier (
Outback→Outback AWD), then ours-minus-one (Civic Hatchback→Civic), then a loose containment match, then null rather than the wrong car. The response carriesmatchedModelwhenever it is not the name that was asked for, so the substitution is never silent.This was not a rare edge: it affects any model whose EPA name carries a drivetrain or body qualifier, which is a large share of the catalogue.
A cold map server should not hold up an airbag recall
One cold profile took 49 seconds; the same profile warm was 0.2s, and without the places lookup it was 2.9s. The whole difference was a cold Overpass mirror.
Inside a vehicle profile the map now gets 9 seconds and two mirrors. The other five sections are already answered, and nobody should wait on repair-shop names to be told their airbag is recalled. Overpass is also told the same budget as its own server-side
[timeout:], so it stops working on an answer no one is waiting for instead of grinding to completion./mechanicsasked on its own is still patient (25s, all three mirrors) — it has nothing else to return. Either way the tile is cached for a week, so one caller waits and nobody after them does.Verified
🤖 Generated with Claude Code
https://claude.ai/code/session_012BzJdwiBGU9hmMGE5fBxjA