Fetch terms narrow what big boards read with the wide reach send (WP F2)

An agent has fetch_terms (migration 23, API, a chip field in the agent
editor). The terms of a pull are the union over the enabled agents, none
when one of them has none. They go only to wide reads: a company tagged All
roles, or a reach ask_for drops as too many countries for a one host; a
board's {"terms": false} switches them off. SmartRecruiters q,
SuccessFactors q, Workday searchText, Phenom keywords, Eightfold query and
Oracle keyword declare query="one"; the runner makes one series per term
times the country series, drops the places first over MAX_SERIES, then the
terms. A term read is narrowed: it writes no ats:size, closes nothing and
prunes no per-role state, and the 10% guard holds it to its own
fingerprint. The Companies reach line counts the terms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 11:59:27 +02:00
1 parent 3917b31209
commit 0fd45b333a
28 files changed
+839 -113

No files matched your search

+10 -5
View File
@@ -17,6 +17,10 @@ matches. Philips answered 111 of 873 for Netherlands and Germany on
2026-09-30. There is no remote field to filter on. A code with no English
name in `_countries` is left out of the list, and a list left empty reads the
whole board.
A fetch term goes as `keywords` in the body, one a request
(`Filters(query="one")`); it matches the text, not only the title, and is an
AND with `selected_fields` (survey, 2026-09-30, Philips).
"""
from __future__ import annotations
@@ -46,7 +50,7 @@ PATTERNS = (
READS = Reads(
scope="board", listing="paged", page_size=100, text="detail", teaser=True,
complete="stated", places="many", filters=Filters(country="many"),
complete="stated", places="many", filters=Filters(country="many", query="one"),
fields=Fields(posted="trusted", remote="stated"),
robots="read: robots.txt allows /<country>/<lang>/search-results (checked 2026-09-29)",
)
@@ -87,10 +91,11 @@ def careers_url(slug: str) -> str:
return f"{_root(slug)}/search-results"
def _body(slug: str, offset: int, countries: tuple[str, ...] = ()) -> dict[str, Any]:
def _body(slug: str, offset: int, countries: tuple[str, ...] = (),
keywords: str = "") -> dict[str, Any]:
"""What the site's search page sends for a listing of every role, newest
first, less the parts that only tell the page what to draw, in the
`countries` (ISO codes) given. `lang` is `en_global` for `/global/en` and
`countries` (ISO codes) given and matching `keywords` when given. `lang` is `en_global` for `/global/en` and
`en_us` for `/us/en`, the site's own spelling on the three sites read."""
_host, country, lang = _parts(slug)
names = [name for code in countries if (name := name_of(code))]
@@ -100,7 +105,7 @@ def _body(slug: str, offset: int, countries: tuple[str, ...] = ()) -> dict[str,
"subsearch": "", "from": offset, "jobs": True, "counts": True, "all_fetch": False,
"pageType": "landingPage", "size": PAGE_SIZE, "clearAll": False,
"jdsource": "facets", "isSliderEnable": False, "siteType": "external",
"location": "", "keywords": "", "global": True,
"location": "", "keywords": keywords, "global": True,
"selected_fields": {"country": names} if names else {},
"sort": {"order": "desc", "field": "postedDate"}, "locationData": {},
}
@@ -118,7 +123,7 @@ def page(get: Get, slug: str, cursor: Any, ask: Ask = Ask()) -> Page:
offset = int(cursor or 0)
host = _parts(slug)[0]
data = json.loads(get(f"https://{host}/widgets", method="POST",
payload=_body(slug, offset, ask.countries)))
payload=_body(slug, offset, ask.countries, ask.query)))
search = data.get("refineSearch")
if not isinstance(search, dict) or search.get("status", 200) != 200:
raise ValueError("not a Phenom search answer: no refineSearch")