Gates reject on evidence only, any gates are one group, remote is read off the location line

A require gate on an empty column gated the role ("country unknown"), and extract, the stage that fills the column, is bounded to the roles that rank, so 2,281 of 15,556 open roles could never come back: every board that writes "Remote", "Hybrid" or "Distributed" as its location. An empty column now neither passes nor fails a gate; the role ranks, extract reads it, the rescore decides.

`any` is a third gate mode: the any gates are one group a role must match one of, so a ranking can say "in Denmark, or remote", which require alone could not. The group is gated only when some member had evidence against it.

`remote_of(place)` fills `remote` from the location line the way `country_of` fills `country`, and the startup backfill does both, since Greenhouse writes "Hybrid" as the location and gives no flag.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 19:30:06 +02:00
1 parent e602eb3388
commit fb83ae5099
10 files changed
+143 -28

No files matched your search

+16 -1
View File
@@ -20,7 +20,7 @@ from plugins import search # noqa: E402
from plugins.search import SearchSource # noqa: E402
from app.config import SearchSeed # noqa: E402
from app.jobs import pull # noqa: E402
from app.models import country_of # noqa: E402
from app.models import country_of, remote_of # noqa: E402
from app.storage import Store # noqa: E402
FIXTURES = ROOT / "tests" / "fixtures" / "search"
@@ -53,6 +53,21 @@ def test_country_of(place: str, code: str) -> None:
assert country_of(place) == code
@pytest.mark.parametrize(("place", "mode"), [
("Remote", "remote"),
("Distributed", "remote"),
("Home based - Worldwide", "remote"),
("Remote - US", "remote"),
("Hybrid", "hybrid"),
("Remote or hybrid, Berlin", "hybrid"),
("In-Office", "onsite"),
("Berlin, Germany", ""),
("", ""),
])
def test_remote_of(place: str, mode: str) -> None:
assert remote_of(place) == mode
def test_upsert_fills_country_from_place_unless_the_plugin_says(store: Store) -> None:
def item(source_id: str, **raw: Any) -> Item:
it = Item(source_id=source_id, location="https://x.example/1", title="Engineer",