Repository navigation
fix(connector): London as a whole asks which of its councils - #234
Merged
Merged
Conversation
|
billlyzhaoyh
force-pushed
the
fix/connector-london
branch
from
December 1, 2026 15:41
be0b075 to
222369c
Compare
"London" was answered with the City of London, the one council whose name holds the word, as if it were found: 11,457 residents. "Greater London" was not found. Both now answer `choose`, listing all 33 of London's councils (its 32 boroughs and the City), whose codes alone begin E09, so the person says which one they mean. The list comes from the shipped council list, so it is complete whatever the index holds, and is not cut to the usual ten matches. The names are kept in a small table of areas larger than one council, so another such area can be added the same way. The City of London is still found by its own name, and a London borough by its name or its "London Borough of" name. Signed-off-by: billlyzhaoyh <billlyzhaoyh@users.noreply.github.com> Github-Issue: #233
billlyzhaoyh
force-pushed
the
fix/connector-london
branch
from
December 1, 2026 16:45
222369c to
120cb5b
Compare
billlyzhaoyh
marked this pull request as ready for review
December 2, 2026 17:44
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.
Closes #233.
The problem
The connector's
describe_place, which the chat assistant uses, answered "London" with the City of London, as if it were found: 6 neighbourhoods and 11,457 residents. When no council's name matches in full, the connector tries part of a name, and "london" is part of only one: "City of London". "Greater London" was not found.The fix
"London" and "Greater London" now answer
chooseand list all 33 of London's councils: its 32 boroughs and the City. The message says the tool describes one council at a time, and asks which one is meant. The same thing happens when several councils match a name.chooseanswers ("Newcastle") are unchanged.The
chooseanswer is now built in one place,_choose, which both kinds of answer use. Nothing public changes.Tests
test_london_as_a_whole_asks_which_of_its_councilscovers "London" and "Greater London".ruff checkruff format --checkast-grep scanty check srcpytest(1,295 passed)mkdocs build --strict-m live). Nothing here reads a new source.Found in review, not changed here
English counties fall into the same trap.
Now filed as connector: a county's name is answered with one of its districts, or a council outside it #236.
"London City" and "London, City of" now get the London list (the City is in it), where they used to find the City.
"Inner London" and the region code E12000007 are still not found.
Already on main:
chooseanswer is cut to 10 with nothing saying so ("North" matches 14).AI tools
Claude Code wrote the change, the test and this description, and ran the code review and simplify passes.