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:
WolfandClaude Opus 5.5 committed 2026-10-04 15:21:11 +02:00
1 parent 558189d747
commit 680744278a
5 files changed
+6 -7

No files matched your search

+2 -2
View File
@@ -19,8 +19,8 @@ on. Computed once per pull (`plan`) and handed to each board's batch as the
everywhere. A `require` gate on remote or `remote_from` next to one on
country adds nothing to it, so remote never widens it past the countries.
A role in Freiburg may be open to remote, or worth asking the
company about for Denmark. Favourite (affinity 2) is scoring only, where
it skips the `any` gates; it does not widen what is fetched.
company about for Denmark. Favourite (affinity 2) only raises a role's
level in scoring; it does not widen what is fetched.
- **Board override**: a board whose subscription `params` name a country, a
place or remote gets no reach here; `ask_for` reads the params instead.
- **Small boards**: a board of under `SMALL` roles gets no filter;
+1 -1
View File
@@ -221,7 +221,7 @@ def score_one(candidate: Candidate, gates: Sequence[Gate], weights: Weights,
def bonus(affinity: int, weights: Weights) -> float:
"""What a company's affinity adds to both levels of the cut: the share
the affinity term gives it in the final score above a company at -1, so
the affinity term gives it in the final score above a neutral one, so
a liked company sits about 0.05 above a neutral one and a favourite
about 0.1 on the default weights. 0 when every weight is 0."""
total = weights.fit + weights.recency + weights.affinity + weights.taste
+1 -1
View File
@@ -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 == []
+1 -1
View File
@@ -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
View File
@@ -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]