Drop the prefer gate from the reach tests' agent, expect migration 32, and word the favourite and the bonus as built
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
558189d747
commit
680744278a
5 files changed
+6
-7
No files matched your search
@@ -520,7 +520,7 @@ def test_migration_23_gives_every_agent_no_terms(tmp_path: Path) -> None:
|
||||
conn.execute("ALTER TABLE agents DROP COLUMN fetch_terms")
|
||||
conn.execute("PRAGMA user_version = 22")
|
||||
migrated = Store(path)
|
||||
assert migrated.migrations_applied == [23, 24, 25, 26, 27, 28, 29, 30, 31]
|
||||
assert migrated.migrations_applied == [23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
|
||||
assert migrated.agents()[0].fetch_terms == []
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ def test_migration_24_splits_the_tag_and_moves_terms_off(tmp_path: Path) -> None
|
||||
conn.execute("UPDATE companies SET all_roles=1 WHERE key='mistral-ai'")
|
||||
conn.execute("PRAGMA user_version = 23")
|
||||
migrated = Store(path)
|
||||
assert migrated.migrations_applied == [24, 25, 26, 27, 28, 29, 30, 31]
|
||||
assert migrated.migrations_applied == [24, 25, 26, 27, 28, 29, 30, 31, 32]
|
||||
flags = {c.key: (c.all_countries, c.all_roles) for c in migrated.companies()}
|
||||
assert flags == {"mistral-ai": (1, 1), "acme": (0, 1), "plain": (0, 0)}
|
||||
params = {s.target: s.params for s in migrated.subscriptions(source="ats")}
|
||||
|
||||
+1
-2
@@ -41,8 +41,7 @@ def _wolf(store: Store, **extra: object) -> int:
|
||||
gates = [Gate(field="country", values=EUROPE, mode="require"),
|
||||
Gate(field="country", values=["DK", "SE"], mode="any"),
|
||||
Gate(field="remote", values=["remote"], mode="any"),
|
||||
Gate(field="place", values=["Malmö", "Lund", "copenhagen", "odense"], mode="any"),
|
||||
Gate(field="remote", values=["hybrid"], mode="prefer", weight=0.05)]
|
||||
Gate(field="place", values=["Malmö", "Lund", "copenhagen", "odense"], mode="any")]
|
||||
return store.save_agent("Wolf", gates=gates, **extra).id # type: ignore[arg-type]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user