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

+5 -3
View File
@@ -21,7 +21,9 @@ filter is the `reach` option the pull hands it (the agents', see
`app/jobs/reach.py`), over which its subscription `params` (`{"countries":
["DK"], "remote": true}`) win, narrowed to what its reader declares
(`_runner.ask_for`). An unfiltered read records the board's size under
`ats:size:<target>`, which the reach reads to leave small boards whole.
`ats:size:<target>`, which the reach reads to leave small boards whole. A
read narrowed by the agents' fetch terms is never the whole board: it
records no size and prunes no per-role state.
A pull reads listings only. A host that states a role's text on the role's
own page (`text="detail"`) is read there by `app/jobs/enrich.py` after
@@ -384,7 +386,7 @@ class ATSSource(Source):
rows = [row | {"description": ""}
| (_KEPT_FROM_DETAIL if compound(row["source_id"]) in detailed else {})
for row in rows]
if listing.complete:
if listing.complete and not listing.narrowed:
listed = {compound(i) for i in listing.ids}
detail_sets = (detailed & listed, failed & listed)
@@ -395,7 +397,7 @@ class ATSSource(Source):
# as the whole of it.
_runner.stamp(self.state, "ats", target, run_marker, listing,
[compound(i) for i in listing.ids])
if not listing.filtered:
if not (listing.filtered or listing.narrowed):
size = len(listing.ids)
if not listing.complete:
kept = self.state.get(f"ats:size:{target}", "")