diff --git a/app/jobs/reach.py b/app/jobs/reach.py index 5ae83ac..02217b0 100644 --- a/app/jobs/reach.py +++ b/app/jobs/reach.py @@ -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; diff --git a/app/jobs/score.py b/app/jobs/score.py index eb0eaa8..f2b08c8 100644 --- a/app/jobs/score.py +++ b/app/jobs/score.py @@ -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 diff --git a/tests/test_fetch_terms.py b/tests/test_fetch_terms.py index 8781e38..c8f4927 100644 --- a/tests/test_fetch_terms.py +++ b/tests/test_fetch_terms.py @@ -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 == [] diff --git a/tests/test_overrides.py b/tests/test_overrides.py index b4ebd62..d890809 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -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")} diff --git a/tests/test_reach.py b/tests/test_reach.py index 1ce3063..595c4d2 100644 --- a/tests/test_reach.py +++ b/tests/test_reach.py @@ -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]