Pin that a Europe gate reads a town by its own country and a kept role through its copies' places

The OpenAI and Mistral roles agent 2 let through are not a gazetteer mix-up:
Montréal resolves to Canada and San Francisco to the US. Each is the kept
role of a posting folded with a copy in Dublin, Munich or Paris, and the
gate reads every place of a kept role. Tests hold both, decisions.md says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-10-03 23:13:05 +02:00
1 parent 1d0a4c37f2
commit c7e1921be8
3 files changed
+41 -1

No files matched your search

+23
View File
@@ -301,6 +301,29 @@ def test_the_eu_value_of_a_country_gate_is_europe(store: Store,
assert found[several["ny"]] == 0
#: Lines of OpenAI and Mistral roles that agent 2's Europe gate was thought to
#: let through, with the country the board stated.
STATED = {"montreal": ("Montréal", "CA"), "sf": ("San Francisco", "US"),
"sf-ny": ("San Francisco; New York City", "US"),
"sf-london": ("San Francisco; London, UK", "US"),
"sf-seattle-london": ("San Francisco; Seattle; London, UK", "")}
def test_a_town_outside_europe_does_not_meet_a_europe_gate(store: Store) -> None:
"""Montréal is Canada's and San Francisco the US's, whatever the
stated country; a line that also names London is in Europe through it,
in the gate and in the Place filter alike."""
for key, (line, country) in STATED.items():
upsert(store, posting(key, place=line, country=country))
uid = {key: posting(key).uid for key in STATED}
found = gates(store, Gate(field="country", values=["DE", "FR", "GB", "IE", "EU"]))
met = {"sf-london", "sf-seattle-london"}
assert found == {uid[k]: int(k in met) for k in STATED}
assert uids(store, "country:EU") == {uid[k] for k in met}
assert uids(store, "country:CA") == {uid["montreal"]}
assert uids(store, "country:FR") == set()
def test_a_place_gate_matches_over_the_gazetteer(store: Store,
several: dict[str, str]) -> None:
found = gates(store, Gate(field="place", values=["Malmö", "Lund", "oberkochen"],