Size a board once with board_size, before a pull reads it with no size, and name what a site's ids leave out

set_board sizes a board from page 1's total, or reads to the end on a host that states none, instead of reading it whole up to page 100. A pull no longer rewrites ats:size; a board with none is handed the agents' reach marked unsized and is sized in its batch first, or by its whole read on a host that cannot narrow the reach. reach.sizes drops the open-role fallback. The Companies line names countries a Workday or Oracle site does not list and a missing remote option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 13:43:52 +02:00
1 parent a19c528e3f
commit a0882e9659
8 files changed
+579 -67

No files matched your search

+7 -7
View File
@@ -603,7 +603,7 @@ def test_companies_lists_board_and_open_role_count(
"careers_opened_at": "", "failing_since": "", "failing_reason": "",
"from_search": False, "hand_reason": "", "by_hand": False,
"all_countries": False, "all_roles": False,
"reach_params": {}, "reach": "size not known yet: read whole"}
"reach_params": {}, "reach": "size not known yet: sized on the next pull"}
[other] = [c for c in res.json() if c["key"] == "other"]
assert (other["board"], other["subscription_id"], other["on"], other["ats"]) == (
"", None, None, "")
@@ -1371,7 +1371,7 @@ def test_a_board_is_followed_only_if_it_answers(
client: TestClient, store: Store, queue: Any, monkeypatch: pytest.MonkeyPatch) -> None:
import plugins.ats as ats
monkeypatch.setattr(ats, "fetch_board", lambda target: ([{"source_id": "1"}], True))
monkeypatch.setattr(ats, "board_size", lambda target, **kw: 1)
res = client.post("/api/boards", json={"board": "ashby:acme", "name": "Acme"})
assert res.status_code == 201
assert res.json()["found"] == 1 and res.json()["source"]["target"] == "ashby:acme"
@@ -1389,10 +1389,10 @@ def test_a_board_is_followed_only_if_it_answers(
bad = client.post("/api/boards", json={"board": "acme", "name": "Other"})
assert bad.status_code == 422 and "host:slug" in bad.json()["detail"]
def down(target: str) -> list[dict[str, str]]:
def down(target: str, **kw: object) -> int:
raise OSError("connection refused")
monkeypatch.setattr(ats, "fetch_board", down)
monkeypatch.setattr(ats, "board_size", down)
dead = client.post("/api/boards", json={"board": "ashby:other", "name": "Other"})
assert dead.status_code == 422 and "did not answer" in dead.json()["detail"]
assert store.company("other") is None
@@ -1402,7 +1402,7 @@ def test_a_companys_board_is_set_replaced_and_detached(
client: TestClient, store: Store, queue: Any, monkeypatch: pytest.MonkeyPatch) -> None:
import plugins.ats as ats
monkeypatch.setattr(ats, "fetch_board", lambda target: ([], True)) # between openings
monkeypatch.setattr(ats, "board_size", lambda target, **kw: 0) # between openings
store.add_company("Acme", key="acme", ats="teamtailor", ats_slug="acme")
res = client.post("/api/companies/acme/board", json={"board": "greenhouse:acme"})
@@ -1522,7 +1522,7 @@ def test_a_company_with_a_board_keeps_its_name_and_takes_the_other_edits(
client: TestClient, store: Store, monkeypatch: pytest.MonkeyPatch) -> None:
import plugins.ats as ats
monkeypatch.setattr(ats, "fetch_board", lambda target: ([], True))
monkeypatch.setattr(ats, "board_size", lambda target, **kw: 0)
store.add_company("Acme", key="acme")
assert client.post("/api/companies/acme/board", json={"board": "greenhouse:acme"}
).status_code == 200
@@ -1563,7 +1563,7 @@ def test_a_company_is_deleted_unless_it_is_read(
client: TestClient, store: Store, monkeypatch: pytest.MonkeyPatch) -> None:
import plugins.ats as ats
monkeypatch.setattr(ats, "fetch_board", lambda target: ([], True))
monkeypatch.setattr(ats, "board_size", lambda target, **kw: 0)
agent = store.save_agent("A")
store.add_company("Meta", key="meta", hand_reason="blocked")
store.set_affinity(agent.id, "meta", 1)