Mark a role whose title or text says remote while no field does, in prep with no model, and let it meet a gate on remote until extract has read it (migration 35, roles.remote_text)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-06 14:02:46 +02:00
1 parent f141cffc3c
commit 49929372c7
14 files changed
+144 -36

No files matched your search

+24
View File
@@ -417,6 +417,30 @@ def test_a_region_that_holds_the_agents_places_is_no_evidence_against(
assert oresund not in {r.uid for r in store.roles(places=["country:DK"])}
def test_a_role_whose_text_says_remote_passes_a_gate_on_remote_until_extract_reads_it(
store: Store, config: Config, fake: FakeEmbedder) -> None:
"""Berlin is evidence against Denmark, but a text that says remote while
no field does makes the role possibly remote (`remote_text`, prep): it
meets the remote member. Once extract says onsite, it fails again."""
said = role(store, "1", place="Berlin, Germany", remote="")
silent = role(store, "2", place="Berlin, Germany", remote="")
with store.transaction() as conn:
conn.execute("UPDATE roles SET remote_text = 1 WHERE uid = ?", (said,))
agent = store.save_agent("DK or remote", "", [
Gate(field="country", values=["DK"], mode="any"),
Gate(field="remote", values=["remote"], mode="any")])
run(config, store, score.run_score)
scores = store.scores(agent.id)
assert scores[said][1] == ""
assert scores[silent] == (0.0, "none of country DK, remote remote")
with store.transaction() as conn:
conn.execute("UPDATE roles SET remote = 'onsite' WHERE uid = ?", (said,))
run(config, store, score.run_score)
assert store.scores(agent.id)[said] == (0.0, "none of country DK, remote remote")
def test_a_wider_place_beside_a_place_elsewhere_is_no_match(
store: Store, config: Config, fake: FakeEmbedder) -> None:
"""Europe alone is no evidence against Denmark; `London; Europe` is in