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 -3
View File
@@ -8,6 +8,11 @@ A country is filtered on the server, `?country=dk`, one a request
(`Filters(country="one")`): Bosch's DE, SE and DK summed to what the app held
(review, 2026-09-29), and DK answered 2 of 4,830 on 2026-09-30. The API
ignores a remote parameter, so remote is not filtered.
A fetch term goes as `?q=engineer`, one a request (`Filters(query="one")`):
it matches title and text, and with `country=` it is an AND (survey,
2026-09-30: `q=engineer` answered 1,713 of Bosch's 4,830, with `country=dk`
none). How several words in one `q` combine is untested.
"""
from __future__ import annotations
@@ -16,6 +21,7 @@ import json
import re
from collections.abc import Callable
from typing import Any
from urllib.parse import quote
from ._contract import Ask, Fields, Filters, Place, Reads
from ._shared import Get, Page, Row, only, parse_dt, path_slug_ok
@@ -30,7 +36,7 @@ PATTERNS = (
#: An unknown identifier answers an empty list, which is `empty="suspect"`.
READS = Reads(
scope="board", listing="paged", page_size=100, text="none", complete="stated",
places="one", empty="suspect", filters=Filters(country="one"),
places="one", empty="suspect", filters=Filters(country="one", query="one"),
fields=Fields(posted="trusted", remote="stated", country="stated", seniority="stated",
employment="stated"),
robots="api: no robots.txt check needed (public board API), 2026-09-30",
@@ -66,12 +72,13 @@ def probe_ok(body: bytes) -> bool:
def page(get: Get, slug: str, cursor: Any, ask: Ask = Ask()) -> Page:
"""One page, in the one country `ask` names, which the API takes in lower
case."""
case, and matching its `query` (`q=`)."""
offset = int(cursor or 0)
country = ask.countries[0].lower() if ask.countries else ""
where = f"&country={country}" if re.fullmatch(r"[a-z]{2}", country) else ""
words = f"&q={quote(ask.query, safe='')}" if ask.query else ""
data = json.loads(get(f"https://{_API}/v1/companies/{slug}/postings"
f"?offset={offset}&limit={PAGE_SIZE}{where}"))
f"?offset={offset}&limit={PAGE_SIZE}{where}{words}"))
content = data.get("content") or []
return data, content, data.get("totalFound"), offset + len(content) if content else None