Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; the previous wrong-country selection is fixed. SummaryElsewhen now rejects geocoder results outside a city's zone and resolves legacy zone names.
Reviews (7) · Last reviewed commit: "Keep the row's own zone for the exact ge..." · Reviewed by Greptile |
|
GPT-6 High in Codex read the diff, review discussion, and linked report #17782 and classified this as a bug fix. The required second classifier, DeepSeek V4.1 Flash, returned no classification, so the classification remains unsettled. No worker tests or second code review ran. Verification is waiting on the required second classification; no verification or readiness labels were added. |
|
GPT-6 High in Codex reviewed the diff, coordinate consumers, linked reports and competing #17789. Opus 5.5 High and muse-wonder via pi (thinking high) reviewed both diffs. Both agreed that this version covers legacy rows such as Opus identified a match-order regression at No branch changes were pushed. Worker reproduction, the suite and visual checks were not run: the triage execution rule requires protected release branches, and GitHub reports |
|
GPT-6 High in Codex reviewed the change in The new exact-match pass fixes the Nairobi case, but Greptile's Kampala finding is correct. The older #17789 preserves the original-zone match and remains the fix to continue reviewing. The alias-aware lookup here adds useful coverage—for example, accepting Seattle on CI passed on this head. Worker reproduction, mutation, suite and visual checks were not run because the triage execution rule requires protected shipping branches and GitHub reports them unprotected. No branch changes were pushed and no verification or readiness labels were added. This remains waiting on the maintainer. |
…inates A legacy row name is not what the geocoder or zone1970.tab answer with, so "Calcutta" topped out at a hamlet in Mpumalanga and the marker landed in southern Africa (omacom#17782). Read tzdata's L lines and accept a result whose canonical zone is the row's own. A link can cross a border: Pacific/Truk points at Pacific/Port_Moresby, whose coordinates are in Papua New Guinea, so the offline fallback keeps the row's own zone instead of placing Truk in another country. A link can also be the wrong town: tzdata links Africa/Kampala to Africa/Nairobi, and "Mbale" answers with the Ugandan town first, so take a result that names the row's zone before one that only links to it.
4d911bb to
8760f8f
Compare
|
Fixed in The match-order finding was correct, and the geocoder confirms it: a live search for "Mbale" answers a Ugandan town ( I checked the two-pass version against the old and new behaviour directly: the new case fails on the previous head and passes now, and the rest of the elsewhen model cases still pass. The rebase also had to drop Thanks for the captures and the comparison against #17789. That one still misses |
|
GPT-6 in Codex (effort not exposed) compared Opus 5.5 High and muse-wonder via pi, thinking high reviewed both current diffs and agreed on that defect; independence is not guaranteed. Both recommend continuing with older #17789 because it retains the original-zone match. Its new head also covers the Seattle and Canberra cases raised earlier. The remaining dynamic-alias coverage from this PR is already handed to that item's session; both PRs remain open for the maintainer's decision. CI passed on this head; this review used source and live data only. Worker reproduction, mutation, tests and visual checks did not run: the triage execution rule requires protected shipping branches, and GitHub reports |
The caller resolved the row's link before asking, so a row whose zone the geocoder does answer with was asked about the zone it links to instead. Mbale answers with a Ugandan town (Africa/Kampala) before the Kenyan one, and tzdata links Kampala to Nairobi, so a Kampala row was handed the Kenyan town across the border -- the very swap the exact pass was added to prevent. Pass the row's own zone, and resolve both sides inside the linked pass. That keeps Pacific/Truk rows on a Pacific/Chuuk answer and Africa/Kampala rows on their own town.
|
Right on both counts — fixed in The caller was resolving the row before asking, so the exact pass compared the geocoder's zone against the link target instead of the row. A live "Mbale" search makes it visible: Uganda
I checked each of those against the real
|
|
GPT-6 in Codex (effort not exposed) reviewed Opus 5.5 High and muse-wonder via pi, thinking high reviewed both current diffs and agreed on that correction; independence is not guaranteed. This overlaps #17789; both pull requests remain open for the maintainer's decision. CI passed and Greptile's current summary scores this head 5/5. This is source and live-data review only. Worker reproduction, mutation, suite and visual checks did not run: the triage execution rule requires protected shipping branches, and GitHub reports |
Fixes #17782.
What was wrong
pickGeocode()fell back to the first geocoder result whenever no result carried the row's zone. The geocoder searches by name, so a name that only survives as small settlements abroad never carries the zone — and the first result was used regardless of where it was.For Calcutta that is not theoretical.
Asia/Calcuttais a legacy alias,Asia/Kolkatais what the geocoder answers with, and a live search for "Calcutta" returns:Africa/JohannesburgAmerica/New_YorkKolkata, India is not in the top ten at all. So the marker landed in Mpumalanga — the southern-Africa placement in the report.
The reporter suspected other cities were affected, and they are: every legacy zone name the picker still offers (
Asia/Calcutta,US/Pacific,Europe/Kiev, …) can never equal a geocoder answer, so each of them was placed at whatever ranked first for its name.The change
pickGeocode()only accepts a result in the row's own zone. It tries the result's own zone first, then a result whose zone resolves to the row's, so aPacific/Chuukanswer still matches aPacific/Trukrow. When none matches it returnsplace: null, and the caller falls back to the zone'szone1970.tabcoordinates — the offline path that already existed but was unreachable for these rows.Panel.qmlused to resolve the row's link and hand that to the picker, so a row whose zone the geocoder does answer with was asked about the zone it links to instead. tzdata linksAfrica/KampalatoAfrica/Nairobiand "Mbale" answers with a Ugandan town first, so a Kampala row took the Kenyan town across the border — 110 km away, and the same swap the exact pass was added to prevent. The caller now passes the row's own zone and the picker resolves both sides inside the linked pass.zoneAliases()/canonicalZone()read theL <canonical> <alias>lines oftzdata.ziand resolve the legacy name first, sozone1970.taband the geocoder are both asked aboutAsia/Kolkatarather thanAsia/Calcutta. Without this, refusing the top result would have left legacy-named cities with no marker at all instead of a wrong one.Pacific/Truklinks toPacific/Port_Moresby, but Truk is in Micronesia; the target's Papua New Guinea coordinates would move the marker, the weather and the daylight strip to another country. Such a row shows no marker until a geocode lands, rather than a wrong one.Aliases are followed through a chain with a seen-set, so an alias pointing at another alias terminates.
Verification
Against the real
tzdata.ziand a live geocoder answer for "Mbale" (UgandaAfrica/Kampalafirst, KenyaAfrica/Nairobisecond):Africa/KampalaAfrica/NairobiAsia/CalcuttaPacific/TrukAsia/TokyoBoth Kampala and Nairobi rows now keep their own town; the legacy rows (
Asia/Calcutta,Pacific/Truk,US/Pacific) resolve through their links, and a name whose top hits are all foreign still yields no marker rather than a wrong one.This branch previously added cases to
test/shell.d/elsewhen-model-test.sh— the refusal, the alias table, alias chains, the legacy-zone-to-coordinates path and the exact-before-linked order. They all passed (268 assertions on the rebased tree), but #19904 deleted the elsewhen unit tests as non-essential, so the file is gone fromquattroand this branch now drops them instead of fighting the suite trim. They can be restored wherever the maintainer wants them to live.Screenshots
Opened Elsewhen on the tracked
Calcuttarow (Asia/Calcutta) and switched to the globe, once with the installed shell and once with this branch's shell, then restarted the installed shell.Before / after — the same row, marked
Calcutta … tracked,Asia/Calcutta:Left: the old fallback takes the top geocoder hit for the name, so the marker lands in Mpumalanga. Right: with the top result refused, the legacy alias resolves to
Asia/Kolkataand the marker falls back to the zone's own coordinates in India.