Tag a company All roles to read its big boards with the agents' wide reach; favourite scores only

Migration 21 adds companies.all_roles, tags every favourite of any agent and each company whose board had params {"reach": "all"} (logged per board, the param removed). reach.plan reads a tagged company's boards with the union of the enabled agents' require reach and the base reach; favourite no longer widens the fetch. POST /api/companies/{key}/all-roles sets it and queues a pull when on. The Companies list, the reader and the company strip draw the toggle beside the affinity buttons, the list filters on it, and the board's reach editor drops its All roles option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 10:44:41 +02:00
1 parent 8d9a059e24
commit 5d5b7e7d3f
20 files changed
+422 -124

No files matched your search

+3 -4
View File
@@ -19,10 +19,9 @@ its slug is. Every board is read independently; one that fails is logged,
recorded as failing under `ats:failing:<target>`, and skipped. A board's
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}`, `{"reach": "all"}`) 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.
["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.
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
+5 -6
View File
@@ -290,7 +290,7 @@ def resolve_key(key: Key, keys: Mapping[str, Any] | None) -> dict[str, str]:
#: The most series a reach may cost on a `one` filter: a reach of more
#: countries (a favourite's Europe) reads such a host unfiltered instead.
#: countries (the wide reach, Europe) reads such a host unfiltered instead.
MAX_SERIES = 8
@@ -301,10 +301,9 @@ def ask_for(module: ModuleType, subscription_params: Mapping[str, Any] | None =
`app/jobs/reach.py`) and then the subscription's own `params` (a board's
override, e.g. `{"countries": ["DK"], "remote": true}`, or a search's
saved params) set the dimensions, params winning per dimension, narrowed
to the ones the reader declares in `READS.filters`. `{"reach": "all"}` in
the params drops the reach, and so does a reach of more than
`MAX_SERIES` countries on a reader whose country filter is `one`. A
`remote` of False asks nothing. A search's params go whole into
to the ones the reader declares in `READS.filters`. A reach of more
than `MAX_SERIES` countries on a reader whose country filter is `one` is
dropped. A `remote` of False asks nothing. A search's params go whole into
`Ask.params`; a reader with `READS.key` gets the resolved key under
`Ask.params["key"]` (see `resolve_key`, which raises when it is missing).
A module without `READS` gets `Ask()`."""
@@ -312,7 +311,7 @@ def ask_for(module: ModuleType, subscription_params: Mapping[str, Any] | None =
return Ask()
reads: Reads = module.READS
params = dict(subscription_params or {})
reached = {} if params.get("reach") == "all" else _dimensions(module, reach or {})
reached = _dimensions(module, reach or {})
if reads.filters.country == "one" and len(reached.get("country", ())) > MAX_SERIES:
reached = {}
wanted = reached | _dimensions(module, params)