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:
1 parent
1d0a4c37f2
commit
c7e1921be8
3 files changed
+41
-1
No files matched your search
@@ -103,6 +103,23 @@ def test_berlin_and_munich_of_one_host_fold_into_one_role_with_two_places(
|
||||
assert (row.uid, row.place, row.copies) == (kept, f"{got.places[0].text} +1", 0)
|
||||
|
||||
|
||||
def test_a_place_copy_in_europe_meets_a_europe_gate_for_its_kept_role(store: Store) -> None:
|
||||
"""OpenAI posts one role in San Francisco and in Dublin. The kept role
|
||||
holds both places, so a Europe gate and the Place filter find it through
|
||||
Dublin, though `roles.place` and `roles.country` are San Francisco's."""
|
||||
from app import prep
|
||||
from app.models import Gate
|
||||
sf = role("sf", company="OpenAI", place="San Francisco", country="US", board="ashby")
|
||||
dublin = role("dub", company="OpenAI", place="Dublin, Ireland", country="IE", board="ashby")
|
||||
for item in (sf, dublin):
|
||||
store.upsert_role(item)
|
||||
prep.run(store)
|
||||
kept = kept_of(store, sf, dublin)
|
||||
agent = store.save_agent("A", gates=[Gate(field="country", values=["FR", "IE", "EU"])])
|
||||
assert {c.uid: c.gates for c in store.score_candidates(agent.id, agent.gates)} == {kept: [1]}
|
||||
assert {r.uid for r in store.roles(places=["country:IE"], by_score=False)} == {kept}
|
||||
|
||||
|
||||
def test_places_of_two_hosts_or_two_different_texts_stay_apart(store: Store) -> None:
|
||||
a = role("a", place="Berlin", body="Build payment services in Kotlin for our bank " * 5)
|
||||
b = role("b", place="Munich", body="Sell cloud contracts to enterprise buyers " * 5)
|
||||
|
||||
Reference in new issue
Block a user